4 #ifndef ALIHLTALTROCHANNELSELECTORCOMPONENT_H
5 #define ALIHLTALTROCHANNELSELECTORCOMPONENT_H
6 //* This file is property of and copyright by the ALICE HLT Project *
7 //* ALICE Experiment at CERN, All rights reserved. *
8 //* See cxx source for full Copyright notice *
10 /// @file AliHLTAltroChannelSelectorComponent.h
11 /// @author Matthias Richter
13 /// @brief A filter/selective readout component for Altro data.
16 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
18 #include "AliHLTProcessor.h"
21 * @class AliHLTAltroChannelSelectorComponent
22 * A selector component for ALTRO Raw data. The component subscribes
23 * to the RAW data {***:DDL_RAW }, and produces the same raw data block
24 * with only the selected ALTRO channels. <br>
25 * Three different modes are supported:
26 * - -signal-threshold <br>
27 * the average of all signals in the channel is calculated and it is
28 * selected when the maximum signal exceeds average+threshold
29 * - -rms-threshold <br>
30 * the implemented logic needs to be checked, never been used
31 * - list of channels to select.
32 * The list must be of identical specification as the RAW data and of
33 * data type {***:HWADDR16}: 16 bit hardware addresses
36 * The AliAltroRawStreamV3 is used as input decoder to read and scan the
39 * <h2>General properties:</h2>
41 * Component ID: \b AltroChannelSelector <br>
42 * Library: \b libAliHLTRCU <br>
43 * Input Data Types: kAliHLTDataTypeDDLRaw, kAliHLTDataTypeHwAddr16 <br>
44 * Output Data Types: kAliHLTDataTypeDDLRaw <br>
46 * Mandatory arguments: <br>
47 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
49 * Optional arguments: <br>
50 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
52 * keep corrupted channels, by default ignored
54 * be a bit more verbose, prints out statistics message and warnings
55 * \li -start-timebin <i> bin </i>
56 * all time bins below will be ignored
57 * \li -end-timebin <i> bin </i>
58 * all time bins above will be ignored
59 * \li -signal-threshold <i> adc_counts </i>
60 * the average will be calculated from all bins between start and end,
61 * a channel is considered active if the maximum is bigger than averge
63 * \li -rms-threshold <i> sigma </i>
65 * @ingroup alihlt_rcu_components
67 class AliHLTAltroChannelSelectorComponent : public AliHLTProcessor {
69 /** default constructor */
70 AliHLTAltroChannelSelectorComponent();
72 virtual ~AliHLTAltroChannelSelectorComponent();
74 // interface functions: property getters
75 const char* GetComponentID();
76 void GetInputDataTypes(AliHLTComponentDataTypeList& list);
77 AliHLTComponentDataType GetOutputDataType();
78 void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
79 AliHLTComponent* Spawn();
82 // interface functions: processing
83 int DoInit(int argc, const char** argv);
85 int DoEvent(const AliHLTComponentEventData& evtData,
86 const AliHLTComponentBlockData* blocks,
87 AliHLTComponentTriggerData& trigData,
88 AliHLTUInt8_t* outputPtr,
90 AliHLTComponentBlockDataList& outputBlocks );
94 /** copy constructor prohibited */
95 AliHLTAltroChannelSelectorComponent(const AliHLTAltroChannelSelectorComponent&);
96 /** assignment operator prohibited */
97 AliHLTAltroChannelSelectorComponent& operator=(const AliHLTAltroChannelSelectorComponent&);
99 /** skip corrupted channels */
100 bool fSkipCorrupted; //!transient
102 /** more verbose output */
103 bool fTalkative; //!transient
105 unsigned int fStartTimeBin; //!transient
106 unsigned int fEndTimeBin; //!transient
107 unsigned int fSignalThreshold; //!transient
108 unsigned int fRMSThreshold; //!transient
110 ClassDef(AliHLTAltroChannelSelectorComponent, 2);