]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/RCU/AliHLTAltroChannelSelectorComponent.h
defining chain for running the AltroChannelSelection component; bugfix: default end...
[u/mrichter/AliRoot.git] / HLT / RCU / AliHLTAltroChannelSelectorComponent.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
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                               *
9
10 /// @file   AliHLTAltroChannelSelectorComponent.h
11 /// @author Matthias Richter
12 /// @date   
13 /// @brief  A filter/selective readout component for Altro data.
14 ///
15
16 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
17
18 #include "AliHLTProcessor.h"
19
20 /**
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
34  *
35  *
36  * The AliAltroRawStreamV3 is used as input decoder to read and scan the
37  * Altro Raw data.
38  * 
39  * <h2>General properties:</h2>
40  *
41  * Component ID: \b AltroChannelSelector                                <br>
42  * Library: \b libAliHLTRCU                                             <br>
43  * Input Data Types: kAliHLTDataTypeDDLRaw, kAliHLTDataTypeHwAddr16     <br>
44  * Output Data Types: kAliHLTDataTypeDDLRaw                             <br>
45  *
46  * Mandatory arguments: <br>
47  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
48  *
49  * Optional arguments: <br>
50  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
51  * \li -keep-corrupted
52  *     keep corrupted channels, by default ignored
53  * \li -talkative
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
62  *     plus threshold
63  * \li -rms-threshold <i> sigma </i>
64  *
65  * @ingroup alihlt_rcu_components
66  */
67 class AliHLTAltroChannelSelectorComponent : public AliHLTProcessor {
68  public:
69   /** default constructor */
70   AliHLTAltroChannelSelectorComponent();
71   /** destructor */
72   virtual ~AliHLTAltroChannelSelectorComponent();
73
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();
80
81  protected:
82   // interface functions: processing
83   int DoInit(int argc, const char** argv);
84   int DoDeinit();
85   int DoEvent(const AliHLTComponentEventData& evtData,
86               const AliHLTComponentBlockData* blocks, 
87               AliHLTComponentTriggerData& trigData,
88               AliHLTUInt8_t* outputPtr, 
89               AliHLTUInt32_t& size,
90               AliHLTComponentBlockDataList& outputBlocks );
91
92  
93  private:
94   /** copy constructor prohibited */
95   AliHLTAltroChannelSelectorComponent(const AliHLTAltroChannelSelectorComponent&);
96   /** assignment operator prohibited */
97   AliHLTAltroChannelSelectorComponent& operator=(const AliHLTAltroChannelSelectorComponent&);
98
99   /** skip corrupted channels */
100   bool fSkipCorrupted; //!transient
101
102   /** more verbose output */
103   bool fTalkative; //!transient
104
105   unsigned int fStartTimeBin; //!transient
106   unsigned int fEndTimeBin; //!transient
107   unsigned int fSignalThreshold; //!transient
108   unsigned int fRMSThreshold; //!transient
109
110   ClassDef(AliHLTAltroChannelSelectorComponent, 2);
111 };
112
113 #endif