]>
Commit | Line | Data |
---|---|---|
a655eae3 | 1 | //-*- Mode: C++ -*- |
45c0a780 | 2 | // $Id$ |
f23a6e1a | 3 | |
4 | #ifndef ALIHLTCOMPONENT_H | |
5 | #define ALIHLTCOMPONENT_H | |
45c0a780 | 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 * | |
f23a6e1a | 9 | |
bfccbf68 | 10 | /** @file AliHLTComponent.h |
11 | @author Matthias Richter, Timm Steinbeck | |
12 | @date | |
b22e91eb | 13 | @brief Base class declaration for HLT components. |
14 | @note The class is both used in Online (PubSub) and Offline (AliRoot) | |
15 | context | |
45c0a780 | 16 | */ |
30338a30 | 17 | |
b22e91eb | 18 | /** |
19 | * @defgroup alihlt_component Component handling of the HLT module | |
45c0a780 | 20 | * This section describes the the component base classes and handling for |
21 | * the HLT module. | |
22 | * | |
23 | * @section alihlt_component_intro General remarks | |
24 | * HLT analysis is organized in so called components. Each component can | |
25 | * subscribe to the data produced by other components and can from the | |
26 | * analysis publish new data for the subsequent components. Only the | |
27 | * input data blocks and entries from CDB are available for the analysis. | |
28 | * | |
fb345ed7 | 29 | * @section alihlt_component_implementation Component implementation |
45c0a780 | 30 | * AliHLTComponent provides the interface for all components, see there |
31 | * for details. Three types are provided: | |
32 | * - AliHLTProcessor | |
33 | * - AliHLTDataSource | |
34 | * - AliHLTDataSink | |
35 | * | |
36 | * The two last represent data sinks and sources for the HLT integration | |
37 | * into AliRoot. When running only, only the processors are relevant, | |
38 | * sources and sinks are provided by the HLT PubSub framework. Please check | |
39 | * AliHLTComponent for detailed description. | |
40 | * | |
41 | * @section alihlt_component_registration Component registration | |
42 | * Components need to be registered with the AliHLTComponentHandler in | |
43 | * order to be used with the system. Registration is purely done from the | |
44 | * module library. Two methods are possible: | |
45 | * - the module library implements an AliHLTModuleAgent and overloads the | |
46 | * AliHLTModuleAgent::RegisterComponents() function | |
47 | * - in the implementation file, one object is defined. The global object is | |
48 | * automatically instantiated when the library is loaded for the first | |
49 | * time and the object is used for registration. | |
50 | * | |
51 | * In both cases, the library must be loaded via the method | |
52 | * <pre> | |
53 | * AliHLTComponentHandler::LoadComponentLibraries() | |
54 | * </pre> | |
55 | * For the global object approach it is important that the library is | |
56 | * not loaded elsewhere before (e.g. a gSystem->Load operation in your | |
57 | * rootlogon.C). | |
58 | * | |
59 | * | |
b22e91eb | 60 | */ |
8ede8717 | 61 | |
62 | #include <vector> | |
9ce4bf4a | 63 | #include <string> |
5ec8e281 | 64 | #include "AliHLTLogging.h" |
f23a6e1a | 65 | #include "AliHLTDataTypes.h" |
1ac82ce6 | 66 | #include "AliHLTCommonCDBEntries.h" |
f23a6e1a | 67 | |
2d7ff710 | 68 | /* Matthias Dec 2006 |
69 | * The names have been changed for Aliroot's coding conventions sake | |
70 | * The old names are defined for backward compatibility with the | |
71 | * stand alone SampleLib package | |
72 | */ | |
73 | typedef AliHLTComponentLogSeverity AliHLTComponent_LogSeverity; | |
74 | typedef AliHLTComponentEventData AliHLTComponent_EventData; | |
75 | typedef AliHLTComponentShmData AliHLTComponent_ShmData; | |
76 | typedef AliHLTComponentDataType AliHLTComponent_DataType; | |
77 | typedef AliHLTComponentBlockData AliHLTComponent_BlockData; | |
78 | typedef AliHLTComponentTriggerData AliHLTComponent_TriggerData; | |
79 | typedef AliHLTComponentEventDoneData AliHLTComponent_EventDoneData; | |
80 | ||
f23a6e1a | 81 | class AliHLTComponentHandler; |
a655eae3 | 82 | class TObjArray; |
90ebac25 | 83 | class TStopwatch; |
2be3f004 | 84 | class AliHLTComponent; |
79c114b5 | 85 | class AliHLTMemoryFile; |
f23a6e1a | 86 | |
2be3f004 | 87 | /** list of component data type structures */ |
88 | typedef vector<AliHLTComponentDataType> AliHLTComponentDataTypeList; | |
89 | /** list of component block data structures */ | |
90 | typedef vector<AliHLTComponentBlockData> AliHLTComponentBlockDataList; | |
a0aeb701 | 91 | /** list of component statistics struct */ |
92 | typedef vector<AliHLTComponentStatistics> AliHLTComponentStatisticsList; | |
2be3f004 | 93 | /** list of component pointers */ |
94 | typedef vector<AliHLTComponent*> AliHLTComponentPList; | |
95 | /** list of memory file pointers */ | |
96 | typedef vector<AliHLTMemoryFile*> AliHLTMemoryFilePList; | |
97 | ||
bfccbf68 | 98 | /** |
99 | * @class AliHLTComponent | |
100 | * Base class of HLT data processing components. | |
101 | * The class provides a common interface for HLT data processing components. | |
102 | * The interface can be accessed from the online HLT framework or the AliRoot | |
103 | * offline analysis framework. | |
a655eae3 | 104 | * @section alihltcomponent-properties Component identification and properties |
105 | * Each component must provide a unique ID, input and output data type indications, | |
106 | * and a spawn function. | |
107 | * @subsection alihltcomponent-req-methods Required property methods | |
108 | * - @ref GetComponentID | |
109 | * - @ref GetInputDataTypes (see @ref alihltcomponent-type for default | |
110 | * implementations.) | |
111 | * - @ref GetOutputDataType (see @ref alihltcomponent-type for default | |
112 | * implementations.) | |
113 | * - @ref GetOutputDataSize (see @ref alihltcomponent-type for default | |
114 | * implementations.) | |
115 | * - @ref Spawn | |
bfccbf68 | 116 | * |
a655eae3 | 117 | * @subsection alihltcomponent-opt-mehods Optional handlers |
118 | * - @ref DoInit | |
119 | * - @ref DoDeinit | |
de6593d0 | 120 | * - @ref GetOutputDataTypes |
121 | * If the component has multiple output data types @ref GetOutputDataType | |
122 | * should return @ref kAliHLTMultipleDataType. The framework will invoke | |
123 | * @ref GetOutputDataTypes, a list can be filled. | |
a655eae3 | 124 | * |
125 | * @subsection alihltcomponent-processing-mehods Data processing | |
126 | * | |
127 | * | |
128 | * @subsection alihltcomponent-type Component type | |
129 | * Components can be of type | |
90ebac25 | 130 | * - @ref kSource components which only produce data |
131 | * - @ref kProcessor components which consume and produce data | |
132 | * - @ref kSink components which only consume data | |
a655eae3 | 133 | * |
134 | * where data production and consumption refer to the analysis data stream. In | |
135 | * order to indicate the type, a child component can overload the | |
136 | * @ref GetComponentType function. | |
137 | * @subsubsection alihltcomponent-type-std Standard implementations | |
138 | * Components in general do not need to implement this function, standard | |
139 | * implementations of the 3 types are available: | |
140 | * - AliHLTDataSource for components of type @ref kSource <br> | |
141 | * All types of data sources can inherit from AliHLTDataSource and must | |
142 | * implement the @ref AliHLTDataSource::GetEvent method. The class | |
143 | * also implements a standard method for @ref GetInputDataTypes. | |
144 | * | |
145 | * - AliHLTProcessor for components of type @ref kProcessor <br> | |
48abe484 | 146 | * All types of data processors can inherit from AliHLTProcessor and must |
a655eae3 | 147 | * implement the @ref AliHLTProcessor::DoEvent method. |
148 | * | |
149 | * - AliHLTDataSink for components of type @ref kSink <br> | |
48abe484 | 150 | * All types of data processors can inherit from AliHLTDataSink and must |
a655eae3 | 151 | * implement the @ref AliHLTDataSink::DumpEvent method. The class |
152 | * also implements a standard method for @ref GetOutputDataType and @ref | |
153 | * GetOutputDataSize. | |
154 | * | |
155 | * @subsection alihltcomponent-environment Running environment | |
bfccbf68 | 156 | * |
157 | * In order to adapt to different environments (on-line/off-line), the component | |
158 | * gets an environment structure with function pointers. The base class provides | |
159 | * member functions for those environment dependend functions. The member | |
160 | * functions are used by the component implementation and are re-mapped to the | |
161 | * corresponding functions. | |
b6800be0 | 162 | * |
a655eae3 | 163 | * @section alihltcomponent-interfaces Component interfaces |
164 | * Each of the 3 standard component base classes AliHLTProcessor, AliHLTDataSource | |
165 | * and AliHLTDataSink provides it's own processing method (see | |
166 | * @ref alihltcomponent-type-std), which splits into a high and a low-level | |
167 | * method. For the @ref alihltcomponent-low-level-interface, all parameters are | |
48abe484 | 168 | * shipped as function arguments, the component is supposed to write data to the |
a655eae3 | 169 | * output buffer and handle all block descriptors. |
170 | * The @ref alihltcomponent-high-level-interface is the standard processing | |
171 | * method and will be used whenever the low-level method is not overloaded. | |
172 | * | |
b6800be0 | 173 | * In both cases it is necessary to calculate/estimate the size of the output |
174 | * buffer before the processing. Output buffers can never be allocated inside | |
175 | * the component because of the push-architecture of the HLT. | |
176 | * For that reason the @ref GetOutputDataSize function should return a rough | |
177 | * estimatian of the data to be produced by the component. The component is | |
178 | * responsible for checking the memory size and must return -ENOSPC if the | |
48abe484 | 179 | * available buffer is too small, and update the estimator respectively. The |
b6800be0 | 180 | * framework will allocate a buffer of appropriate size and call the processing |
181 | * again. | |
182 | * | |
b426991e | 183 | * @subsection alihltcomponent-error-codes Data processing |
184 | * For return codes, the following scheme applies: | |
185 | * - The data processing methods have to indicate error conditions by a negative | |
186 | * error/return code. Preferably the system error codes are used like | |
187 | * e.g. -EINVAL. This requires to include the header | |
188 | * <pre> | |
616eb170 | 189 | * \#include \<cerrno\> |
b426991e | 190 | * </pre> |
191 | * - If no suitable input block could be found (e.g. no clusters for the TPC cluster | |
192 | * finder) set size to 0, block list is empty, return 0 | |
193 | * - If no ususable or significant signal could be found in the input blocks | |
194 | * return an empty output block, set size accordingly, and return 0. An empty output | |
195 | * block here could be either a real empty one of size 0 (in which case size also | |
196 | * would have to be set to zero) or a block filled with just the minimum necessary | |
197 | * accounting/meta-structures. E.g. in the TPC | |
198 | * | |
a655eae3 | 199 | * @subsection alihltcomponent-high-level-interface High-level interface |
200 | * The high-level component interface provides functionality to exchange ROOT | |
201 | * structures between components. In contrast to the | |
202 | * @ref alihltcomponent-low-level-interface, a couple of functions can be used | |
203 | * to access data blocks of the input stream | |
204 | * and send data blocks or ROOT TObject's to the output stream. The functionality | |
205 | * is hidden from the user and is implemented by using ROOT's TMessage class. | |
206 | * | |
207 | * @subsubsection alihltcomponent-high-level-int-methods Interface methods | |
208 | * The interface provides a couple of methods in order to get objects from the | |
209 | * input, data blocks (non TObject) from the input, and to push back objects and | |
210 | * data blocks to the output. For convenience there are several functions of | |
211 | * identical name (and similar behavior) with different parameters defined. | |
212 | * Please refer to the function documentation. | |
213 | * - @ref GetNumberOfInputBlocks <br> | |
214 | * return the number of data blocks in the input stream | |
215 | * - @ref GetFirstInputObject <br> | |
216 | * get the first object of a specific data type | |
217 | * - @ref GetNextInputObject <br> | |
218 | * get the next object of same data type as last GetFirstInputObject/Block call | |
219 | * - @ref GetFirstInputBlock <br> | |
220 | * get the first block of a specific data type | |
221 | * - @ref GetNextInputBlock <br> | |
222 | * get the next block of same data type as last GetFirstInputBlock/Block call | |
223 | * - @ref PushBack <br> | |
224 | * insert an object or data buffer into the output | |
225 | * - @ref CreateEventDoneData <br> | |
226 | * add event information to the output | |
227 | * | |
228 | * In addition, the processing methods are simplified a bit by cutting out most of | |
79c114b5 | 229 | * the parameters. |
230 | * @see | |
231 | * - @ref AliHLTProcessor::DoEvent | |
232 | * - @ref AliHLTDataSource::GetEvent | |
233 | * - @ref AliHLTDataSink::DumpEvent | |
a655eae3 | 234 | * |
8451168b | 235 | * \em IMPORTANT: objects and block descriptors provided by the high-level interface |
236 | * <b>MUST NOT BE DELETED</b> by the caller. | |
237 | * | |
a655eae3 | 238 | * @subsubsection alihltcomponent-high-level-int-guidelines High-level interface guidelines |
239 | * - Structures must inherit from the ROOT object base class TObject in order be | |
240 | * transported by the transportation framework. | |
241 | * - all pointer members must be transient (marked <tt>//!</tt> behind the member | |
242 | * definition), i.e. will not be stored/transported, or properly marked | |
243 | * (<tt>//-></tt>) in order to call the streamer of the object the member is pointing | |
244 | * to. The latter is not recomended. Structures to be transported between components | |
245 | * should be streamlined. | |
246 | * - no use of stl vectors/strings, use appropriate ROOT classes instead | |
247 | * | |
248 | * @subsection alihltcomponent-low-level-interface Low-level interface | |
249 | * The low-level component interface consists of the specific data processing | |
250 | * methods for @ref AliHLTProcessor, @ref AliHLTDataSource, and @ref AliHLTDataSink. | |
251 | * - @ref AliHLTProcessor::DoEvent | |
252 | * - @ref AliHLTDataSource::GetEvent | |
253 | * - @ref AliHLTDataSink::DumpEvent | |
254 | * | |
255 | * | |
256 | * @section alihltcomponent-handling Component handling | |
257 | * The handling of HLT analysis components is carried out by the AliHLTComponentHandler. | |
258 | * Component are registered automatically at load-time of the component shared library | |
259 | * under the following suppositions: | |
260 | * - the component library has to be loaded from the AliHLTComponentHandler using the | |
261 | * @ref AliHLTComponentHandler::LoadLibrary method. | |
262 | * - the component implementation defines one global object (which is generated | |
263 | * when the library is loaded) | |
264 | * | |
265 | * @subsection alihltcomponent-design-rules General design considerations | |
266 | * The analysis code should be implemented in one or more destict class(es). A | |
267 | * \em component should be implemented which interface the destict analysis code to the | |
268 | * component interface. This component generates the analysis object dynamically. <br> | |
269 | * | |
270 | * Assume you have an implemetation <tt> AliHLTDetMyAnalysis </tt>, another class <tt> | |
271 | * AliHLTDetMyAnalysisComponent </tt> contains: | |
272 | * <pre> | |
273 | * private: | |
274 | * AliHLTDetMyAnalysis* fMyAnalysis; //! | |
275 | * </pre> | |
276 | * The object should then be instantiated in the DoInit handler of | |
277 | * <tt>AliHLTDetMyAnalysisComponent </tt>, and cleaned in the DoDeinit handler. | |
278 | * | |
279 | * Further rules: | |
280 | * - avoid big static arrays in the component, allocate the memory at runtime | |
281 | * | |
9ace7282 | 282 | * @section alihlt_component_arguments Default arguments |
283 | * The component base class provides some default arguments: | |
284 | * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting --> | |
285 | * \li -object-compression=level <br> | |
286 | * compression level for ROOT objects, default is defined by | |
287 | * @ref ALIHLTCOMPONENT_DEFAULT_OBJECT_COMPRESSION | |
288 | * | |
b22e91eb | 289 | * @ingroup alihlt_component |
a655eae3 | 290 | * @section alihltcomponent-members Class members |
bfccbf68 | 291 | */ |
5ec8e281 | 292 | class AliHLTComponent : public AliHLTLogging { |
f23a6e1a | 293 | public: |
bfccbf68 | 294 | /** standard constructor */ |
f23a6e1a | 295 | AliHLTComponent(); |
bfccbf68 | 296 | /** standard destructor */ |
f23a6e1a | 297 | virtual ~AliHLTComponent(); |
298 | ||
bfccbf68 | 299 | /** component type definitions */ |
f23a6e1a | 300 | enum TComponentType { kUnknown=0, kSource=1, kProcessor=2, kSink=3 }; |
bfccbf68 | 301 | |
302 | /** | |
303 | * Init function to prepare data processing. | |
304 | * Initialization of common data structures for a sequence of events. | |
305 | * The call is redirected to the internal method @ref DoInit which can be | |
306 | * overridden by the child class.<br> | |
307 | * During Init also the environment structure is passed to the component. | |
308 | * @param environ environment pointer with environment dependend function | |
309 | * calls | |
70ed7d01 | 310 | * @param environParam additionel parameter for function calls, the pointer |
bfccbf68 | 311 | * is passed as it is |
312 | * @param argc size of the argument array | |
313 | * @param argv agument array for component initialization | |
314 | */ | |
a3c9b745 | 315 | virtual int Init( const AliHLTAnalysisEnvironment* environ, void* environParam, int argc, const char** argv ); |
bfccbf68 | 316 | |
317 | /** | |
318 | * Clean-up function to terminate data processing. | |
319 | * Clean-up of common data structures after data processing. | |
320 | * The call is redirected to the internal method @ref DoDeinit which can be | |
321 | * overridden by the child class. | |
322 | */ | |
f23a6e1a | 323 | virtual int Deinit(); |
bfccbf68 | 324 | |
325 | /** | |
326 | * Processing of one event. | |
3cde846d | 327 | * The method is the entrance of the event processing. The parameters are |
328 | * cached for uses with the high-level interface and the DoProcessing | |
329 | * implementation is called. | |
330 | * | |
331 | * @param evtData | |
332 | * @param blocks | |
333 | * @param trigData | |
334 | * @param outputPtr | |
335 | * @param size | |
336 | * @param outputBlockCnt out: size of the output block array, set by the component | |
337 | * @param outputBlocks out: the output block array is allocated internally | |
338 | * @param edd | |
339 | * @return neg. error code if failed | |
340 | */ | |
341 | int ProcessEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, | |
342 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, | |
343 | AliHLTUInt32_t& size, AliHLTUInt32_t& outputBlockCnt, | |
344 | AliHLTComponentBlockData*& outputBlocks, | |
345 | AliHLTComponentEventDoneData*& edd ); | |
346 | ||
347 | /** | |
348 | * Internal processing of one event. | |
bfccbf68 | 349 | * The method is pure virtual and implemented by the child classes |
350 | * - @ref AliHLTProcessor | |
351 | * - @ref AliHLTDataSource | |
352 | * - @ref AliHLTDataSink | |
353 | * | |
354 | * @param evtData | |
355 | * @param blocks | |
356 | * @param trigData | |
357 | * @param outputPtr | |
358 | * @param size | |
2d7ff710 | 359 | * @param outputBlocks out: the output block array is allocated internally |
bfccbf68 | 360 | * @param edd |
361 | * @return neg. error code if failed | |
362 | */ | |
3cde846d | 363 | virtual int DoProcessing( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, |
8ede8717 | 364 | AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, |
a655eae3 | 365 | AliHLTUInt32_t& size, |
2be3f004 | 366 | AliHLTComponentBlockDataList& outputBlocks, |
8ede8717 | 367 | AliHLTComponentEventDoneData*& edd ) = 0; |
f23a6e1a | 368 | |
579d9eb7 | 369 | /** |
370 | * Init the CDB. | |
371 | * The function must not be called when running in AliRoot unless it it | |
372 | * really wanted. The CDB path will be set to the specified path, which might | |
373 | * override the path initialized at the beginning of the AliRoot reconstruction. | |
374 | * | |
375 | * The method is used from the external interface in order to set the correct | |
82c58a87 | 376 | * path when running on-line. The function also initializes the function |
377 | * callback for setting the run no during operation. | |
378 | * | |
379 | * A separation of library and component handling is maybe appropriate in the | |
380 | * future. Using the global component handler here is maybe not the cleanest | |
381 | * solution. | |
382 | * @param cdbPath path of the CDB | |
383 | * @param pHandler the component handler used for llibrary handling. | |
579d9eb7 | 384 | */ |
82c58a87 | 385 | int InitCDB(const char* cdbPath, AliHLTComponentHandler* pHandler); |
579d9eb7 | 386 | |
387 | /** | |
388 | * Set the run no for the CDB. | |
389 | * The function must not be called when running in AliRoot unless it it | |
390 | * really wanted. The CDB path will be set to the specified path, which might | |
391 | * override the run no initialized at the beginning of the AliRoot reconstruction. | |
45c0a780 | 392 | * InitCDB() has to be called before in order to really change the CDB settings. |
579d9eb7 | 393 | * |
394 | * The method is used from the external interface in order to set the correct | |
395 | * path when running on-line. | |
396 | */ | |
397 | int SetCDBRunNo(int runNo); | |
398 | ||
45c0a780 | 399 | /** |
400 | * Set the run description. | |
401 | * The run description is set before the call of Init() -> DoInit(). | |
402 | * @note: This functionality has been added in Juli 2008. The transmission of | |
403 | * run properties by a special SOR (SOD event in DAQ terminalogy but this was | |
404 | * changed after the HLT interface was designed) event is not sufficient because | |
405 | * the data might be needed already in the DoInit handler of the component. | |
406 | * @param desc run descriptor, currently only the run no member is used | |
407 | * @param runType originally, run type was supposed to be a number and part | |
408 | * of the run descriptor. But it was defined as string later | |
409 | */ | |
410 | int SetRunDescription(const AliHLTRunDesc* desc, const char* runType); | |
411 | ||
9a0ef890 | 412 | /** |
413 | * Set the component description. | |
414 | * The description string can contain tokens separated by blanks, a token | |
415 | * consists of a key and an optional value separated by '='. | |
416 | * Possible keys: | |
417 | * \li -chainid=id string id within the chain of the instance | |
418 | * | |
419 | * @param desc component description | |
420 | */ | |
421 | int SetComponentDescription(const char* desc); | |
422 | ||
f23a6e1a | 423 | // Information member functions for registration. |
bfccbf68 | 424 | |
425 | /** | |
426 | * Get the type of the component. | |
427 | * The function is pure virtual and must be implemented by the child class. | |
428 | * @return component type id | |
429 | */ | |
f23a6e1a | 430 | virtual TComponentType GetComponentType() = 0; // Source, sink, or processor |
bfccbf68 | 431 | |
432 | /** | |
433 | * Get the id of the component. | |
434 | * Each component is identified by a unique id. | |
435 | * The function is pure virtual and must be implemented by the child class. | |
436 | * @return component id (string) | |
437 | */ | |
f23a6e1a | 438 | virtual const char* GetComponentID() = 0; |
bfccbf68 | 439 | |
440 | /** | |
441 | * Get the input data types of the component. | |
442 | * The function is pure virtual and must be implemented by the child class. | |
443 | * @return list of data types in the vector reference | |
444 | */ | |
2be3f004 | 445 | virtual void GetInputDataTypes( AliHLTComponentDataTypeList& ) = 0; |
bfccbf68 | 446 | |
447 | /** | |
448 | * Get the output data type of the component. | |
449 | * The function is pure virtual and must be implemented by the child class. | |
450 | * @return output data type | |
451 | */ | |
8ede8717 | 452 | virtual AliHLTComponentDataType GetOutputDataType() = 0; |
bfccbf68 | 453 | |
de6593d0 | 454 | /** |
455 | * Get the output data types of the component. | |
456 | * The function can be implemented to indicate multiple output data types | |
457 | * in the target array. | |
458 | * @ref GetOutputDataType must return @ref kAliHLTMultipleDataType in order | |
459 | * to invoke this method. | |
460 | * @param tgtList list to receive the data types | |
461 | * @return no of output data types, data types in the target list | |
462 | */ | |
2be3f004 | 463 | virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList); |
de6593d0 | 464 | |
bfccbf68 | 465 | /** |
466 | * Get a ratio by how much the data volume is shrinked or enhanced. | |
467 | * The function is pure virtual and must be implemented by the child class. | |
468 | * @param constBase <i>return</i>: additive part, independent of the | |
469 | * input data volume | |
470 | * @param inputMultiplier <i>return</i>: multiplication ratio | |
471 | * @return values in the reference variables | |
472 | */ | |
71d7c760 | 473 | virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) = 0; |
f23a6e1a | 474 | |
bfccbf68 | 475 | /** |
476 | * Spawn function. | |
477 | * Each component must implement a spawn function to create a new instance of | |
478 | * the class. Basically the function must return <i>new <b>my_class_name</b></i>. | |
479 | * @return new class instance | |
480 | */ | |
f23a6e1a | 481 | virtual AliHLTComponent* Spawn() = 0; |
0c0c9d99 | 482 | |
bfccbf68 | 483 | /** |
484 | * Find matching data types between this component and a consumer component. | |
485 | * Currently, a component can produce only one type of data. This restriction is most | |
486 | * likely to be abolished in the future. | |
487 | * @param pConsumer a component and consumer of the data produced by this component | |
488 | * @param tgtList reference to a vector list to receive the matching data types. | |
489 | * @return >= 0 success, neg. error code if failed | |
490 | */ | |
2be3f004 | 491 | int FindMatchingDataTypes(AliHLTComponent* pConsumer, AliHLTComponentDataTypeList* tgtList); |
f23a6e1a | 492 | |
bfccbf68 | 493 | /** |
494 | * Set the global component handler. | |
495 | * The static method is needed for the automatic registration of components. | |
496 | */ | |
85869391 | 497 | static int SetGlobalComponentHandler(AliHLTComponentHandler* pCH, int bOverwrite=0); |
bfccbf68 | 498 | |
499 | /** | |
500 | * Clear the global component handler. | |
501 | * The static method is needed for the automatic registration of components. | |
502 | */ | |
85869391 | 503 | static int UnsetGlobalComponentHandler(); |
bfccbf68 | 504 | |
9ce4bf4a | 505 | /** |
506 | * Helper function to convert the data type to a string. | |
fbdb63fd | 507 | * @param type data type structure |
508 | * @param mode 0 print string origin:type <br> | |
509 | * 1 print chars <br> | |
510 | * 2 print numbers | |
9ce4bf4a | 511 | */ |
fbdb63fd | 512 | static string DataType2Text( const AliHLTComponentDataType& type, int mode=0); |
9ce4bf4a | 513 | |
48abe484 | 514 | /** |
515 | * Calculate a CRC checksum of a data buffer. | |
516 | * Polynomial for the calculation is 0xD8. | |
517 | */ | |
518 | static AliHLTUInt32_t CalculateChecksum(const AliHLTUInt8_t* buffer, int size); | |
519 | ||
5f5b708b | 520 | /** |
521 | * Helper function to print content of data type. | |
522 | */ | |
8b97f4f1 | 523 | static void PrintDataTypeContent(AliHLTComponentDataType& dt, const char* format=NULL); |
5f5b708b | 524 | |
9ce4bf4a | 525 | /** |
526 | * helper function to initialize AliHLTComponentEventData structure | |
527 | */ | |
528 | static void FillEventData(AliHLTComponentEventData& evtData); | |
529 | ||
530 | /** | |
531 | * Print info on an AliHLTComponentDataType structure | |
532 | * This is just a helper function to examine an @ref AliHLTComponentDataType | |
533 | * structur. | |
534 | */ | |
8b97f4f1 | 535 | static void PrintComponentDataTypeInfo(const AliHLTComponentDataType& dt); |
9ce4bf4a | 536 | |
fbdb63fd | 537 | /** |
538 | * Fill AliHLTComponentBlockData structure with default values. | |
539 | * @param blockData reference to data structure | |
540 | */ | |
541 | static void FillBlockData( AliHLTComponentBlockData& blockData ); | |
542 | ||
543 | /** | |
544 | * Fill AliHLTComponentShmData structure with default values. | |
545 | * @param shmData reference to data structure | |
546 | */ | |
547 | static void FillShmData( AliHLTComponentShmData& shmData ); | |
548 | ||
549 | /** | |
550 | * Fill AliHLTComponentDataType structure with default values. | |
551 | * @param dataType reference to data structure | |
552 | */ | |
553 | static void FillDataType( AliHLTComponentDataType& dataType ); | |
554 | ||
555 | /** | |
556 | * Copy data type structure | |
557 | * Copies the value an AliHLTComponentDataType structure to another one | |
558 | * @param[out] tgtdt target structure | |
559 | * @param[in] srcdt source structure | |
560 | */ | |
561 | static void CopyDataType(AliHLTComponentDataType& tgtdt, const AliHLTComponentDataType& srcdt); | |
562 | ||
563 | /** | |
564 | * Set the ID and Origin of an AliHLTComponentDataType structure. | |
565 | * The function sets the fStructureSize member and copies the strings | |
566 | * to the ID and Origin. Only characters from the valid part of the string | |
7e3efc8f | 567 | * are copied, the rest is filled with 0's. <br> |
fbdb63fd | 568 | * Please note that the fID and fOrigin members are not strings, just arrays of |
569 | * chars of size @ref kAliHLTComponentDataTypefIDsize and | |
570 | * @ref kAliHLTComponentDataTypefOriginSize respectively and not necessarily with | |
7e3efc8f | 571 | * a terminating zero. <br> |
572 | * It is possible to pass NULL pointers as id or origin argument, in that case they | |
573 | * are just ignored. | |
fbdb63fd | 574 | * @param tgtdt target data type structure |
575 | * @param id ID string | |
576 | * @param origin Origin string | |
577 | */ | |
578 | static void SetDataType(AliHLTComponentDataType& tgtdt, const char* id, const char* origin); | |
579 | ||
18b56222 | 580 | /** |
581 | * Set the ID and Origin of an AliHLTComponentDataType structure. | |
582 | * Given the fact that the data type ID is 64bit wide and origin 32, this helper | |
583 | * function sets the data type from those two parameters. | |
af2ed151 | 584 | * @param dt target data type structure |
18b56222 | 585 | * @param id 64bit id |
af2ed151 | 586 | * @param orig 32bit origin |
18b56222 | 587 | */ |
588 | static void SetDataType(AliHLTComponentDataType& dt, AliHLTUInt64_t id, AliHLTUInt32_t orig); | |
589 | ||
abb52c8f | 590 | /** |
591 | * Extract a component table entry from the payload buffer. | |
592 | * The entry consists of the AliHLTComponentTableEntry structure, the array of | |
593 | * parents and a description string of the format 'chain-id{component-id:component-args}'. | |
594 | * The function fills all the variables after a consistency check. | |
595 | */ | |
596 | static int ExtractComponentTableEntry(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size, | |
597 | string& chainId, string& compId, string& compParam, | |
598 | vector<AliHLTUInt32_t>& parents); | |
90ebac25 | 599 | /** |
600 | * Stopwatch type for benchmarking. | |
601 | */ | |
602 | enum AliHLTStopwatchType { | |
603 | /** total time for event processing */ | |
604 | kSWBase, | |
605 | /** detector algorithm w/o interface callbacks */ | |
606 | kSWDA, | |
607 | /** data sources */ | |
608 | kSWInput, | |
609 | /** data sinks */ | |
610 | kSWOutput, | |
611 | /** number of types */ | |
612 | kSWTypeCount | |
613 | }; | |
614 | ||
615 | /** | |
616 | * Helper class for starting and stopping a stopwatch. | |
617 | * The guard can be used by instantiating an object in a function. The | |
618 | * specified stopwatch is started and the previous stopwatch put on | |
619 | * hold. When the function is terminated, the object is deleted automatically | |
620 | * deleted, stopping the stopwatch and starting the one on hold.<br> | |
621 | * \em IMPORTANT: never create dynamic objects from this guard as this violates | |
622 | * the idea of a guard. | |
623 | */ | |
624 | class AliHLTStopwatchGuard { | |
625 | public: | |
626 | /** standard constructor (not for use) */ | |
627 | AliHLTStopwatchGuard(); | |
628 | /** constructor */ | |
629 | AliHLTStopwatchGuard(TStopwatch* pStart); | |
630 | /** copy constructor (not for use) */ | |
e419b223 | 631 | AliHLTStopwatchGuard(const AliHLTStopwatchGuard&); |
632 | /** assignment operator (not for use) */ | |
633 | AliHLTStopwatchGuard& operator=(const AliHLTStopwatchGuard&); | |
90ebac25 | 634 | /** destructor */ |
635 | ~AliHLTStopwatchGuard(); | |
636 | ||
637 | private: | |
638 | /** | |
639 | * Hold the previous guard for the existence of this guard. | |
640 | * Checks whether this guard controls a new stopwatch. In that case, the | |
641 | * previous guard and its stopwatch are put on hold. | |
642 | * @param pSucc instance of the stopwatch of the new guard | |
643 | * @return 1 if pSucc is a different stopwatch which should | |
644 | * be started<br> | |
645 | * 0 if it controls the same stopwatch | |
646 | */ | |
647 | int Hold(TStopwatch* pSucc); | |
648 | ||
649 | /** | |
650 | * Resume the previous guard. | |
651 | * Checks whether the peceeding guard controls a different stopwatch. In that | |
652 | * case, the its stopwatch is resumed. | |
653 | * @param pSucc instance of the stopwatch of the new guard | |
654 | * @return 1 if pSucc is a different stopwatch which should | |
655 | * be stopped<br> | |
656 | * 0 if it controls the same stopwatch | |
657 | */ | |
658 | int Resume(TStopwatch* pSucc); | |
659 | ||
660 | /** the stopwatch controlled by this guard */ | |
661 | TStopwatch* fpStopwatch; //!transient | |
662 | ||
663 | /** previous stopwatch guard, put on hold during existence of the guard */ | |
664 | AliHLTStopwatchGuard* fpPrec; //!transient | |
665 | ||
666 | /** active stopwatch guard */ | |
667 | static AliHLTStopwatchGuard* fgpCurrent; //!transient | |
668 | }; | |
669 | ||
670 | /** | |
671 | * Set a stopwatch for a given purpose. | |
672 | * @param pSW stopwatch object | |
673 | * @param type type of the stopwatch | |
674 | */ | |
675 | int SetStopwatch(TObject* pSW, AliHLTStopwatchType type=kSWBase); | |
676 | ||
677 | /** | |
678 | * Init a set of stopwatches. | |
679 | * @param pStopwatches object array of stopwatches | |
680 | */ | |
681 | int SetStopwatches(TObjArray* pStopwatches); | |
a655eae3 | 682 | |
f23a6e1a | 683 | protected: |
71d7c760 | 684 | |
bfccbf68 | 685 | /** |
686 | * Default method for the internal initialization. | |
687 | * The method is called by @ref Init | |
688 | */ | |
53feaef5 | 689 | virtual int DoInit( int argc, const char** argv ); |
f23a6e1a | 690 | |
bfccbf68 | 691 | /** |
692 | * Default method for the internal clean-up. | |
693 | * The method is called by @ref Deinit | |
694 | */ | |
53feaef5 | 695 | virtual int DoDeinit(); |
f23a6e1a | 696 | |
579d9eb7 | 697 | /** |
698 | * Reconfigure the component. | |
699 | * The method is called when an event of type @ref kAliHLTDataTypeComConf | |
700 | * {COM_CONF:PRIV} is received by the component. If the event is sent as | |
701 | * part of a normal event, the component configuration is called first. | |
702 | * | |
703 | * The CDB path parameter specifies the path in the CDB, i.e. without | |
704 | * leading absolute path of the CDB location. The framework might alse | |
705 | * provide the id of the component in the analysis chain. | |
706 | * | |
707 | * \b Note: The CDB will be initialized by the framework, either already set | |
708 | * from AliRoot or from the wrapper interface during initialization. | |
709 | * | |
710 | * @param cdbEntry path of the cdbEntry | |
e63b561e | 711 | * @param chainId the id/name of the component in the current analysis |
712 | * chain. This is not necessarily the same as what is | |
713 | * returned by the GetComponentID() method. | |
579d9eb7 | 714 | * @note both parameters can be NULL, check before usage |
715 | */ | |
716 | virtual int Reconfigure(const char* cdbEntry, const char* chainId); | |
b543e186 | 717 | |
718 | /** | |
719 | * Read the Preprocessor values. | |
720 | * The function is invoked when the component is notified about available/ | |
721 | * updated data points from the detector Preprocessors. The 'modules' | |
722 | * argument contains all detectors for which the Preprocessors have | |
723 | * updated data points. The component has to implement the CDB access to | |
724 | * get the desired data points. | |
725 | * @param modules detectors for which the Preprocessors have updated | |
d6b69874 | 726 | * data points: TPC, TRD, ITS, PHOS, MUON, or ALL if |
727 | * no argument was received. | |
b543e186 | 728 | * @return neg. error code if failed |
729 | */ | |
730 | virtual int ReadPreprocessorValues(const char* modules); | |
579d9eb7 | 731 | |
45c0a780 | 732 | /** |
733 | * Custom handler for the SOR event. | |
734 | * Is invoked from the base class if an SOR event is in the block list. | |
735 | * The handler is called before the processing function. The processing | |
736 | * function is skipped if there are no other data blocks available. | |
737 | * | |
738 | * The SOR event is generated by the PubSub framework in response to | |
739 | * the DAQ start of data (SOD - has been renamed after HLT interface | |
740 | * was designed). The SOD event consists of 3 blocks: | |
741 | * - ::kAliHLTDataTypeEvent block: spec ::gkAliEventTypeStartOfRun | |
742 | * - SOD block of type ::kAliHLTDataTypeSOR, payload: AliHLTRunDesc struct | |
743 | * - run type block ::kAliHLTDataTypeRunType, payload: run type string | |
744 | * | |
745 | * Run properties can be retrieved by getters like GetRunNo(). | |
746 | * @return neg. error code if failed | |
747 | */ | |
748 | virtual int StartOfRun(); | |
749 | ||
750 | /** | |
751 | * Custom handler for the EOR event. | |
752 | * Is invoked from the base class if an EOR event is in the block list. | |
753 | * The handler is called before the processing function. The processing | |
754 | * function is skipped if there are no other data blocks available. | |
755 | * | |
756 | * See StartOfRun() for mor ecomments of the sequence of steering events. | |
757 | * | |
758 | * @return neg. error code if failed | |
759 | */ | |
760 | virtual int EndOfRun(); | |
761 | ||
48abe484 | 762 | /** |
763 | * Check whether a component requires all steering blocks. | |
764 | * Childs can overload in order to indicate that they want to | |
765 | * receive also the steering data blocks. There is also the | |
766 | * possibility to add the required data types to the input | |
767 | * data type list in GetInputDataTypes(). | |
768 | */ | |
769 | virtual bool RequireSteeringBlocks() const {return false;} | |
770 | ||
bfccbf68 | 771 | /** |
772 | * General memory allocation method. | |
773 | * All memory which is going to be used 'outside' of the interface must | |
774 | * be provided by the framework (online or offline). | |
775 | * The method is redirected to a function provided by the current | |
776 | * framework. Function pointers are transferred via the @ref | |
a3c9b745 | 777 | * AliHLTAnalysisEnvironment structure. |
bfccbf68 | 778 | */ |
85869391 | 779 | void* AllocMemory( unsigned long size ); |
f23a6e1a | 780 | |
bfccbf68 | 781 | /** |
782 | * Helper function to create a monolithic BlockData description block out | |
783 | * of a list BlockData descriptors. | |
784 | * For convenience, inside the interface vector lists are used, to make the | |
785 | * interface pure C style, monilithic blocks must be exchanged. | |
786 | * The method is redirected to a function provided by the current | |
787 | * framework. Function pointers are transferred via the @ref | |
a3c9b745 | 788 | * AliHLTAnalysisEnvironment structure. |
bfccbf68 | 789 | */ |
2be3f004 | 790 | int MakeOutputDataBlockList( const AliHLTComponentBlockDataList& blocks, AliHLTUInt32_t* blockCount, |
8ede8717 | 791 | AliHLTComponentBlockData** outputBlocks ); |
f23a6e1a | 792 | |
bfccbf68 | 793 | /** |
794 | * Fill the EventDoneData structure. | |
795 | * The method is redirected to a function provided by the current | |
796 | * framework. Function pointers are transferred via the @ref | |
a3c9b745 | 797 | * AliHLTAnalysisEnvironment structure. |
bfccbf68 | 798 | */ |
8ede8717 | 799 | int GetEventDoneData( unsigned long size, AliHLTComponentEventDoneData** edd ); |
f23a6e1a | 800 | |
eafbc306 | 801 | /** |
802 | * Allocate an EventDoneData structure for the current event . | |
803 | * The method allocates the memory internally and does not interact with the current Framework. | |
804 | * The allocated data structure is empty initially and can be filled by calls to the | |
805 | * @ref PushEventDoneData method. The memory will be automatically released after the event has been processed. | |
806 | * | |
807 | */ | |
808 | int ReserveEventDoneData( unsigned long size ); | |
809 | ||
810 | /** | |
811 | * Push a 32 bit word of data into event done data for the current event which | |
812 | * has previously been allocated by the @ref ReserveEventDoneData method. | |
813 | */ | |
814 | int PushEventDoneData( AliHLTUInt32_t eddDataWord ); | |
815 | ||
816 | /** | |
817 | * Release event done data previously reserved by @ref ReserveEventDoneData | |
818 | */ | |
819 | void ReleaseEventDoneData(); | |
820 | ||
821 | /** | |
822 | * Get the pointer to the event done data available/built so far for the current event via | |
823 | * @ref ReserveEventDoneData and @ref PushEventDoneData | |
824 | */ | |
825 | AliHLTComponentEventDoneData* GetCurrentEventDoneData() | |
826 | { | |
827 | return fEventDoneData; | |
828 | } | |
829 | ||
bfccbf68 | 830 | /** |
831 | * Helper function to convert the data type to a string. | |
832 | */ | |
70ed7d01 | 833 | void DataType2Text(const AliHLTComponentDataType& type, char output[kAliHLTComponentDataTypefIDsize+kAliHLTComponentDataTypefOriginSize+2]) const; |
fa2e9b7c | 834 | |
3cde846d | 835 | /** |
836 | * Get event number. | |
837 | * @return value of the internal event counter | |
838 | */ | |
70ed7d01 | 839 | int GetEventCount() const; |
3cde846d | 840 | |
a655eae3 | 841 | /** |
842 | * Get the number of input blocks. | |
843 | * @return number of input blocks | |
844 | */ | |
66043029 | 845 | int GetNumberOfInputBlocks() const; |
a655eae3 | 846 | |
4646c6e3 | 847 | /** |
848 | * Get id of the current event | |
849 | * @return event id | |
850 | */ | |
851 | AliHLTEventID_t GetEventId() const; | |
852 | ||
a655eae3 | 853 | /** |
854 | * Get the first object of a specific data type from the input data. | |
855 | * The hight-level methods provide functionality to transfer ROOT data | |
856 | * structures which inherit from TObject. | |
3dd8541e | 857 | * |
a655eae3 | 858 | * The method looks for the first ROOT object of type dt in the input stream. |
859 | * If also the class name is provided, the object is checked for the right | |
860 | * class type. The input data block needs a certain structure, namely the | |
861 | * buffer size as first word. If the cross check fails, the retrieval is | |
8451168b | 862 | * silently abondoned, unless the \em bForce parameter is set.<br> |
3dd8541e | 863 | * \b Note: THE OBJECT MUST NOT BE DELETED by the caller. |
864 | * | |
865 | * If called without parameters, the function tries to create objects from | |
866 | * all available input blocks, also the ones of data type kAliHLTVoidDataType | |
867 | * which are not matched by kAliHLTAnyDataType. | |
868 | * | |
a655eae3 | 869 | * @param dt data type of the object |
870 | * @param classname class name of the object | |
871 | * @param bForce force the retrieval of an object, error messages | |
872 | * are suppressed if \em bForce is not set | |
873 | * @return pointer to @ref TObject, NULL if no objects of specified type | |
874 | * available | |
875 | */ | |
3dd8541e | 876 | const TObject* GetFirstInputObject(const AliHLTComponentDataType& dt=kAliHLTAllDataTypes, |
a655eae3 | 877 | const char* classname=NULL, |
878 | int bForce=0); | |
879 | ||
880 | /** | |
881 | * Get the first object of a specific data type from the input data. | |
882 | * The hight-level methods provide functionality to transfer ROOT data | |
883 | * structures which inherit from TObject. | |
884 | * The method looks for the first ROOT object of type specified by the ID and | |
885 | * Origin strings in the input stream. | |
886 | * If also the class name is provided, the object is checked for the right | |
887 | * class type. The input data block needs a certain structure, namely the | |
888 | * buffer size as first word. If the cross check fails, the retrieval is | |
8451168b | 889 | * silently abondoned, unless the \em bForce parameter is set.<br> |
890 | * \em Note: THE OBJECT MUST NOT BE DELETED by the caller. | |
a655eae3 | 891 | * @param dtID data type ID of the object |
892 | * @param dtOrigin data type origin of the object | |
893 | * @param classname class name of the object | |
894 | * @param bForce force the retrieval of an object, error messages | |
895 | * are suppressed if \em bForce is not set | |
896 | * @return pointer to @ref TObject, NULL if no objects of specified type | |
897 | * available | |
898 | */ | |
899 | const TObject* GetFirstInputObject(const char* dtID, | |
900 | const char* dtOrigin, | |
901 | const char* classname=NULL, | |
902 | int bForce=0); | |
903 | ||
904 | /** | |
905 | * Get the next object of a specific data type from the input data. | |
906 | * The hight-level methods provide functionality to transfer ROOT data | |
907 | * structures which inherit from TObject. | |
908 | * The method looks for the next ROOT object of type and class specified | |
8451168b | 909 | * to the previous @ref GetFirstInputObject call.<br> |
910 | * \em Note: THE OBJECT MUST NOT BE DELETED by the caller. | |
a655eae3 | 911 | * @param bForce force the retrieval of an object, error messages |
912 | * are suppressed if \em bForce is not set | |
913 | * @return pointer to @ref TObject, NULL if no more objects available | |
914 | */ | |
915 | const TObject* GetNextInputObject(int bForce=0); | |
916 | ||
917 | /** | |
918 | * Get data type of an input block. | |
919 | * Get data type of the object previously fetched via | |
920 | * GetFirstInputObject/NextInputObject or the last one if no object | |
921 | * specified. | |
922 | * @param pObject pointer to TObject | |
923 | * @return data specification, kAliHLTVoidDataSpec if failed | |
924 | */ | |
925 | AliHLTComponentDataType GetDataType(const TObject* pObject=NULL); | |
926 | ||
927 | /** | |
928 | * Get data specification of an input block. | |
929 | * Get data specification of the object previously fetched via | |
930 | * GetFirstInputObject/NextInputObject or the last one if no object | |
931 | * specified. | |
932 | * @param pObject pointer to TObject | |
933 | * @return data specification, kAliHLTVoidDataSpec if failed | |
934 | */ | |
935 | AliHLTUInt32_t GetSpecification(const TObject* pObject=NULL); | |
936 | ||
937 | /** | |
938 | * Get the first block of a specific data type from the input data. | |
3dd8541e | 939 | * The method looks for the first block of type dt in the input stream. |
940 | * It is intended to be used within the high-level interface.<br> | |
8451168b | 941 | * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller. |
3dd8541e | 942 | * |
943 | * If called without parameters, the function works on all input blocks, | |
944 | * also the ones of data type kAliHLTVoidDataType which are not matched by | |
945 | * kAliHLTAnyDataType. | |
946 | * | |
a655eae3 | 947 | * @param dt data type of the block |
948 | * @return pointer to @ref AliHLTComponentBlockData | |
949 | */ | |
3dd8541e | 950 | const AliHLTComponentBlockData* GetFirstInputBlock(const AliHLTComponentDataType& dt=kAliHLTAllDataTypes); |
a655eae3 | 951 | |
952 | /** | |
953 | * Get the first block of a specific data type from the input data. | |
954 | * The method looks for the first block of type specified by the ID and | |
955 | * Origin strings in the input stream. It is intended | |
8451168b | 956 | * to be used within the high-level interface.<br> |
957 | * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller. | |
a655eae3 | 958 | * @param dtID data type ID of the block |
959 | * @param dtOrigin data type origin of the block | |
960 | * @return pointer to @ref AliHLTComponentBlockData | |
961 | */ | |
962 | const AliHLTComponentBlockData* GetFirstInputBlock(const char* dtID, | |
963 | const char* dtOrigin); | |
964 | ||
965 | /** | |
8451168b | 966 | * Get input block by index.<br> |
967 | * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller. | |
a655eae3 | 968 | * @return pointer to AliHLTComponentBlockData, NULL if index out of range |
969 | */ | |
10b9cbf9 | 970 | const AliHLTComponentBlockData* GetInputBlock(int index) const; |
a655eae3 | 971 | |
972 | /** | |
973 | * Get the next block of a specific data type from the input data. | |
974 | * The method looks for the next block of type and class specified | |
975 | * to the previous @ref GetFirstInputBlock call. | |
8451168b | 976 | * To be used within the high-level interface.<br> |
977 | * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller. | |
a655eae3 | 978 | */ |
979 | const AliHLTComponentBlockData* GetNextInputBlock(); | |
980 | ||
981 | /** | |
982 | * Get data specification of an input block. | |
983 | * Get data specification of the input bblock previously fetched via | |
984 | * GetFirstInputObject/NextInputObject or the last one if no block | |
985 | * specified. | |
986 | * @param pBlock pointer to input block | |
987 | * @return data specification, kAliHLTVoidDataSpec if failed | |
988 | */ | |
989 | AliHLTUInt32_t GetSpecification(const AliHLTComponentBlockData* pBlock=NULL); | |
990 | ||
c7e9e2f2 | 991 | /** |
992 | * Forward an input object to the output. | |
993 | * Forward the input block of an object previously fetched via | |
994 | * GetFirstInputObject/NextInputObject or the last one if no object | |
995 | * specified. | |
996 | * The block descriptor of the input block is forwarded to the | |
997 | * output block list. | |
998 | * @param pObject pointer to TObject | |
999 | * @return neg. error code if failed | |
1000 | */ | |
1001 | int Forward(const TObject* pObject); | |
1002 | ||
1003 | /** | |
1004 | * Forward an input block to the output. | |
1005 | * Forward the input block fetched via GetFirstInputObject/ | |
1006 | * NextInputBlock or the last one if no block specified. | |
1007 | * The block descriptor of the input block is forwarded to the | |
1008 | * output block list. | |
1009 | * @param pBlock pointer to input block | |
1010 | * @return neg. error code if failed | |
1011 | */ | |
1012 | int Forward(const AliHLTComponentBlockData* pBlock=NULL); | |
1013 | ||
a655eae3 | 1014 | /** |
1015 | * Insert an object into the output. | |
79c114b5 | 1016 | * If header is specified, it will be inserted before the root object, |
1017 | * default is no header. | |
a655eae3 | 1018 | * @param pObject pointer to root object |
1019 | * @param dt data type of the object | |
1020 | * @param spec data specification | |
79c114b5 | 1021 | * @param pHeader pointer to header |
1022 | * @param headerSize size of Header | |
a655eae3 | 1023 | * @return neg. error code if failed |
1024 | */ | |
1025 | int PushBack(TObject* pObject, const AliHLTComponentDataType& dt, | |
79c114b5 | 1026 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec, |
1027 | void* pHeader=NULL, int headerSize=0); | |
a655eae3 | 1028 | |
1029 | /** | |
1030 | * Insert an object into the output. | |
79c114b5 | 1031 | * If header is specified, it will be inserted before the root object, |
1032 | * default is no header. | |
a655eae3 | 1033 | * @param pObject pointer to root object |
1034 | * @param dtID data type ID of the object | |
1035 | * @param dtOrigin data type origin of the object | |
1036 | * @param spec data specification | |
79c114b5 | 1037 | * @param pHeader pointer to header |
1038 | * @param headerSize size of Header | |
a655eae3 | 1039 | * @return neg. error code if failed |
1040 | */ | |
1041 | int PushBack(TObject* pObject, const char* dtID, const char* dtOrigin, | |
79c114b5 | 1042 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec, |
1043 | void* pHeader=NULL, int headerSize=0); | |
1044 | ||
a655eae3 | 1045 | /** |
1046 | * Insert an object into the output. | |
1047 | * @param pBuffer pointer to buffer | |
1048 | * @param iSize size of the buffer | |
1049 | * @param dt data type of the object | |
1050 | * @param spec data specification | |
9d9ffd37 | 1051 | * @param pHeader pointer to header |
7c4091c1 | 1052 | * @param headerSize size of Header |
a655eae3 | 1053 | * @return neg. error code if failed |
1054 | */ | |
438635e3 | 1055 | int PushBack(const void* pBuffer, int iSize, const AliHLTComponentDataType& dt, |
9d9ffd37 | 1056 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec, |
438635e3 | 1057 | const void* pHeader=NULL, int headerSize=0); |
a655eae3 | 1058 | |
1059 | /** | |
1060 | * Insert an object into the output. | |
1061 | * @param pBuffer pointer to buffer | |
1062 | * @param iSize size of the buffer | |
1063 | * @param dtID data type ID of the object | |
1064 | * @param dtOrigin data type origin of the object | |
1065 | * @param spec data specification | |
9d9ffd37 | 1066 | * @param pHeader pointer to header |
7c4091c1 | 1067 | * @param headerSize size of Header |
a655eae3 | 1068 | * @return neg. error code if failed |
1069 | */ | |
438635e3 | 1070 | int PushBack(const void* pBuffer, int iSize, const char* dtID, const char* dtOrigin, |
9d9ffd37 | 1071 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec, |
438635e3 | 1072 | const void* pHeader=NULL, int headerSize=0); |
a655eae3 | 1073 | |
8451168b | 1074 | /** |
1075 | * Estimate size of a TObject | |
1076 | * @param pObject | |
1077 | * @return buffer size in byte | |
1078 | */ | |
1079 | int EstimateObjectSize(TObject* pObject) const; | |
1080 | ||
79c114b5 | 1081 | /** |
1082 | * Create a memory file in the output stream. | |
1083 | * This method creates a TFile object which stores all data in | |
1084 | * memory instead of disk. The TFile object is published as binary data. | |
1085 | * The instance can be used like a normal TFile object. The TFile::Close | |
1086 | * or @ref CloseMemoryFile method has to be called in order to flush the | |
1087 | * output stream. | |
1088 | * | |
1089 | * \b Note: The returned object is deleted by the framework. | |
1090 | * @param capacity total size reserved for the memory file | |
1091 | * @param dtID data type ID of the file | |
1092 | * @param dtOrigin data type origin of the file | |
1093 | * @param spec data specification | |
1094 | * @return file handle, NULL if failed | |
1095 | */ | |
1096 | AliHLTMemoryFile* CreateMemoryFile(int capacity, const char* dtID, const char* dtOrigin, | |
1097 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec); | |
1098 | ||
1099 | /** | |
1100 | * Create a memory file in the output stream. | |
1101 | * This method creates a TFile object which stores all data in | |
1102 | * memory instead of disk. The TFile object is published as binary data. | |
1103 | * The instance can be used like a normal TFile object. The TFile::Close | |
1104 | * or @ref CloseMemoryFile method has to be called in order to flush the | |
1105 | * output stream. | |
1106 | * | |
1107 | * \b Note: The returned object is deleted by the framework. | |
1108 | * @param capacity total size reserved for the memory file | |
1109 | * @param dt data type of the file | |
1110 | * @param spec data specification | |
1111 | * @return file handle, NULL if failed | |
1112 | */ | |
1113 | AliHLTMemoryFile* CreateMemoryFile(int capacity, | |
1114 | const AliHLTComponentDataType& dt=kAliHLTAnyDataType, | |
1115 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec); | |
1116 | ||
1117 | /** | |
1118 | * Create a memory file in the output stream. | |
1119 | * This method creates a TFile object which stores all data in | |
1120 | * memory instead of disk. The TFile object is published as binary data. | |
1121 | * The instance can be used like a normal TFile object. The TFile::Close | |
1122 | * or @ref CloseMemoryFile method has to be called in order to flush the | |
1123 | * output stream. | |
1124 | * | |
1125 | * \b Note: The returned object is deleted by the framework. | |
1126 | * @param dtID data type ID of the file | |
1127 | * @param dtOrigin data type origin of the file | |
1128 | * @param spec data specification | |
1129 | * @param capacity fraction of the available output buffer size | |
1130 | * @return file handle, NULL if failed | |
1131 | */ | |
1132 | AliHLTMemoryFile* CreateMemoryFile(const char* dtID, const char* dtOrigin, | |
1133 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec, | |
1134 | float capacity=1.0); | |
1135 | ||
1136 | /** | |
1137 | * Create a memory file in the output stream. | |
1138 | * This method creates a TFile object which stores all data in | |
1139 | * memory instead of disk. The TFile object is published as binary data. | |
1140 | * The instance can be used like a normal TFile object. The TFile::Close | |
1141 | * or @ref CloseMemoryFile method has to be called in order to flush the | |
1142 | * output stream. | |
1143 | * | |
1144 | * \b Note: The returned object is deleted by the framework. | |
1145 | * @param dt data type of the file | |
1146 | * @param spec data specification | |
1147 | * @param capacity fraction of the available output buffer size | |
1148 | * @return file handle, NULL if failed | |
1149 | */ | |
1150 | AliHLTMemoryFile* CreateMemoryFile(const AliHLTComponentDataType& dt=kAliHLTAnyDataType, | |
1151 | AliHLTUInt32_t spec=kAliHLTVoidDataSpec, | |
1152 | float capacity=1.0); | |
1153 | ||
1154 | /** | |
1155 | * Write an object to memory file in the output stream. | |
1156 | * @param pFile file handle | |
1157 | * @param pObject pointer to root object | |
1158 | * @param key key in ROOT file | |
1159 | * @param option options, see TObject::Write | |
1160 | * @return neg. error code if failed | |
1161 | * - -ENOSPC no space left | |
1162 | */ | |
1163 | int Write(AliHLTMemoryFile* pFile, const TObject* pObject, const char* key=NULL, int option=TObject::kOverwrite); | |
1164 | ||
1165 | /** | |
1166 | * Close object memory file. | |
1167 | * @param pFile file handle | |
1168 | * @return neg. error code if failed | |
1169 | * - -ENOSPC buffer size too small | |
1170 | */ | |
1171 | int CloseMemoryFile(AliHLTMemoryFile* pFile); | |
1172 | ||
a655eae3 | 1173 | /** |
1174 | * Insert event-done data information into the output. | |
1175 | * @param edd event-done data information | |
1176 | */ | |
1177 | int CreateEventDoneData(AliHLTComponentEventDoneData edd); | |
1178 | ||
559631d5 | 1179 | /** |
1180 | * Get current run number | |
1181 | */ | |
1182 | AliHLTUInt32_t GetRunNo() const; | |
1183 | ||
1184 | /** | |
1185 | * Get the current run type. | |
1186 | */ | |
1187 | AliHLTUInt32_t GetRunType() const; | |
1188 | ||
9a0ef890 | 1189 | /** |
1190 | * Get the chain id of the component. | |
1191 | */ | |
1192 | const char* GetChainId() const {return fChainId.c_str();} | |
1193 | ||
48abe484 | 1194 | /** |
1195 | * Check whether the current event is a valid data event. | |
1196 | * @param pTgt optional pointer to get the event type | |
1197 | * @return true if the current event is a real data event | |
1198 | */ | |
1199 | bool IsDataEvent(AliHLTUInt32_t* pTgt=NULL); | |
1200 | ||
ed504011 | 1201 | /** |
1202 | * Set a bit to 1 in a readout list ( = AliHLTEventDDL ) | |
1203 | * -> enable DDL for readout | |
1204 | * @param list readout list | |
1205 | * @param ddlId DDL Id to be turned on ( Decimal ) | |
1206 | */ | |
1207 | void EnableDDLBit(AliHLTEventDDL &list, Int_t ddlId ) const { | |
1208 | SetDDLBit( list, ddlId, kTRUE ); | |
1209 | } | |
1210 | ||
1211 | /** | |
1212 | * Set a bit to 0 in a readout list ( = AliHLTEventDDL ) | |
1213 | * -> disable DDL for readout | |
1214 | * @param list readout list | |
1215 | * @param ddlId DDL Id to be turned on ( Decimal ) | |
1216 | */ | |
1217 | void DisableDDLBit(AliHLTEventDDL &list, Int_t ddlId ) const { | |
1218 | SetDDLBit( list, ddlId, kFALSE ); | |
1219 | } | |
1220 | ||
1221 | /** | |
1222 | * Set or unset bit a readout list ( = AliHLTEventDDL ) | |
1223 | * -> enable or disable DDL for readout | |
1224 | * @param list readout list | |
1225 | * @param ddlId DDL Id to be turned on ( Decimal ) | |
1226 | * @param state kTRUE sets it, kFALSE unsets it | |
1227 | */ | |
1228 | void SetDDLBit(AliHLTEventDDL &list, Int_t ddlId, Bool_t state ) const; | |
1229 | ||
1230 | /** | |
1231 | * Get the first word of a detector, which has a set DDL bit. | |
1232 | * Beware, this only works if DDLs of 1 detector are set. In the | |
1233 | * case of the TPC and TOF, which use 8 and 3 words, the first | |
1234 | * word is returned. | |
1235 | * @param list readout list | |
1236 | * @return returns the detector index, -1 if no bit is set | |
1237 | * at all or several detectors (=error) | |
1238 | */ | |
1239 | Int_t GetFirstUsedDDLWord(AliHLTEventDDL &list) const; | |
1240 | ||
559631d5 | 1241 | /** |
1242 | * Copy a struct from block data. | |
1243 | * The function checks for block size and struct size. The least common | |
1244 | * size will be copied to the target struct, remaining fields are initialized | |
1245 | * to zero.<br> | |
1246 | * The target struct must have a 32bit struct size indicator as first member. | |
1247 | * @param pStruct target struct | |
1248 | * @param iStructSize size of the struct | |
559631d5 | 1249 | * @param iBlockNo index of input block |
1250 | * @param structname name of the struct (log messages) | |
1251 | * @param eventname name of the event (log messages) | |
1252 | * @return size copied, neg. error if failed | |
1253 | */ | |
83fec083 | 1254 | int CopyStruct(void* pStruct, unsigned int iStructSize, unsigned int iBlockNo, |
559631d5 | 1255 | const char* structname="", const char* eventname=""); |
1256 | ||
f23a6e1a | 1257 | private: |
b426991e | 1258 | /** copy constructor prohibited */ |
559631d5 | 1259 | AliHLTComponent(const AliHLTComponent&); |
b426991e | 1260 | /** assignment operator prohibited */ |
559631d5 | 1261 | AliHLTComponent& operator=(const AliHLTComponent&); |
1262 | ||
3cde846d | 1263 | /** |
1264 | * Increment the internal event counter. | |
1265 | * To be used by the friend classes AliHLTProcessor, AliHLTDataSource | |
1266 | * and AliHLTDataSink. | |
1267 | * @return new value of the internal event counter | |
a655eae3 | 1268 | * @internal |
3cde846d | 1269 | */ |
1270 | int IncrementEventCounter(); | |
1271 | ||
a655eae3 | 1272 | /** |
1273 | * Find the first input block of specified data type beginning at index. | |
1edbbe49 | 1274 | * Input blocks containing a TObject have the size of the object as an |
1275 | * unsigned 32 bit number in the first 4 bytes. This has to match the block | |
1276 | * size minus 4. | |
3dd8541e | 1277 | * |
1278 | * kAliHLTAllDataTypes is a special data type which includes both | |
1279 | * kAliHLTVoidDataType and kAliHLTAnyDataType. | |
1280 | * | |
a655eae3 | 1281 | * @param dt data type |
1282 | * @param startIdx index to start the search | |
1edbbe49 | 1283 | * @param bObject check if this is an object |
a655eae3 | 1284 | * @return index of the block, -ENOENT if no block found |
1285 | * | |
1286 | * @internal | |
1287 | */ | |
1edbbe49 | 1288 | int FindInputBlock(const AliHLTComponentDataType& dt, int startIdx=-1, int bObject=0) const; |
a655eae3 | 1289 | |
1290 | /** | |
1291 | * Get index in the array of input bocks. | |
1292 | * Calculate index and check integrety of a block data structure pointer. | |
1293 | * @param pBlock pointer to block data | |
1294 | * @return index of the block, -ENOENT if no block found | |
1295 | * | |
1296 | * @internal | |
1297 | */ | |
66043029 | 1298 | int FindInputBlock(const AliHLTComponentBlockData* pBlock) const; |
a655eae3 | 1299 | |
1300 | /** | |
1301 | * Create an object from a specified input block. | |
1302 | * @param idx index of the input block | |
1303 | * @param bForce force the retrieval of an object, error messages | |
1304 | * are suppressed if \em bForce is not set | |
1305 | * @return pointer to TObject, caller must delete the object after use | |
1306 | * | |
1307 | * @internal | |
1308 | */ | |
1309 | TObject* CreateInputObject(int idx, int bForce=0); | |
1310 | ||
1311 | /** | |
1312 | * Get input object | |
8451168b | 1313 | * Get object from the input block list. The methods first checks whether the |
1314 | * object was already created. If not, it is created by @ref CreateInputObject | |
1315 | * and inserted into the list of objects. | |
a655eae3 | 1316 | * @param idx index in the input block list |
1317 | * @param classname name of the class, object is checked for correct class | |
1318 | * name if set | |
1319 | * @param bForce force the retrieval of an object, error messages | |
1320 | * are suppressed if \em bForce is not set | |
1321 | * @return pointer to TObject | |
1322 | * | |
1323 | * @internal | |
1324 | */ | |
1325 | TObject* GetInputObject(int idx, const char* classname=NULL, int bForce=0); | |
1326 | ||
8451168b | 1327 | /** |
1328 | * Clean the list of input objects. | |
1329 | * Cleanup is done at the end of each event processing. | |
1330 | */ | |
1331 | int CleanupInputObjects(); | |
1332 | ||
a655eae3 | 1333 | /** |
1334 | * Insert a buffer into the output block stream. | |
1335 | * This is the only method to insert blocks into the output stream, called | |
1336 | * from all types of the Pushback method. The actual data might have been | |
1337 | * written to the output buffer already. In that case NULL can be provided | |
79c114b5 | 1338 | * as buffer, only the block descriptor will be build. If a header is specified, |
1339 | * it will be inserted before the buffer, default is no header. | |
a655eae3 | 1340 | * @param pBuffer pointer to buffer |
32db4144 | 1341 | * @param iBufferSize size of the buffer in byte |
a655eae3 | 1342 | * @param dt data type |
1343 | * @param spec data specification | |
79c114b5 | 1344 | * @param pHeader pointer to header |
1345 | * @param iHeaderSize size of Header | |
b6800be0 | 1346 | * @return neg. error code if failed |
a655eae3 | 1347 | */ |
438635e3 | 1348 | int InsertOutputBlock(const void* pBuffer, int iBufferSize, |
a655eae3 | 1349 | const AliHLTComponentDataType& dt, |
79c114b5 | 1350 | AliHLTUInt32_t spec, |
438635e3 | 1351 | const void* pHeader=NULL, int iHeaderSize=0); |
a655eae3 | 1352 | |
a0aeb701 | 1353 | /** |
1354 | * Add a component statistics block to the output. | |
438635e3 | 1355 | * @return size of the added data |
a0aeb701 | 1356 | */ |
1357 | int AddComponentStatistics(AliHLTComponentBlockDataList& blocks, | |
1358 | AliHLTUInt8_t* buffer, | |
1359 | AliHLTUInt32_t bufferSize, | |
1360 | AliHLTUInt32_t offset, | |
1361 | AliHLTComponentStatisticsList& stats) const; | |
1362 | ||
438635e3 | 1363 | /** |
1364 | * Add a component table entry (descriptor) to the output | |
1365 | * This is done at SOR/EOR. The component table is a list of chain ids | |
1366 | * and 32bit ids calculated by a crc algorithm from the chian id. This | |
1367 | * allows to tag data blocks with the id number rather than the string. | |
1368 | * | |
1369 | * The kAliHLTDataTypeComponentTable data block currently has the string | |
1370 | * as payload and the crc id as specification. | |
1371 | * @return size of the added data | |
1372 | */ | |
1373 | int AddComponentTableEntry(AliHLTComponentBlockDataList& blocks, | |
1374 | AliHLTUInt8_t* buffer, | |
1375 | AliHLTUInt32_t bufferSize, | |
abb52c8f | 1376 | AliHLTUInt32_t offset, |
1377 | const vector<AliHLTUInt32_t>& parents) const; | |
438635e3 | 1378 | |
bfccbf68 | 1379 | /** The global component handler instance */ |
a655eae3 | 1380 | static AliHLTComponentHandler* fgpComponentHandler; //! transient |
70ed7d01 | 1381 | |
bfccbf68 | 1382 | /** The environment where the component is running in */ |
a3c9b745 | 1383 | AliHLTAnalysisEnvironment fEnvironment; // see above |
f23a6e1a | 1384 | |
a655eae3 | 1385 | /** Set by ProcessEvent before the processing starts */ |
1386 | AliHLTEventID_t fCurrentEvent; // see above | |
f23a6e1a | 1387 | |
3cde846d | 1388 | /** internal event no */ |
a655eae3 | 1389 | int fEventCount; // see above |
1390 | ||
1391 | /** the number of failed events */ | |
1392 | int fFailedEvents; // see above | |
1393 | ||
1394 | /** event data struct of the current event under processing */ | |
1395 | AliHLTComponentEventData fCurrentEventData; // see above | |
1396 | ||
1397 | /** array of input data blocks of the current event */ | |
1398 | const AliHLTComponentBlockData* fpInputBlocks; //! transient | |
1399 | ||
1400 | /** index of the current input block */ | |
1401 | int fCurrentInputBlock; // see above | |
1402 | ||
1403 | /** data type of the last block search */ | |
1404 | AliHLTComponentDataType fSearchDataType; // see above | |
1405 | ||
1406 | /** name of the class for the object to search for */ | |
1407 | string fClassName; // see above | |
1408 | ||
1409 | /** array of generated input objects */ | |
1410 | TObjArray* fpInputObjects; //! transient | |
1411 | ||
1412 | /** the output buffer */ | |
1413 | AliHLTUInt8_t* fpOutputBuffer; //! transient | |
1414 | ||
1415 | /** size of the output buffer */ | |
1416 | AliHLTUInt32_t fOutputBufferSize; // see above | |
1417 | ||
1418 | /** size of data written to output buffer */ | |
1419 | AliHLTUInt32_t fOutputBufferFilled; // see above | |
1420 | ||
1421 | /** list of ouput block data descriptors */ | |
2be3f004 | 1422 | AliHLTComponentBlockDataList fOutputBlocks; // see above |
3cde846d | 1423 | |
90ebac25 | 1424 | /** stopwatch array */ |
1425 | TObjArray* fpStopwatches; //! transient | |
1426 | ||
79c114b5 | 1427 | /** array of memory files AliHLTMemoryFile */ |
2be3f004 | 1428 | AliHLTMemoryFilePList fMemFiles; //! transient |
79c114b5 | 1429 | |
559631d5 | 1430 | /** descriptor of the current run */ |
1431 | AliHLTRunDesc* fpRunDesc; //! transient | |
1432 | ||
1433 | /** the current DDL list */ | |
1434 | AliHLTEventDDL* fpDDLList; //! transient | |
1435 | ||
82c58a87 | 1436 | /** external fct to set CDB run no, indicates external CDB initialization */ |
1437 | void* fCDBSetRunNoFunc; //! transient | |
579d9eb7 | 1438 | |
1439 | /** id of the component in the analysis chain */ | |
1440 | string fChainId; //! transient | |
1441 | ||
48abe484 | 1442 | /** crc value of the chainid, used as a 32bit id */ |
1443 | AliHLTUInt32_t fChainIdCrc; //! transient | |
1444 | ||
a0aeb701 | 1445 | /** optional benchmarking for the component statistics */ |
1446 | TStopwatch* fpBenchmark; //! transient | |
1447 | ||
1448 | /** component requires steering data blocks */ | |
1449 | bool fRequireSteeringBlocks; //! transient | |
1450 | ||
48abe484 | 1451 | /** current event type */ |
1452 | AliHLTUInt32_t fEventType; //! transient | |
1453 | ||
abb52c8f | 1454 | /** component arguments */ |
1455 | string fComponentArgs; //! transient | |
1456 | ||
eafbc306 | 1457 | |
1458 | /** event done data */ | |
1459 | AliHLTComponentEventDoneData* fEventDoneData; //! transient | |
1460 | ||
1461 | /** Reserved size of the memory stored at fEventDoneData */ | |
1462 | unsigned long fEventDoneDataSize; //! transient | |
1463 | ||
9ace7282 | 1464 | /** Comression level for ROOT objects */ |
1465 | int fCompressionLevel; //! transient | |
1466 | ||
1467 | ClassDef(AliHLTComponent, 9) | |
f23a6e1a | 1468 | }; |
1469 | #endif |