3 #ifndef ALIHLTCOMPHUFFMANALTROCALIBCOMPONENT_H
4 #define ALIHLTCOMPHUFFMANALTROCALIBCOMPONENT_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 AliHLTCOMPHuffmanAltroCalibComponent.h
11 @author Jochen Thaeder
12 @author extended by Jenny Wagner
14 @brief A calibration component for the Huffman code creator
17 #include "AliHLTCalibrationProcessor.h"
19 class AliHLTCOMPHuffmanAltro;
20 class AliHLTCOMPHuffmanData;
23 * @class AliHLTCOMPHuffmanAltroCalibComponent
24 * This class is the calibration component for the AliTPCCalibHuffmanAltro class
25 * used for calibration of the Huffman code table (which is created here).
27 * <h2>General properties:</h2>
29 * Component ID: \b HuffmanAltroCalibComponent <br>
30 * Library: \b libAliHLTComp.so <br>
31 * Input Data Types: ::kAliHLTDataTypeDDLRaw <br>
32 * Output Data Types: AliHLTCompDefinitions::fgkHuffmanAltroCalDataType <br>
34 * <h2>Mandatory arguments:</h2>
35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
36 * \li -origin <i> detector </i> <br>
37 * set origin of data for code creation to specify output table (parameter transient)
38 * \li -runnumber <i> decimal number </i> <br>
39 * set runnumber to specify output table (parameter transient)
40 * \li -dataspec <i> 0xYYXXaabb </i> <br>
41 * set usual HLT dataspec (last slice, first slice, last patch, first patch)_Hexadezimal to specify output table
42 * \li -trailerwords <i> decimal number </i> <br>
43 * set number of trailerwords of incoming data (ranging from 1 to 3)
45 * <h2>Optional arguments:</h2>
46 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
47 * \li -tablepath <i> path to Huffman code table </i> <br>
48 * set path to out put Huffman code table as root file, if no path is given,
49 * output path is set to current path (parameter transient)
51 * It inherits from the @ref AliHLTCalibrationProcessor and uses the high-level
52 * interface. The output is the class AliHLTCOMPHuffmanData as a TObject which
53 * is written to the data base
55 * @ingroup alihlt_comp_components
57 class AliHLTCOMPHuffmanAltroCalibComponent : public AliHLTCalibrationProcessor
61 AliHLTCOMPHuffmanAltroCalibComponent();
64 virtual ~AliHLTCOMPHuffmanAltroCalibComponent();
66 // Public functions to implement AliHLTComponent's interface.
67 // These functions are required for the registration process
69 const char* GetComponentID();
70 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
71 AliHLTComponentDataType GetOutputDataType();
72 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
73 AliHLTComponent* Spawn();
77 // Protected functions to implement AliHLTComponent's interface.
78 // These functions provide initialization as well as the actual processing
79 // capabilities of the component.
81 /** Initialize the calibration component. */
82 Int_t InitCalibration();
84 /** Scan commandline arguments of the calibration component. */
85 Int_t ScanArgument( Int_t argc, const char** argv );
87 /** DeInitialize the calibration component. */
88 Int_t DeinitCalibration();
90 /** Process the data in the calibration component. */
91 Int_t ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
93 /** Ship the data to the FXS at end of run or eventmodulo. */
94 Int_t ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
98 /** copy constructor prohibited */
99 AliHLTCOMPHuffmanAltroCalibComponent(const AliHLTCOMPHuffmanAltroCalibComponent&);
101 /** assignment operator prohibited */
102 AliHLTCOMPHuffmanAltroCalibComponent& operator=(const AliHLTCOMPHuffmanAltroCalibComponent&);
104 /** Huffman compressor class */
105 AliHLTCOMPHuffmanAltro * fHuffmanCompressor; //! instance of Huffman Compressor in this component
107 /** pointer to output Huffman code table and occurrence table (togehter in this class) */
108 AliHLTCOMPHuffmanData * fHuffmanData; //! instance of output (Huffman Data, containing code table)
110 /** The Specification for this component */
111 /** explicit specification of the origin of the data (transient) */
112 TString fOrigin; // input line argument to determine origin for Huffman table
113 // -> no input --> default taken from incoming data
114 /** explicit specification of the run number */
115 AliHLTUInt64_t fRunNumber; // input line argument to determine run number for Huffman table
117 /** specifications of the data */
118 AliHLTUInt64_t fSpecification; // see above
120 /** explicit path to Huffman code table which will be put out */
121 TString fTablePath; // input line argument to determine path for Huffman table
122 // -> no input --> default set to current path name
123 //AliHLTUInt8_t fSlice; // slice
124 //AliHLTUInt8_t fPatch; // patch
126 /** number of NRCU trailer words of input data */
127 Int_t fNRCUTrailerWords; // see above
129 ClassDef(AliHLTCOMPHuffmanAltroCalibComponent, 0)