]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliHLTGlobalEsdConverterComponent.h
4f082076aa1a65888ff035f983de58c169427564
[u/mrichter/AliRoot.git] / HLT / global / AliHLTGlobalEsdConverterComponent.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 #ifndef ALIHLTGLOBALESDCONVERTERCOMPONENT_H
5 #define ALIHLTGLOBALESDCONVERTERCOMPONENT_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                               *
9
10 //  @file   AliHLTGlobalEsdConverterComponent.h
11 //  @author Matthias Richter
12 //  @date   
13 //  @brief  Global ESD converter component.
14 //  @note
15
16 #include "AliHLTProcessor.h"
17 #include "AliHLTComponentBenchmark.h"
18 #include <vector>
19
20 // forward declarations
21 class AliESDEvent;
22 class TTree;
23 struct AliHLTTracksData;
24
25 /**
26  * @class AliHLTGlobalEsdConverterComponent
27  * Global collector for information designated for the HLT ESD.
28  *
29  * componentid: \b GlobalEsdConverter <br>
30  * componentlibrary: \b libAliHLTGlobal.so <br>
31  * Arguments: <br>
32  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
33  * \li -notree                                                          <br>
34  *      write ESD directly to output (::kAliHLTDataTypeESDObject)
35  *      this has been made the default behavior in Sep 2008.
36  * \li -tree                                                            <br>
37  *      write ESD directly to TTree and to output (::kAliHLTDataTypeESDTree)
38  * \li -skipobject=name1,name2,...                                   <br>
39  *      comma separated list of ESD object names to be skipped, default is
40  *      AliESDZDC,AliESDFMD,Cascades,Kinks,AliRawDataErrorLogs,AliESDACORDE
41  *      leave blank to disable the option
42  *
43  * @ingroup alihlt_global_components
44  */
45 class AliHLTGlobalEsdConverterComponent : public AliHLTProcessor
46 {
47  public:
48   /** standard constructor */
49   AliHLTGlobalEsdConverterComponent();
50   /** destructor */
51   virtual ~AliHLTGlobalEsdConverterComponent();
52
53   // interface methods of base class
54   const char* GetComponentID() {return "GlobalEsdConverter";};
55   void GetInputDataTypes(AliHLTComponentDataTypeList& list);
56   AliHLTComponentDataType GetOutputDataType();
57   void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
58   AliHLTComponent* Spawn() {return new AliHLTGlobalEsdConverterComponent;}
59
60  protected:
61   // interface methods of base class
62   int DoInit(int argc, const char** argv);
63   int DoDeinit();
64   int DoEvent( const AliHLTComponentEventData& evtData,
65                AliHLTComponentTriggerData& trigData);
66
67   using AliHLTProcessor::DoEvent;
68
69   /**
70    * Process the input data blocks.
71    * @param pTree    tree to be filled
72    * @param pESD     ESD to be filled
73    * @return neg. error code if failed
74    */
75   int ProcessBlocks(TTree* pTree, AliESDEvent* pESD);
76
77  // void FillBenchmarkHistos(Double_t *statistics, TString *names);
78  private:
79   /** copy constructor prohibited */
80   AliHLTGlobalEsdConverterComponent(const AliHLTGlobalEsdConverterComponent&);
81   /** assignment operator prohibited */
82   AliHLTGlobalEsdConverterComponent& operator=(const AliHLTGlobalEsdConverterComponent&);
83
84   /**
85    * (Re)Configure from the CDB
86    * Loads the following objects:
87    * - HLT/ConfigHLT/SolenoidBz
88    */
89   int Reconfigure(const char* cdbEntry, const char* chainId);
90
91   /**
92    * Configure the component.
93    * Parse a string for the configuration arguments and set the component
94    * properties.
95    */
96   int Configure(const char* arguments);
97
98   /// write object to TTree or directly
99   int fWriteTree; //!transient
100
101   /// verbosity level
102   int fVerbosity; //!transient
103
104 protected:
105
106   /// the ESD
107   AliESDEvent* fESD; //! transient value
108
109   /// solenoid b field
110   Double_t fSolenoidBz; //! transient
111   AliHLTComponentBenchmark fBenchmark; // benchmark
112
113   ClassDef(AliHLTGlobalEsdConverterComponent, 0)
114 };
115 #endif