]>
Commit | Line | Data |
---|---|---|
e7918895 | 1 | //-*- Mode: C++ -*- |
2 | // $Id: AliHLTVZEROAgent.h $ | |
3 | ||
4 | #ifndef ALIHLTVZEROAGENT_H | |
5 | #define ALIHLTVZEROAGENT_H | |
6 | ||
7 | /* This file is property of and copyright by the ALICE HLT Project * | |
8 | * ALICE Experiment at CERN, All rights reserved. * | |
9 | * See cxx source for full Copyright notice */ | |
10 | ||
11 | /** @file AliHLTVZEROAgent.h | |
12 | @author Jochen Thaeder <jochen@thaeder.de> | |
13 | @brief Agent of the libAliHLTVZERO library | |
14 | */ | |
15 | ||
16 | // see below for class documentation | |
17 | // or | |
18 | // refer to README to build package | |
19 | // or | |
20 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
21 | ||
22 | #include "AliHLTModuleAgent.h" | |
23 | ||
24 | /** | |
25 | * @class AliHLTVZEROAgent | |
26 | * This is the agent for the AliHLTVZERO library.<br> | |
27 | * | |
28 | * The sample agent implements all interface function provided by @ref | |
29 | * AliHLTModuleAgent : | |
30 | * - CreateConfigurations() <br> | |
31 | * The method gets an instance of the AliHLTConfigurationHanler to add | |
32 | * configurations, e.g. | |
33 | * <pre> | |
34 | * handler->CreateConfiguration("my-puplisher" , "FilePublisher", NULL , "data.bin"); | |
35 | * ... | |
36 | * handler->CreateConfiguration("my-analysis-chain" , "FileWriter", "my-processor" , "my arguments"); | |
37 | * </pre> | |
38 | * - GetReconstructionChains() <br> | |
39 | * returns a string of blank separated configurations to be run during | |
40 | * local event reconstruction. | |
41 | * <pre> | |
42 | * return "my-data-sink my-analysis-chain"; | |
43 | * </pre> | |
44 | * - GetRequiredComponentLibraries() <br> | |
45 | * returns a string of blank separated libraries which have to be loaded | |
46 | * in addition in order to load all required components. <br> | |
47 | * @note Not the right place for library dependencies. | |
48 | * <pre> | |
49 | * return "libAliHLTUtil.so"; | |
50 | * </pre> | |
51 | * - RegisterComponents() <br> | |
52 | * registers the components: AliHLTDummyComponent, AliHLTSampleComponent1, | |
53 | * AliHLTSampleComponent2, and AliHLTSampleMonitoringComponent<br> | |
54 | * - GetHandlerDescription() <br> | |
55 | * Handles HLTOUT data blocks of type {DDL_RAW,SMPL} | |
56 | * <pre> | |
57 | * if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginSample)) { | |
58 | * desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId()); | |
59 | * return 1; | |
60 | * } | |
61 | * </pre> | |
62 | * - GetOutputHandler() <br> | |
63 | * Returns handler AliHLTOUTHandlerEquId for HLTOUT data blocks of | |
64 | * type {DDL_RAW,SMPL} | |
65 | * <pre> | |
66 | * if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginSample)) { | |
67 | * return new AliHLTOUTHandlerEquId; | |
68 | * } | |
69 | * </pre> | |
70 | * - DeleteOutputHandler() <br> | |
71 | * Deletes the output handler. In this case there is no special handling | |
72 | * needed. | |
73 | * | |
74 | * In order to hook the sample library up to the HLT system on global object | |
75 | * @ref gAliHLTVZEROAgent of the agent is defined in the source code. | |
76 | * | |
77 | * @ingroup alihlt_system | |
78 | */ | |
79 | class AliHLTVZEROAgent : public AliHLTModuleAgent { | |
80 | public: | |
81 | ||
82 | /* | |
83 | * --------------------------------------------------------------------------------- | |
84 | * Constructor / Destructor | |
85 | * --------------------------------------------------------------------------------- | |
86 | */ | |
87 | ||
88 | /** | |
89 | * standard constructor. The agent is automatically registered in the | |
90 | * global agent manager | |
91 | */ | |
92 | AliHLTVZEROAgent(); | |
93 | ||
94 | /** destructor */ | |
95 | virtual ~AliHLTVZEROAgent(); | |
96 | ||
97 | /* | |
98 | * --------------------------------------------------------------------------------- | |
99 | * Public functions to implement AliHLTModuleAgent's interface. | |
100 | * These functions are required for the registration process | |
101 | * --------------------------------------------------------------------------------- | |
102 | */ | |
103 | ||
104 | /** | |
105 | * Register all configurations belonging to the VZERO library with the | |
106 | * AliHLTConfigurationHandler. | |
107 | * @param handler [in] the configuration handler | |
108 | * @param rawReader [in] AliRoot RawReader instance | |
109 | * @param runloader [in] AliRoot runloader | |
110 | * @return neg. error code if failed | |
111 | */ | |
112 | Int_t CreateConfigurations(AliHLTConfigurationHandler* handler, | |
113 | AliRawReader* rawReader=NULL, | |
114 | AliRunLoader* runloader=NULL) const; | |
115 | ||
116 | /** | |
117 | * Get the top configurations for local event reconstruction. | |
118 | * A top configuration describes a processing chain. It can simply be | |
119 | * described by the last configuration(s) in the chain. | |
120 | * @param rawReader [in] AliRoot RawReader instance | |
121 | * @param runloader [in] AliRoot runloader | |
122 | * @return string containing the top configurations separated by blanks | |
123 | */ | |
124 | const Char_t* GetReconstructionChains(AliRawReader* rawReader=NULL, | |
125 | AliRunLoader* runloader=NULL) const; | |
126 | ||
127 | /** | |
128 | * Component libraries which the configurations of this agent depend on. | |
129 | * @return list of component libraries as a blank-separated string. | |
130 | */ | |
131 | const Char_t* GetRequiredComponentLibraries() const; | |
132 | ||
133 | /** | |
134 | * Register components for the AliHLTVZERO library. | |
135 | * @param pHandler [in] instance of the component handler | |
136 | */ | |
137 | Int_t RegisterComponents(AliHLTComponentHandler* pHandler) const; | |
138 | ||
139 | /** interface function, see @ref AliHLTModuleAgent for description */ | |
140 | Int_t GetHandlerDescription(AliHLTComponentDataType dt, AliHLTUInt32_t spec, | |
141 | AliHLTOUTHandlerDesc& desc) const; | |
142 | ||
143 | /** interface function, see @ref AliHLTModuleAgent for description */ | |
144 | AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt, AliHLTUInt32_t spec); | |
145 | ||
146 | /** interface function, see @ref AliHLTModuleAgent for description */ | |
147 | Int_t DeleteOutputHandler(AliHLTOUTHandler* pInstance); | |
148 | ||
149 | /** interface function, see @ref AliHLTModuleAgent for description */ | |
150 | AliHLTModulePreprocessor* GetPreprocessor(); | |
151 | ||
152 | protected: | |
153 | ||
154 | /////////////////////////////////////////////////////////////////////////////////// | |
155 | ||
156 | private: | |
157 | ||
158 | /* | |
159 | * --------------------------------------------------------------------------------- | |
160 | * Private functions to implement AliHLTModuleAgent's interface. | |
161 | * These functions provide initialization as well as the actual processing | |
162 | * capabilities of the component. | |
163 | * --------------------------------------------------------------------------------- | |
164 | */ | |
165 | ||
166 | /** copy constructor prohibited */ | |
167 | AliHLTVZEROAgent(const AliHLTVZEROAgent&); | |
168 | ||
169 | /** assignment operator prohibited */ | |
170 | AliHLTVZEROAgent& operator=(const AliHLTVZEROAgent&); | |
171 | ||
172 | /* | |
173 | * --------------------------------------------------------------------------------- | |
174 | * Members - private | |
175 | * --------------------------------------------------------------------------------- | |
176 | */ | |
177 | ||
178 | /** ROOT specific member definition */ | |
179 | ClassDef(AliHLTVZEROAgent, 0); | |
180 | }; | |
181 | ||
182 | #endif |