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