]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/RCU/AliHLTAltroChannelSelectorComponent.h
AltroChannelSelector component moved to libAliHLTRCU
[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 // see below for class documentation
17 // or
18 // refer to README to build package
19 // or
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
21
22 #include "AliHLTProcessor.h"
23
24 /**
25  * @class AliHLTAltroChannelSelectorComponent
26  * A selector component for ALTRO Raw data. The component subscribes
27  * to the RAW data {***:DDL_RAW } and gets in addition a list of channels
28  * to select. The list must be of identical specification as the RAW data
29  * and can be of data type:
30  * - {***:HWADDR16}: 16 bit hardware addresses
31  *
32  * TheAliAltroDecoder is used as input decoder to read and scan the
33  * Altro Raw data.
34  * 
35  * Component ID: \b AltroChannelSelector <br>
36  * Library: \b libAliHLTRCU
37  *
38  * Mandatory arguments: <br>
39  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
40  *
41  * Optional arguments: <br>
42  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
43  *
44  */
45 class AliHLTAltroChannelSelectorComponent : public AliHLTProcessor {
46  public:
47   /** default constructor */
48   AliHLTAltroChannelSelectorComponent();
49   /** destructor */
50   virtual ~AliHLTAltroChannelSelectorComponent();
51
52   // interface functions: property getters
53   const char* GetComponentID();
54   void GetInputDataTypes(AliHLTComponentDataTypeList& list);
55   AliHLTComponentDataType GetOutputDataType();
56   void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
57   AliHLTComponent* Spawn();
58
59  protected:
60   // interface functions: processing
61   int DoInit(int argc, const char** argv);
62   int DoDeinit();
63   int DoEvent(const AliHLTComponentEventData& evtData,
64               const AliHLTComponentBlockData* blocks, 
65               AliHLTComponentTriggerData& trigData,
66               AliHLTUInt8_t* outputPtr, 
67               AliHLTUInt32_t& size,
68               AliHLTComponentBlockDataList& outputBlocks );
69
70  
71  private:
72   /** copy constructor prohibited */
73   AliHLTAltroChannelSelectorComponent(const AliHLTAltroChannelSelectorComponent&);
74   /** assignment operator prohibited */
75   AliHLTAltroChannelSelectorComponent& operator=(const AliHLTAltroChannelSelectorComponent&);
76
77   /**
78    * Copy a data block at the end of a buffer.
79    * The source buffer is inserted at given position relative to the buffer
80    * end.
81    * @param pTgt       target buffer
82    * @param capacity   capacity (size) of the buffer
83    * @param position   porition relative to the END of the buffer
84    * @param pSrc       source buffer to be copied
85    * @param size       size of the source buffer
86    * @return copied size, neg error code if failed
87    */
88   int CopyBlockToEnd(AliHLTUInt8_t* pTgt, unsigned capacity, unsigned position, void* pSrc, unsigned size);
89
90   /** skip corrupted channels */
91   bool fSkipCorrupted; //!transient
92
93   /** more verbose output */
94   bool fTalkative; //!transient
95
96   ClassDef(AliHLTAltroChannelSelectorComponent, 1);
97 };
98
99 #endif