defining chain for running the AltroChannelSelection component; bugfix: default end...
[u/mrichter/AliRoot.git] / HLT / RCU / AliHLTAltroChannelSelectorComponent.h
CommitLineData
3e6ec852 1//-*- Mode: C++ -*-
1ea9f419 2// $Id$
3e6ec852 3
4#ifndef ALIHLTALTROCHANNELSELECTORCOMPONENT_H
5#define ALIHLTALTROCHANNELSELECTORCOMPONENT_H
2a32beb8 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 *
3e6ec852 9
1ea9f419 10/// @file AliHLTAltroChannelSelectorComponent.h
11/// @author Matthias Richter
12/// @date
13/// @brief A filter/selective readout component for Altro data.
14///
3e6ec852 15
3e6ec852 16// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
17
18#include "AliHLTProcessor.h"
19
20/**
21 * @class AliHLTAltroChannelSelectorComponent
64defa03 22 * A selector component for ALTRO Raw data. The component subscribes
f5bd9c68 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
64defa03 34 *
2a32beb8 35 *
ff4a65b9 36 * The AliAltroRawStreamV3 is used as input decoder to read and scan the
4ca5858d 37 * Altro Raw data.
3e6ec852 38 *
2a32beb8 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>
3e6ec852 45 *
46 * Mandatory arguments: <br>
1ac82ce6 47 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
3e6ec852 48 *
49 * Optional arguments: <br>
1ac82ce6 50 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
2a32beb8 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>
3e6ec852 64 *
2a32beb8 65 * @ingroup alihlt_rcu_components
3e6ec852 66 */
67class 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
4ca5858d 99 /** skip corrupted channels */
100 bool fSkipCorrupted; //!transient
e1440dab 101
4ca5858d 102 /** more verbose output */
103 bool fTalkative; //!transient
104
2a32beb8 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);
3e6ec852 111};
112
113#endif