]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/util/AliHLTRecoParamComponent.h
Update master to aliroot
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTRecoParamComponent.h
1 // -*- Mode: C++ -*-
2 // $Id$
3
4 #ifndef ALIHLTRECOPARAMCOMPONENT_H
5 #define ALIHLTRECOPARAMCOMPONENT_H
6 //* This file is property of and copyright by the ALICE                    * 
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"
17 #include "AliHLTOnlineConfiguration.h"
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
66   virtual void GetInputDataTypes(AliHLTComponentDataTypeList& list);
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
72   virtual void GetOCDBObjectDescription( TMap* const targetArray);
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
79   virtual int InitCalibration();
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
87   virtual int DeinitCalibration();
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
96   virtual int ShipDataToFXS( const AliHLTComponentEventData& evtData,
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
114   static const char* fgkConfigurationObject; //! component configuration object
115   
116   AliHLTOnlineConfiguration fOnlineConfig; //! online configuration object
117   int fOutputSize; //! output size estimator
118
119   ClassDef(AliHLTRecoParamComponent, 0) // Online HLT RecoParam generator component
120 };
121 #endif