0ab521d5 |
1 | // -*- Mode: C++ -*- |
2 | // $Id$ |
3 | |
4 | #ifndef ALIHLTRECOPARAMCOMPONENT_H |
5 | #define ALIHLTRECOPARAMCOMPONENT_H |
94d06b79 |
6 | //* This file is property of and copyright by the ALICE * |
0ab521d5 |
7 | //* ALICE Experiment at CERN, All rights reserved. * |
8 | //* See cxx source for full Copyright notice * |
9 | |
10 | /// @file AliHLTRecoParamComponent.h |
11 | /// @author Matthias Richter |
12 | /// @date 2010-10-18 |
13 | /// @brief Online HLT RecoParam generator component |
14 | /// |
15 | |
16 | #include "AliHLTCalibrationProcessor.h" |
f84fefa5 |
17 | #include "AliHLTOnlineConfiguration.h" |
0ab521d5 |
18 | |
19 | /** |
20 | * @class AliHLTRecoParamComponent |
21 | * Collects online configuration info and in the future other parameters |
22 | * and produces the corresponding calibration object for reconstruction of HLT. |
23 | * |
24 | * <h2>General properties:</h2> |
25 | * |
26 | * Component ID: \b RecoParamGenerator <br> |
27 | * Library: \b libAliHLTUtil.so <br> |
28 | * Input Data Types: ::kAliHLTAnyDataType <br> |
29 | * Output Data Types: none <br> |
30 | * |
31 | * <h2>Mandatory arguments:</h2> |
32 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> |
33 | * |
34 | * <h2>Optional arguments:</h2> |
35 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> |
36 | * |
37 | * <h2>Configuration:</h2> |
38 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> |
39 | * Configuration by component arguments. |
40 | * |
41 | * <h2>Default CDB entries:</h2> |
42 | * The component loads no CDB entries. |
43 | * |
44 | * <h2>Performance:</h2> |
45 | * The component does not process any event data. |
46 | * |
47 | * <h2>Memory consumption:</h2> |
48 | * The component does not process any event data. |
49 | * |
50 | * <h2>Output size:</h2> |
51 | * Depending on the mode. |
52 | * |
53 | * @ingroup alihlt_util_components |
54 | */ |
55 | class AliHLTRecoParamComponent : public AliHLTCalibrationProcessor |
56 | { |
57 | public: |
58 | /// standard constructor |
59 | AliHLTRecoParamComponent(); |
60 | /// destructor |
61 | virtual ~AliHLTRecoParamComponent(); |
62 | |
63 | /// inherited from AliHLTComponent: return id of the component. |
64 | virtual const char* GetComponentID() {return "RecoParamGenerator";}; |
65 | /// inherited from AliHLTComponent: input data types |
94d06b79 |
66 | virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list); |
0ab521d5 |
67 | /// inherited from AliHLTComponent: output data types |
68 | virtual AliHLTComponentDataType GetOutputDataType(); |
69 | /// inherited from AliHLTComponent: output data size |
70 | virtual void GetOutputDataSize(unsigned long&, double&); |
71 | /// inherited from AliHLTComponent: description of required CDB objects |
94d06b79 |
72 | virtual void GetOCDBObjectDescription( TMap* const targetArray); |
0ab521d5 |
73 | |
74 | /// inherited from AliHLTComponent: spawn function, create an instance. |
75 | virtual AliHLTComponent* Spawn() {return new AliHLTRecoParamComponent;} |
76 | |
77 | protected: |
78 | /// inherited from AliHLTCalibrationProcessor: custom initialization |
94d06b79 |
79 | virtual int InitCalibration(); |
0ab521d5 |
80 | /// inherited from AliHLTCalibrationProcessor: custom argument scan |
81 | /// the AliHLTCalibrationProcessor so far does not use the base class |
82 | /// methods for argument scan. |
83 | int ScanArgument( int argc, const char** argv ) { |
84 | int result=ScanConfigurationArgument(argc, argv); return result>0?result-1:result; |
85 | } |
86 | /// inherited from AliHLTCalibrationProcessor: cleanup |
94d06b79 |
87 | virtual int DeinitCalibration(); |
0ab521d5 |
88 | |
89 | /// inherited from AliHLTCalibrationProcessor processing |
90 | virtual int ProcessCalibration( const AliHLTComponentEventData& evtData, |
91 | AliHLTComponentTriggerData& trigData ); |
92 | |
93 | using AliHLTCalibrationProcessor::ProcessCalibration; |
94 | |
95 | /// inherited from AliHLTCalibrationProcessor processing |
94d06b79 |
96 | virtual int ShipDataToFXS( const AliHLTComponentEventData& evtData, |
0ab521d5 |
97 | AliHLTComponentTriggerData& trigData); |
98 | |
99 | using AliHLTCalibrationProcessor::ShipDataToFXS; |
100 | |
101 | /** |
102 | * Inherited from AliHLTComponent |
103 | * Scan one argument and adjacent parameters. |
104 | * @return number of scanned parameters, neg. error code if failed |
105 | */ |
106 | virtual int ScanConfigurationArgument(int argc, const char** argv); |
107 | |
108 | private: |
109 | /** copy constructor prohibited */ |
110 | AliHLTRecoParamComponent(const AliHLTRecoParamComponent&); |
111 | /** assignment operator prohibited */ |
112 | AliHLTRecoParamComponent& operator=(const AliHLTRecoParamComponent&); |
113 | |
94d06b79 |
114 | static const char* fgkConfigurationObject; //! component configuration object |
f84fefa5 |
115 | |
94d06b79 |
116 | AliHLTOnlineConfiguration fOnlineConfig; //! online configuration object |
117 | int fOutputSize; //! output size estimator |
0ab521d5 |
118 | |
119 | ClassDef(AliHLTRecoParamComponent, 0) // Online HLT RecoParam generator component |
120 | }; |
121 | #endif |