]>
Commit | Line | Data |
---|---|---|
8ef16e6a | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
3 | #ifndef ALIHLTSAMPLECALIBRATIONCOMPONENT_H | |
4 | #define ALIHLTSAMPLECALIBRATIONCOMPONENT_H | |
5 | ||
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 AliHLTSampleCalibrationComponent.h | |
11 | // @author Matthias Richter | |
12 | // @date 2010-04-26 | |
13 | // @brief A sample calibration component for the HLT. | |
14 | // | |
15 | ||
16 | #include "AliHLTCalibrationProcessor.h" | |
17 | ||
18 | class TH1S; | |
19 | ||
20 | /** | |
21 | * @class AliHLTSampleCalibrationComponent | |
22 | * An HLT calibration component example. | |
23 | * Component illustrates the basic functionality of a calibration component. | |
24 | * Calibration components analyze data with respect to certain calibration | |
25 | * issues and create calibration objects to be used in the reconstruction. | |
26 | * | |
27 | * <h2>General properties:</h2> | |
28 | * | |
29 | * Component ID: \b SampleCalibration <br> | |
30 | * Library: \b libAliHLTSample.so <br> | |
31 | * Input Data Types: @ref kAliHLTAnyDataType <br> | |
32 | * Output Data Types: none <br> | |
33 | * | |
34 | * <h2>Mandatory arguments:</h2> | |
35 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
36 | * | |
37 | * <h2>Optional configuration arguments:</h2> | |
38 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
39 | * | |
40 | * <h2>Default CDB entries:</h2> | |
41 | * The component has just one default CDB entry in | |
42 | * <tt>HLT/ConfigSample/SampleCalibration</tt>. | |
43 | * It does not load any configuration from the global <tt>ConfigHLT</tt> | |
44 | * folder. | |
45 | * \li -TObjString object holding a string with the configuration parameters | |
46 | * explained above | |
47 | * | |
48 | * <h2>Performance:</h2> | |
49 | * The component does not any event data processing. | |
50 | * | |
51 | * <h2>Memory consumption:</h2> | |
52 | * The component does not any event data processing. | |
53 | * | |
54 | * <h2>Output size:</h2> | |
55 | * The component has no output data. | |
56 | * | |
57 | * The component implements the @ref alihltcomponent-high-level-interface. | |
58 | * for data processing. | |
59 | * Apart from the normal AliHLTComponent interface functions a calibration | |
60 | * component needs to overload two functions from the AliHLTCalibrationProcessor: | |
61 | * - ProcessCalibration() invoked in the normal event loop and can be used | |
62 | * to accumulate data | |
63 | * - ShipDataToFXS() invoked at EOD to ship the final result | |
64 | * | |
65 | * @ingroup alihlt_tutorial | |
66 | */ | |
67 | class AliHLTSampleCalibrationComponent : public AliHLTCalibrationProcessor { | |
68 | public: | |
69 | AliHLTSampleCalibrationComponent(); | |
70 | virtual ~AliHLTSampleCalibrationComponent(); | |
71 | ||
72 | // AliHLTComponent interface functions | |
73 | const char* GetComponentID(); | |
74 | void GetInputDataTypes( vector<AliHLTComponentDataType>& list); | |
75 | AliHLTComponentDataType GetOutputDataType(); | |
76 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); | |
77 | void GetOCDBObjectDescription( TMap* const targetArray); | |
78 | ||
79 | // Spawn function, return new class instance | |
80 | AliHLTComponent* Spawn(); | |
81 | ||
82 | protected: | |
83 | // AliHLTComponent interface functions | |
84 | int DoInit( int argc, const char** argv ); | |
85 | int DoDeinit(); | |
86 | int ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); | |
87 | int ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); | |
88 | int ScanConfigurationArgument(int argc, const char** argv); | |
89 | int Reconfigure(const char* cdbEntry, const char* chainId); | |
90 | int ReadPreprocessorValues(const char* modules); | |
91 | ||
92 | using AliHLTCalibrationProcessor::ProcessCalibration; | |
93 | using AliHLTCalibrationProcessor::ShipDataToFXS; | |
94 | ||
95 | private: | |
96 | /** copy constructor prohibited */ | |
97 | AliHLTSampleCalibrationComponent(const AliHLTSampleCalibrationComponent&); | |
98 | /** assignment operator prohibited */ | |
99 | AliHLTSampleCalibrationComponent& operator=(const AliHLTSampleCalibrationComponent&); | |
100 | ||
101 | /// output size estimator, updated during the event processing | |
102 | int fOutputSize; //!transient | |
103 | ||
104 | /// test histogram | |
105 | TH1S* fHisto; //! transient | |
106 | /// histogram range | |
107 | int fHistoRange; //! transient | |
108 | ||
109 | // version no 0 -> no streamer for member variables | |
110 | ClassDef(AliHLTSampleCalibrationComponent, 0) | |
111 | }; | |
112 | #endif |