]>
Commit | Line | Data |
---|---|---|
c2440081 | 1 | //-*- Mode: C++ -*- |
2 | #ifndef ALIHLTCOMPHUFFMANALTROCALIBCOMPONENT_H | |
3 | #define ALIHLTCOMPHUFFMANALTROCALIBCOMPONENT_H | |
4 | ||
5 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * See cxx source for full Copyright notice */ | |
7 | ||
8 | /** @file AliHLTCOMPHuffmanAltroCalibComponent.h | |
9 | @author Jochen Thaeder | |
10 | @author extended by Jenny Wagner | |
11 | @date 20-11-2007 | |
12 | @brief A calibration component for the Huffman code creator | |
13 | */ | |
14 | ||
15 | #include "AliHLTCalibrationProcessor.h" | |
16 | ||
17 | class AliHLTCOMPHuffmanAltro; | |
18 | class AliHLTCOMPHuffmanData; | |
19 | ||
20 | /** | |
21 | * @class AliHLTCOMPHuffmanAltroCalibComponent | |
22 | * Component ID: \b HuffmanAltroCalibComponent <br> | |
23 | * Library: \b libAliHLTComp | |
24 | * This class is the calibration component for the AliTPCCalibHuffmanAltro class | |
25 | * used for calibration of the Huffman code table (which is created here). | |
26 | * | |
27 | * Mandatory arguments: <br> | |
28 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating --> | |
29 | * \li -origin <i> detector <\i> <br> | |
30 | * set origin of data for code creation to specify output table (parameter transient) | |
31 | * \li -runnumber <i> decimal number <\i> <br> | |
32 | * set runnumber to specify output table (parameter transient) | |
33 | * \li -dataspec <i> 0xYYXXaabb <\i> <br> | |
34 | * set usual HLT dataspec (last slice, first slice, last patch, first patch)_Hexadezimal to specify output table | |
35 | * \li -trailerwords <i> decimal number <\i> <br> | |
36 | * set number of trailerwords of incoming data (ranging from 1 to 3) | |
37 | * | |
38 | * Optional arguments: <br> | |
39 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating --> | |
40 | * \li -tablepath <i> path to Huffman code table <\i> <br> | |
41 | * set path to out put Huffman code table as root file, if no path is given, output path is set to current path (parameter transient) | |
42 | * | |
43 | * It inherits from the @ref AliHLTCalibrationProcessor and uses the high-level | |
44 | * interface. The output is the class @ref HuffmanData as a TObject which is written to the data base | |
45 | * | |
46 | * @ingroup alihlt_comp | |
47 | */ | |
48 | class AliHLTCOMPHuffmanAltroCalibComponent : public AliHLTCalibrationProcessor | |
49 | { | |
50 | public: | |
51 | /** constructor */ | |
52 | AliHLTCOMPHuffmanAltroCalibComponent(); | |
53 | ||
54 | /** destructor */ | |
55 | virtual ~AliHLTCOMPHuffmanAltroCalibComponent(); | |
56 | ||
57 | // Public functions to implement AliHLTComponent's interface. | |
58 | // These functions are required for the registration process | |
59 | ||
60 | const char* GetComponentID(); | |
61 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); | |
62 | AliHLTComponentDataType GetOutputDataType(); | |
63 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); | |
64 | AliHLTComponent* Spawn(); | |
65 | ||
66 | protected: | |
67 | ||
68 | // Protected functions to implement AliHLTComponent's interface. | |
69 | // These functions provide initialization as well as the actual processing | |
70 | // capabilities of the component. | |
71 | ||
72 | /** Initialize the calibration component. */ | |
73 | Int_t InitCalibration(); | |
74 | ||
75 | /** Scan commandline arguments of the calibration component. */ | |
76 | Int_t ScanArgument( Int_t argc, const char** argv ); | |
77 | ||
78 | /** DeInitialize the calibration component. */ | |
79 | Int_t DeinitCalibration(); | |
80 | ||
81 | /** Process the data in the calibration component. */ | |
82 | Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); | |
83 | ||
84 | /** Ship the data to the FXS at end of run or eventmodulo. */ | |
85 | Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData ); | |
86 | ||
87 | private: | |
88 | ||
89 | /** copy constructor prohibited */ | |
90 | AliHLTCOMPHuffmanAltroCalibComponent(const AliHLTCOMPHuffmanAltroCalibComponent&); | |
91 | ||
92 | /** assignment operator prohibited */ | |
93 | AliHLTCOMPHuffmanAltroCalibComponent& operator=(const AliHLTCOMPHuffmanAltroCalibComponent&); | |
94 | ||
95 | /** Huffman compressor class */ | |
96 | AliHLTCOMPHuffmanAltro * fHuffmanCompressor; //! instance of Huffman Compressor in this component | |
97 | ||
98 | /** pointer to output Huffman code table and occurrence table (togehter in this class) */ | |
99 | AliHLTCOMPHuffmanData * fHuffmanData; //! instance of output (Huffman Data, containing code table) | |
100 | ||
101 | /** The Specification for this component */ | |
102 | /** explicit specification of the origin of the data (transient) */ | |
103 | TString fOrigin; // input line argument to determine origin for Huffman table | |
104 | // -> no input --> default taken from incoming data | |
105 | /** explicit specification of the run number */ | |
106 | AliHLTUInt64_t fRunNumber; // input line argument to determine run number for Huffman table | |
107 | ||
108 | /** specifications of the data */ | |
109 | AliHLTUInt64_t fSpecification; // see above | |
110 | ||
111 | /** explicit path to Huffman code table which will be put out */ | |
112 | TString fTablePath; // input line argument to determine path for Huffman table | |
113 | // -> no input --> default set to current path name | |
114 | //AliHLTUInt8_t fSlice; // slice | |
115 | //AliHLTUInt8_t fPatch; // patch | |
116 | ||
117 | /** number of NRCU trailer words of input data */ | |
118 | Int_t fNRCUTrailerWords; // see above | |
119 | ||
120 | ClassDef(AliHLTCOMPHuffmanAltroCalibComponent, 0) | |
121 | ||
122 | }; | |
123 | #endif |