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"
23 * @class AliHLTAltroChannelSelectorComponent
24 * A selector component for ALTRO Raw data. The component subscribes
25 * to the RAW data {***:DDL_RAW }, and produces the same raw data block
26 * with only the selected ALTRO channels. <br>
27 * Three different modes are supported:
28 * - -signal-threshold <br>
29 * the average of all signals in the channel is calculated and it is
30 * selected when the maximum signal exceeds average+threshold
31 * - -rms-threshold <br>
32 * the implemented logic needs to be checked, never been used
33 * - list of channels to select.
34 * The list must be of identical specification as the RAW data and of
35 * data type {***:HWADDR16}: 16 bit hardware addresses
38 * The AliAltroRawStreamV3 is used as input decoder to read and scan the
41 * <h2>General properties:</h2>
43 * Component ID: \b AltroChannelSelector <br>
44 * Library: \b libAliHLTRCU <br>
45 * Input Data Types: kAliHLTDataTypeDDLRaw, kAliHLTDataTypeHwAddr16 <br>
46 * Output Data Types: kAliHLTDataTypeDDLRaw <br>
48 * Mandatory arguments: <br>
49 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
51 * Optional arguments: <br>
52 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
54 * keep corrupted channels, by default ignored
56 * be a bit more verbose, prints out statistics message and warnings
57 * \li -start-timebin <i> bin </i>
58 * all time bins below will be ignored
59 * \li -end-timebin <i> bin </i>
60 * all time bins above will be ignored
61 * \li -signal-threshold <i> adc_counts </i>
62 * the average will be calculated from all bins between start and end,
63 * a channel is considered active if the maximum is bigger than averge
65 * \li -rms-threshold <i> sigma </i>
67 * @ingroup alihlt_rcu_components
69 class AliHLTAltroChannelSelectorComponent : public AliHLTProcessor {
71 /** default constructor */
72 AliHLTAltroChannelSelectorComponent();
74 virtual ~AliHLTAltroChannelSelectorComponent();
76 // interface functions: property getters
77 const char* GetComponentID();
78 void GetInputDataTypes(AliHLTComponentDataTypeList& list);
79 AliHLTComponentDataType GetOutputDataType();
80 void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
81 AliHLTComponent* Spawn();
84 // interface functions: processing
85 int DoInit(int argc, const char** argv);
87 int DoEvent(const AliHLTComponentEventData& evtData,
88 const AliHLTComponentBlockData* blocks,
89 AliHLTComponentTriggerData& trigData,
90 AliHLTUInt8_t* outputPtr,
92 AliHLTComponentBlockDataList& outputBlocks );
96 /** copy constructor prohibited */
97 AliHLTAltroChannelSelectorComponent(const AliHLTAltroChannelSelectorComponent&);
98 /** assignment operator prohibited */
99 AliHLTAltroChannelSelectorComponent& operator=(const AliHLTAltroChannelSelectorComponent&);
101 /** skip corrupted channels */
102 bool fSkipCorrupted; //!transient
104 /** more verbose output */
105 bool fTalkative; //!transient
107 unsigned int fStartTimeBin; //!transient
108 unsigned int fEndTimeBin; //!transient
109 unsigned int fSignalThreshold; //!transient
110 float fRMSThreshold; //!transient
111 bool fMakeHistogram; //!transient
113 TH1F *fhThreshold;//! Histgram of the "threshold value"
114 TH1F *fhRMS;//! Histgrams of the "RMS value"
116 ClassDef(AliHLTAltroChannelSelectorComponent, 0);