]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/global/AliHLTGlobalEsdConverterComponent.h
Additional libraries to link hltdimserver
[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 AliESDfriend;
23 class TTree;
24 struct AliHLTTracksData;
25 class AliTPCclusterMI;
26
27 /**
28  * @class AliHLTGlobalEsdConverterComponent
29  * Global collector for information designated for the HLT ESD.
30  *
31  * componentid: \b GlobalEsdConverter <br>
32  * componentlibrary: \b libAliHLTGlobal.so <br>
33  * Arguments: <br>
34  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
35  * \li -notree                                                          <br>
36  *      write ESD directly to output (::kAliHLTDataTypeESDObject)
37  *      this has been made the default behavior in Sep 2008.
38  * \li -tree                                                            <br>
39  *      write ESD directly to TTree and to output (::kAliHLTDataTypeESDTree)
40  * \li -skipobject=name1,name2,...                                   <br>
41  *      comma separated list of ESD object names to be skipped, default is
42  *      AliESDZDC,AliESDFMD,Cascades,Kinks,AliRawDataErrorLogs,AliESDACORDE
43  *      leave blank to disable the option
44  *
45  * @ingroup alihlt_global_components
46  */
47 class AliHLTGlobalEsdConverterComponent : public AliHLTProcessor
48 {
49  public:
50   /** standard constructor */
51   AliHLTGlobalEsdConverterComponent();
52   /** destructor */
53   virtual ~AliHLTGlobalEsdConverterComponent();
54
55   // interface methods of base class
56   const char* GetComponentID() {return "GlobalEsdConverter";};
57   void GetInputDataTypes(AliHLTComponentDataTypeList& list);
58   AliHLTComponentDataType GetOutputDataType();
59   int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
60   void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
61   AliHLTComponent* Spawn() {return new AliHLTGlobalEsdConverterComponent;}
62
63  protected:
64   // interface methods of base class
65   int DoInit(int argc, const char** argv);
66   int DoDeinit();
67   int DoEvent( const AliHLTComponentEventData& evtData,
68                AliHLTComponentTriggerData& trigData);
69
70   using AliHLTProcessor::DoEvent;
71
72   /**
73    * Process the input data blocks.
74    * @param pTree    tree to be filled
75    * @param pESD     ESD to be filled
76    * @return neg. error code if failed
77    */
78   int ProcessBlocks(TTree* pTree, AliESDEvent* pESD, AliESDfriend *pESDfriend);
79
80  // void FillBenchmarkHistos(Double_t *statistics, TString *names);
81  private:
82   /** copy constructor prohibited */
83   AliHLTGlobalEsdConverterComponent(const AliHLTGlobalEsdConverterComponent&);
84   /** assignment operator prohibited */
85   AliHLTGlobalEsdConverterComponent& operator=(const AliHLTGlobalEsdConverterComponent&);
86
87   /**
88    * (Re)Configure from the CDB
89    * Loads the following objects:
90    * - HLT/ConfigHLT/SolenoidBz
91    */
92   int Reconfigure(const char* cdbEntry, const char* chainId);
93
94   /**
95    * Configure the component.
96    * Parse a string for the configuration arguments and set the component
97    * properties.
98    */
99   int Configure(const char* arguments);
100
101   /// write object to TTree or directly
102   int fWriteTree; //!transient
103
104   /// verbosity level
105   int fVerbosity; //!transient
106
107 protected:
108
109   static const Int_t fkNPartition = 36*6;           // number of patches in TPC
110
111   /// the ESD
112   AliESDEvent* fESD; //! transient value
113
114   /// the ESD friend
115   AliESDfriend* fESDfriend; //! transient value
116
117   /// solenoid b field
118   Double_t fSolenoidBz; //! transient
119
120   Bool_t fMakeFriends; // flag to create friends
121   AliTPCclusterMI   *fPartitionClusters[fkNPartition];  //! arrays of cluster data for each TPC partition
122   Int_t              fNPartitionClusters[fkNPartition]; //! number of clusters for each TPC partition
123  
124   AliHLTComponentBenchmark fBenchmark; // benchmark
125
126   ClassDef(AliHLTGlobalEsdConverterComponent, 0)
127 };
128 #endif