]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/SampleLib/AliHLTSampleESDAnalysisComponent.h
adding an example calibration component and corresponding macro
[u/mrichter/AliRoot.git] / HLT / SampleLib / AliHLTSampleESDAnalysisComponent.h
1 //-*- Mode: C++ -*-
2 // $Id$
3 #ifndef ALIHLTSAMPLEESDANALYSISCOMPONENT_H
4 #define ALIHLTSAMPLEESDANALYSISCOMPONENT_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   AliHLTSampleESDAnalysisComponent.h
11 //  @author Matthias Richter
12 //  @date   2010-04-17
13 //  @brief  A sample processing component for ESD analysis.
14 //  @ingroup alihlt_tutorial
15
16 #include "AliHLTProcessor.h"
17
18 /**
19  * @class AliHLTSampleESDAnalysisComponent
20  * An example how to implement an HLT ESD analysis component.
21  * The class features the AliHLTComponent interface for HLT processing
22  * components. The interface allows to run such components in either
23  * the (sequential) AliSimulation/AliReconstruction framework or the
24  * parallel HLT online processing framework.
25  *
26  * An example to run the component can be found in macro sampleEsdAnalysis.C
27  * in the folder HLT/exa.
28  *
29  * Component fetches the ESD from the input objects, loops over tracks and
30  * publishes the tracks in a TObjArray of AliESDtrack.
31  *
32  * <h2>General properties:</h2>
33  *
34  * Component ID: \b Sample-ESDAnalysis <br>
35  * Library: \b libAliHLTSample.so     <br>
36  * Input Data Types: @ref kAliHLTDataTypeESDObject <br>
37  * Output Data Types: @ref kAliHLTDataTypeTObjArray|kAliHLTDataOriginSample
38  *                         {ROOTOBAR:SMPL} <br>
39  *
40  * <h2>Mandatory arguments:</h2>
41  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
42  * Argument scan is implemented in the function ScanConfigurationArgument().
43  * see @ref alihltcomponent-initialization-ocdb.
44  * Please provide specific descriptions and implementations.
45  * \li -mandatory1     <i> teststring   </i> <br>
46  *      an argument with one parameter
47  *
48  * <h2>Optional arguments:</h2>
49  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
50  * \li -optional1      <i> teststring   </i> <br>
51  *      an argument with one parameter
52  * \li -optional2                            <br>
53  *      an argument without parameters
54  *
55  * <h2>Configuration:</h2>
56  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
57  *
58  * <h2>Default CDB entries:</h2>
59  * The component has just one default CDB entry in 
60  * <tt>HLT/ConfigSample/SampleESDAnalysis</tt>.
61  * It does not load any configuration from the global <tt>ConfigHLT</tt>
62  * folder.
63  * \li -TObjString object holding a string with the configuration parameters
64  *      explained above
65  *
66  * <h2>Performance:</h2>
67  * The component does not any event data processing.
68  *
69  * <h2>Memory consumption:</h2>
70  * The component does not any event data processing.
71  *
72  * <h2>Output size:</h2>
73  * The component has no output data.
74  *
75  *
76  * @ingroup alihlt_tutorial
77  */
78 class AliHLTSampleESDAnalysisComponent : public AliHLTProcessor {
79 public:
80   AliHLTSampleESDAnalysisComponent();
81   virtual ~AliHLTSampleESDAnalysisComponent();
82
83   // AliHLTComponent interface functions
84   const char* GetComponentID();
85   void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
86   AliHLTComponentDataType GetOutputDataType();
87   void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
88   void GetOCDBObjectDescription( TMap* const targetMap);
89
90   // Spawn function, return new class instance
91   AliHLTComponent* Spawn();
92
93  protected:
94   // AliHLTComponent interface functions
95   int DoInit( int argc, const char** argv );
96   int DoDeinit();
97   int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
98   int ScanConfigurationArgument(int argc, const char** argv);
99   int Reconfigure(const char* cdbEntry, const char* chainId);
100   int ReadPreprocessorValues(const char* modules);
101
102   using AliHLTProcessor::DoEvent;
103
104 private:
105   /** copy constructor prohibited */
106   AliHLTSampleESDAnalysisComponent(const AliHLTSampleESDAnalysisComponent&);
107   /** assignment operator prohibited */
108   AliHLTSampleESDAnalysisComponent& operator=(const AliHLTSampleESDAnalysisComponent&);
109
110   ClassDef(AliHLTSampleESDAnalysisComponent, 0)
111 };
112 #endif