]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTComponent.h
Fixing in/out tags in documentation
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTComponent.h
1 //-*- Mode: C++ -*-
2 // $Id$
3
4 #ifndef ALIHLTCOMPONENT_H
5 #define ALIHLTCOMPONENT_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   AliHLTComponent.h
11 //  @author Matthias Richter, Timm Steinbeck
12 //  @date   
13 //  @brief  Base class declaration for HLT components. 
14 //  @note   The class is both used in Online (PubSub) and Offline (AliRoot)
15 //          context
16
17
18 /**
19  * @defgroup alihlt_component Component handling of the HLT module
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  *
29  * @section alihlt_component_implementation Component implementation
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  *
60  */
61
62 #include <vector>
63 #include <string>
64 #include "AliHLTLogging.h"
65 #include "AliHLTDataTypes.h"
66 #include "AliHLTCommonCDBEntries.h"
67
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
81 class AliHLTComponentHandler;
82 class TObjArray;
83 class TMap;
84 class TStopwatch;
85 class TUUID;
86 class AliRawDataHeader;
87 class AliHLTComponent;
88 class AliHLTMemoryFile;
89 class AliHLTCTPData;
90 class AliHLTReadoutList;
91
92 /** list of component data type structures */
93 typedef vector<AliHLTComponentDataType>   AliHLTComponentDataTypeList;
94 /** list of component block data structures */
95 typedef vector<AliHLTComponentBlockData>  AliHLTComponentBlockDataList;
96 /** list of component statistics struct */
97 typedef vector<AliHLTComponentStatistics> AliHLTComponentStatisticsList;
98 /** list of component pointers */
99 typedef vector<AliHLTComponent*>          AliHLTComponentPList;
100 /** list of memory file pointers */
101 typedef vector<AliHLTMemoryFile*>         AliHLTMemoryFilePList;
102
103 /**
104  * @class AliHLTComponent
105  * Base class of HLT data processing components.
106  * The class provides a common interface for HLT data processing components.
107  * The interface can be accessed from the online HLT framework or the AliRoot
108  * offline analysis framework.
109  * @section alihltcomponent-properties Component identification and properties
110  * Each component must provide a unique ID, input and output data type indications,
111  * and a spawn function.
112  * @subsection alihltcomponent-req-methods Required property methods
113  * - @ref GetComponentID
114  * - @ref GetInputDataTypes (see @ref alihltcomponent-type for default
115  *   implementations.)
116  * - @ref GetOutputDataType (see @ref alihltcomponent-type for default
117  *   implementations.)
118  * - @ref GetOutputDataSize (see @ref alihltcomponent-type for default
119  *   implementations.)
120  * - @ref Spawn
121  *
122  * @subsection alihltcomponent-opt-mehods Optional handlers
123  * - @ref DoInit
124  * - @ref DoDeinit
125  * - @ref GetOutputDataTypes
126  *   If the component has multiple output data types @ref GetOutputDataType
127  *   should return @ref kAliHLTMultipleDataType. The framework will invoke
128  *   @ref GetOutputDataTypes, a list can be filled.
129  * - @ref Reconfigure
130  *   This function is invoked by the framework on a special event which
131  *   triggers the reconfiguration of the component.
132  *
133  * @subsection alihltcomponent-processing-mehods Data processing
134  * 
135  * 
136  * @subsection alihltcomponent-type Component type
137  * Components can be of type
138  * - @ref kSource     components which only produce data 
139  * - @ref kProcessor  components which consume and produce data
140  * - @ref kSink       components which only consume data
141  *
142  * where data production and consumption refer to the analysis data stream. In
143  * order to indicate the type, a child component can overload the
144  * @ref GetComponentType function.
145  * @subsubsection alihltcomponent-type-std Standard implementations
146  * Components in general do not need to implement this function, standard
147  * implementations of the 3 types are available:
148  * - AliHLTDataSource for components of type @ref kSource <br>
149  *   All types of data sources can inherit from AliHLTDataSource and must
150  *   implement the @ref AliHLTDataSource::GetEvent method. The class
151  *   also implements a standard method for @ref GetInputDataTypes.
152  *   
153  * - AliHLTProcessor for components of type @ref kProcessor <br>
154  *   All types of data processors can inherit from AliHLTProcessor and must
155  *   implement the @ref AliHLTProcessor::DoEvent method.
156  *
157  * - AliHLTDataSink for components of type @ref kSink <br>
158  *   All types of data processors can inherit from AliHLTDataSink and must
159  *   implement the @ref AliHLTDataSink::DumpEvent method. The class
160  *   also implements a standard method for @ref GetOutputDataType and @ref
161  *   GetOutputDataSize.
162  *
163  * @subsection alihltcomponent-environment Running environment
164  *
165  * In order to adapt to different environments (on-line/off-line), the component
166  * gets an environment structure with function pointers. The base class provides
167  * member functions for those environment dependend functions. The member 
168  * functions are used by the component implementation and are re-mapped to the
169  * corresponding functions.
170  *
171  * @section alihltcomponent-interfaces Component interfaces
172  * Each of the 3 standard component base classes AliHLTProcessor, AliHLTDataSource
173  * and AliHLTDataSink provides it's own processing method (see
174  * @ref alihltcomponent-type-std), which splits into a high and a low-level
175  * method. For the @ref alihltcomponent-low-level-interface, all parameters are
176  * shipped as function arguments, the component is supposed to write data to the
177  * output buffer and handle all block descriptors. 
178  * The @ref alihltcomponent-high-level-interface is the standard processing
179  * method and will be used whenever the low-level method is not overloaded.
180  *
181  * In both cases it is necessary to calculate/estimate the size of the output
182  * buffer before the processing. Output buffers can never be allocated inside
183  * the component because of the push-architecture of the HLT.
184  * For that reason the @ref GetOutputDataSize function should return a rough
185  * estimatian of the data to be produced by the component. The component is
186  * responsible for checking the memory size and must return -ENOSPC if the
187  * available buffer is too small, and update the estimator respectively. The
188  * framework will allocate a buffer of appropriate size and call the processing
189  * again.
190  *
191  * @subsection alihltcomponent-error-codes Return values/Error codes
192  * For return codes, the following scheme applies:
193  * - The data processing methods have to indicate error conditions by a negative
194  * error/return code. Preferably the system error codes are used like
195  * e.g. -EINVAL. This requires to include the header
196  * <pre>
197  * \#include \<cerrno\>
198  * </pre>
199  * This schema aplies to all interface functions of the component base class.
200  * For data processing it is as follows:
201  * - If no suitable input block could be found (e.g. no clusters for the TPC cluster
202  * finder) set size to 0, block list is empty, return 0
203  * - If no ususable or significant signal could be found in the input blocks
204  * return an empty output block, set size accordingly, and return 0. An empty output
205  * block here could be either a real empty one of size 0 (in which case size also
206  * would have to be set to zero) or a block filled with just the minimum necessary
207  * accounting/meta-structures. E.g. in the TPC
208  *
209  * @subsection alihltcomponent-high-level-interface High-level interface
210  * The high-level component interface provides functionality to exchange ROOT
211  * structures between components. In contrast to the 
212  * @ref alihltcomponent-low-level-interface, a couple of functions can be used
213  * to access data blocks of the input stream
214  * and send data blocks or ROOT TObject's to the output stream. The functionality
215  * is hidden from the user and is implemented by using ROOT's TMessage class.
216  *
217  * @subsubsection alihltcomponent-high-level-int-methods Interface methods
218  * The interface provides a couple of methods in order to get objects from the
219  * input, data blocks (non TObject) from the input, and to push back objects and
220  * data blocks to the output. For convenience there are several functions of 
221  * identical name (and similar behavior) with different parameters defined.
222  * Please refer to the function documentation.
223  * - @ref GetNumberOfInputBlocks <br>
224  *        return the number of data blocks in the input stream
225  * - @ref GetFirstInputObject <br>
226  *        get the first object of a specific data type
227  * - @ref GetNextInputObject <br>
228  *        get the next object of same data type as last GetFirstInputObject/Block call
229  * - @ref GetFirstInputBlock <br>
230  *        get the first block of a specific data type
231  * - @ref GetNextInputBlock <br>
232  *        get the next block of same data type as last GetFirstInputBlock/Block call
233  * - @ref PushBack <br>
234  *        insert an object or data buffer into the output
235  * - @ref CreateEventDoneData <br>
236  *        add event information to the output
237  * 
238  * In addition, the processing methods are simplified a bit by cutting out most of
239  * the parameters.
240  * @see 
241  * - @ref AliHLTProcessor::DoEvent
242  * - @ref AliHLTDataSource::GetEvent
243  * - @ref AliHLTDataSink::DumpEvent
244  *
245  * \em IMPORTANT: objects and block descriptors provided by the high-level interface
246  *  <b>MUST NOT BE DELETED</b> by the caller.
247  *
248  * @subsubsection alihltcomponent-high-level-int-guidelines High-level interface guidelines
249  * - Structures must inherit from the ROOT object base class TObject in order be 
250  * transported by the transportation framework.
251  * - all pointer members must be transient (marked <tt>//!</tt> behind the member
252  * definition), i.e. will not be stored/transported, or properly marked
253  * (<tt>//-></tt>) in order to call the streamer of the object the member is pointing
254  * to. The latter is not recomended. Structures to be transported between components
255  * should be streamlined.
256  * - no use of stl vectors/strings, use appropriate ROOT classes instead 
257  * 
258  * @subsection alihltcomponent-low-level-interface Low-level interface
259  * The low-level component interface consists of the specific data processing
260  * methods for @ref AliHLTProcessor, @ref AliHLTDataSource, and @ref AliHLTDataSink.
261  * - @ref AliHLTProcessor::DoEvent
262  * - @ref AliHLTDataSource::GetEvent
263  * - @ref AliHLTDataSink::DumpEvent
264  * 
265  * The base class passes all relevant parameters for data access directly on to the
266  * component. Input blocks can be accessed by means of the array <tt> blocks </tt>.
267  * Output data are written directly to shared memory provided by the pointer
268  * <tt> outputPtr </tt> and output block descriptors are inserted directly to the
269  * list <tt> outputBlocks </tt>.
270  *
271  * \b NOTE: The high-level input data access methods can be used also from the low
272  * level interface. Also the PushBack functions can be used BUT ONLY if no data is
273  * written to the output buffer and no data block descriptors are inserted into the
274  * output block list.
275  *
276  * @section alihltcomponent-initialization Component initialization and configuration
277  * The component interface provides two optional methods for component initialization
278  * and configuration. The @ref DoInit function is called once before the processing.
279  * During the event processing, a special event can trigger a reconfiguration and the
280  * @ref Reconfigure method is called. There are three possible options of initialization
281  * and configuration:
282  * - default values: set directly in the source code
283  * - OCDB objects: all necessary information must be loaded from OCDB objects. The
284  *   Offline Conditions Data Base stores objects specifically valid for individual runs
285  *   or run ranges.
286  * - Component arguments: can be specified for every component in the chain
287  *   configuration. The arguments can be used to override specific parameters of the
288  *   component.
289  *
290  * As a general rule, the three options should be processed in that sequence, i.e
291  * default parameters might be overridden by OCDB configuration, and the latter one
292  * by component arguments.
293  *
294  * @subsection alihltcomponent-initialization-arguments Component arguments
295  * In normal operation, components are supposed to run without any additional argument,
296  * however such arguments can be useful for testing and debugging. The idea follows
297  * the format of command line arguments. A keyword is indicated by a dash and an
298  * optional argument might follow, e.g.:
299  * <pre>
300  * -argument1 0.5 -argument2
301  * </pre>
302  * In this case argument1 requires an additional parameter whereas argument2 does not.
303  * The arguments will be provided as an array of separated arguments.
304  *
305  * Component arguments can be classified into initialization arguments and configuration
306  * arguments. The latter are applicable for both the @ref DoInit and @ref Reconfigure
307  * method whereas initialization arguments are not applicable after DoInit.
308  *
309  * @subsection alihltcomponent-initialization-ocdb OCDB objects
310  * OCDB objects are ROOT <tt>TObjects</tt> and can be of any type. This is in particular
311  * useful for complex parameter sets. However in most cases, a simple approach of human
312  * readable command line arguments is appropriate. Such a string can be simply stored
313  * in a TObjString (take note that the TString does not derive from TObject). The
314  * same arguments as for the command line can be used. Take note that in the TObjString
315  * all arguments are separated by blanks, instead of being in an array of separate
316  * strings.
317  *
318  * The base class provides two functions regarding OCDB objects: 
319  * - LoadAndExtractOCDBObject() loads the OCDB entry for the specified path and extracts
320  *                              the TObject from it. An optional key allows to access
321  *                              a TObject within a TMap
322  * - ConfigureFromCDBTObjString() can load a number of OCDB objects and calls the
323  *                              argument parsing ConfigureFromArgumentString
324  *
325  *
326  * @subsection alihltcomponent-initialization-sequence Initialization sequence
327  * Using the approach of <tt>TObjString</tt>-type configuration objects allows to treat
328  * configuration from both @ref DoInit and @ref Reconfigure in the same way.
329  *
330  * The base class provides the function ConfigureFromArgumentString() which loops over
331  * all arguments and calls the child's method ScanConfigurationArgument(). Here the
332  * actual treatment of the argument and its parameters needs to be implemented.
333  * ConfigureFromArgumentString() can treat both arrays of arguments and arguments in
334  * one single string separated by blanks. The two options can be mixed.
335  *
336  * A second base class function ConfigureFromCDBTObjString() allows to configure
337  * directly from a number of OCDB objects. This requires the entries to be of
338  * type TObjString and the child implementation of ScanConfigurationArgument().
339  * The object can also be of type TMap with TObjStrings as key-value pairs. The
340  * key identifier can be chosen by the component implementation. Normally it will
341  * be the run type ("p","A-A", "p-A", ...) or e.g. the trigger code secified by
342  * ECS.
343  *
344  * @section alihltcomponent-handling Component handling 
345  * The handling of HLT analysis components is carried out by the AliHLTComponentHandler.
346  * Component are registered automatically at load-time of the component shared library
347  * under the following suppositions:
348  * - the component library has to be loaded from the AliHLTComponentHandler using the
349  *   @ref AliHLTComponentHandler::LoadLibrary method.
350  * - the library defines an AliHLTModuleAgent which registers all components.
351  *   See AliHLTModuleAgent::RegisterComponents                               <br>
352  *     or                                                                    <br>
353  * - the component implementation defines one global object (which is generated
354  *   when the library is loaded)                                             <br>
355  *
356  * @subsection alihltcomponent-design-rules General design considerations
357  * The analysis code should be implemented in one or more destict class(es). A 
358  * \em component should be implemented which interface the destict analysis code to the
359  * component interface. This component generates the analysis object dynamically. <br>
360  *
361  * Assume you have an implemetation <tt> AliHLTDetMyAnalysis </tt>, another class <tt>
362  * AliHLTDetMyAnalysisComponent </tt> contains:
363  * <pre>
364  * private:
365  *   AliHLTDetMyAnalysis* fMyAnalysis;  //!
366  * </pre>
367  * The object should then be instantiated in the DoInit handler of 
368  * <tt>AliHLTDetMyAnalysisComponent </tt>, and cleaned in the DoDeinit handler.
369  *
370  * Further rules:
371  * - avoid big static arrays in the component, allocate the memory at runtime
372  * - allocate all kind of complex data members (like classes, ROOT TObjects of
373  *   any kind) dynamically in DoInit and clean up in DoDeinit
374  *
375  * @section alihlt_component_arguments Default arguments
376  * The component base class provides some default arguments:
377  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
378  * \li -loglevel=level     <br>
379  * \li -object-compression=level     <br>
380  *      compression level for ROOT objects, default is defined by
381  *      @ref ALIHLTCOMPONENT_DEFAULT_OBJECT_COMPRESSION
382  * \li -pushback-period=period     <br>
383  *      scale down for PushBack of objects, shipped only for one event
384  *      every <i>period</i> seconds
385  *
386  * @ingroup alihlt_component
387  * @section alihltcomponent-members Class members
388  */
389 class AliHLTComponent : public AliHLTLogging {
390  public:
391   /** standard constructor */
392   AliHLTComponent();
393   /** standard destructor */
394   virtual ~AliHLTComponent();
395
396   /** component type definitions */
397   enum TComponentType { kUnknown=0, kSource=1, kProcessor=2, kSink=3 };
398
399   /**
400    * Init function to prepare data processing.
401    * Initialization of common data structures for a sequence of events.
402    * The call is redirected to the internal method DoInit which can be
403    * overridden by the child class.
404    * During Init also the environment structure is passed to the component.
405    * @param comenv         environment pointer with environment dependent function
406    *                       calls
407    * @param environParam   additional parameter for function calls, the pointer
408    *                       is passed as it is
409    * @param argc           size of the argument array
410    * @param argv           augment array for component initialization
411    */
412   virtual int Init( const AliHLTAnalysisEnvironment* comenv, void* environParam, int argc, const char** argv );
413
414   /**
415    * Clean-up function to terminate data processing.
416    * Clean-up of common data structures after data processing.
417    * The call is redirected to the internal method @ref DoDeinit which can be
418    * overridden by the child class.
419    */
420   virtual int Deinit();
421
422   /**
423    * Processing of one event.
424    * The method is the entrance of the event processing. The parameters are
425    * cached for uses with the high-level interface and the DoProcessing
426    * implementation is called.
427    *
428    * @param evtData
429    * @param blocks
430    * @param trigData
431    * @param outputPtr
432    * @param size
433    * @param outputBlockCnt  out: size of the output block array, set by the component
434    * @param outputBlocks    out: the output block array is allocated internally
435    * @param edd
436    * @return neg. error code if failed
437    */
438   int ProcessEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
439                             AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
440                             AliHLTUInt32_t& size, AliHLTUInt32_t& outputBlockCnt, 
441                             AliHLTComponentBlockData*& outputBlocks,
442                             AliHLTComponentEventDoneData*& edd );
443
444   /**
445    * Internal processing of one event.
446    * The method is pure virtual and implemented by the child classes 
447    * - @ref AliHLTProcessor
448    * - @ref AliHLTDataSource
449    * - @ref AliHLTDataSink
450    *
451    * @param evtData
452    * @param blocks
453    * @param trigData
454    * @param outputPtr
455    * @param size
456    * @param outputBlocks    out: the output block array is allocated internally
457    * @param edd
458    * @return neg. error code if failed
459    */
460   virtual int DoProcessing( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
461                             AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
462                             AliHLTUInt32_t& size,
463                             AliHLTComponentBlockDataList& outputBlocks,
464                             AliHLTComponentEventDoneData*& edd ) = 0;
465
466   /**
467    * Init the CDB.
468    * The function must not be called when running in AliRoot unless it it
469    * really wanted. The CDB path will be set to the specified path, which might
470    * override the path initialized at the beginning of the AliRoot reconstruction.
471    *
472    * The method is used from the external interface in order to set the correct
473    * path when running on-line. The function also initializes the function
474    * callback for setting the run no during operation.
475    *
476    * A separation of library and component handling is maybe appropriate in the
477    * future. Using the global component handler here is maybe not the cleanest
478    * solution.
479    * @param cdbPath      path of the CDB
480    * @param pHandler     the component handler used for llibrary handling.
481    */
482   int InitCDB(const char* cdbPath, AliHLTComponentHandler* pHandler);
483
484   /**
485    * Set the run no for the CDB.
486    * The function must not be called when running in AliRoot unless it it
487    * really wanted. The CDB path will be set to the specified path, which might
488    * override the run no initialized at the beginning of the AliRoot reconstruction.
489    * InitCDB() has to be called before in order to really change the CDB settings.
490    *
491    * The method is used from the external interface in order to set the correct
492    * path when running on-line.
493    */
494   int SetCDBRunNo(int runNo);
495
496   /**
497    * Set the run description.
498    * The run description is set before the call of Init() -> DoInit().
499    * @note: This functionality has been added in Juli 2008. The transmission of
500    * run properties by a special SOR (SOD event in DAQ terminalogy but this was
501    * changed after the HLT interface was designed) event is not sufficient because
502    * the data might be needed already in the DoInit handler of the component.
503    * @param desc    run descriptor, currently only the run no member is used
504    * @param runType originally, run type was supposed to be a number and part
505    *                of the run descriptor. But it was defined as string later
506    */
507   int SetRunDescription(const AliHLTRunDesc* desc, const char* runType);
508
509   /**
510    * Set the component description.
511    * The description string can contain tokens separated by blanks, a token
512    * consists of a key and an optional value separated by '='.
513    * Possible keys:
514    * \li -chainid=id        string id within the chain of the instance
515    *
516    * @param desc    component description
517    */
518   int SetComponentDescription(const char* desc);
519
520   /**
521    * Set the running environment for the component.
522    * Originally, the environment was set in the Init function. However, the setup of
523    * the CDB is required before. In order to have proper logging functionality, the
524    * environment is required.
525    * @param comenv         environment pointer with environment dependent function
526    *                       calls
527    * @param environParam   additional parameter for function calls, the pointer
528    *                       is passed as it is
529    */
530   int SetComponentEnvironment(const AliHLTAnalysisEnvironment* comenv, void* environParam);
531
532   // Information member functions for registration.
533
534   /**
535    * Get the type of the component.
536    * The function is pure virtual and must be implemented by the child class.
537    * @return component type id
538    */
539   virtual TComponentType GetComponentType() = 0; // Source, sink, or processor
540
541   /**
542    * Get the id of the component.
543    * Each component is identified by a unique id.
544    * The function is pure virtual and must be implemented by the child class.
545    * @return component id (string)
546    */
547   virtual const char* GetComponentID() = 0;
548
549   /**
550    * Get the input data types of the component.
551    * The function is pure virtual and must be implemented by the child class.
552    * @return list of data types in the vector reference
553    */
554   virtual void GetInputDataTypes( AliHLTComponentDataTypeList& ) = 0;
555
556   /**
557    * Get the output data type of the component.
558    * The function is pure virtual and must be implemented by the child class.
559    * @return output data type
560    */
561   virtual AliHLTComponentDataType GetOutputDataType() = 0;
562
563   /**
564    * Get the output data types of the component.
565    * The function can be implemented to indicate multiple output data types
566    * in the target array.
567    * @ref GetOutputDataType must return @ref kAliHLTMultipleDataType in order
568    * to invoke this method.
569    * @param tgtList          list to receive the data types
570    * @return no of output data types, data types in the target list
571    */
572   virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
573
574   /**
575    * Get a ratio by how much the data volume is shrunken or enhanced.
576    * The function is pure virtual and must be implemented by the child class.
577    * @param constBase        <i>return</i>: additive part, independent of the
578    *                                   input data volume  
579    * @param inputMultiplier  <i>return</i>: multiplication ratio
580    * @return values in the reference variables
581    */
582   virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) = 0;
583
584   /**
585    * Get a list of OCDB object description.
586    * The list of objects is provided in a TMap
587    * - key: complete OCDB path, e.g. GRP/GRP/Data
588    * - value: short description why the object is needed
589    * Key and value objects created inside this class go into ownership of
590    * target TMap.
591    * @param targetMap   TMap instance receiving the list
592    * @return void
593    */
594   virtual void GetOCDBObjectDescription( TMap* const targetArray);
595
596   /**
597    * Spawn function.
598    * Each component must implement a spawn function to create a new instance of 
599    * the class. Basically the function must return <i>new <b>my_class_name</b></i>.
600    * @return new class instance
601    */
602   virtual AliHLTComponent* Spawn() = 0;
603
604   /**
605    * check the availability of the OCDB entry descriptions in the TMap
606    *  key : complete OCDB path of the entry
607    *  value : auxiliary object - short description
608    * if the external map was not provided the function invokes
609    * interface function GetOCDBObjectDescription() to retrieve the list.
610    * @param externList  map of entries to be tested
611    * @result 0 if all found, -ENOENT if objects not found
612    */
613   int CheckOCDBEntries(const TMap* const externList=NULL);
614
615   /**
616    * Find matching data types between this component and a consumer component.
617    * Currently, a component can produce only one type of data. This restriction is most
618    * likely to be abolished in the future.
619    * @param pConsumer a component and consumer of the data produced by this component
620    * @param tgtList   reference to a vector list to receive the matching data types.
621    * @return >= 0 success, neg. error code if failed
622    */ 
623   int FindMatchingDataTypes(AliHLTComponent* pConsumer, AliHLTComponentDataTypeList* tgtList);
624  
625   /**
626    * Set the global component handler.
627    * The static method is needed for the automatic registration of components. 
628    */
629   static int SetGlobalComponentHandler(AliHLTComponentHandler* pCH, int bOverwrite=0);
630
631   /**
632    * Clear the global component handler.
633    * The static method is needed for the automatic registration of components. 
634    */
635   static int UnsetGlobalComponentHandler();
636
637   /**
638    * Helper function to convert the data type to a string.
639    * @param type        data type structure
640    * @param mode        0 print string origin:type          <br>
641    *                    1 print chars                       <br>
642    *                    2 print numbers                     <br>
643    *                    3 print 'type' 'origin' 
644    */
645   static string DataType2Text( const AliHLTComponentDataType& type, int mode=0);
646
647   /**
648    * Calculate a CRC checksum of a data buffer.
649    * Polynomial for the calculation is 0xD8.
650    */
651   static AliHLTUInt32_t CalculateChecksum(const AliHLTUInt8_t* buffer, int size);
652
653   /**
654    * Helper function to print content of data type.
655    */
656   static void PrintDataTypeContent(AliHLTComponentDataType& dt, const char* format=NULL);
657
658   /**
659    * helper function to initialize AliHLTComponentEventData structure
660    */
661   static void FillEventData(AliHLTComponentEventData& evtData);
662
663   /**
664    * Print info on an AliHLTComponentDataType structure
665    * This is just a helper function to examine an @ref AliHLTComponentDataType
666    * structur.
667    */
668   static void PrintComponentDataTypeInfo(const AliHLTComponentDataType& dt);
669
670   /**
671    * Fill AliHLTComponentBlockData structure with default values.
672    * @param blockData   reference to data structure
673    */
674   static void FillBlockData( AliHLTComponentBlockData& blockData );
675
676   /**
677    * Fill AliHLTComponentShmData structure with default values.
678    * @param shmData   reference to data structure
679    */
680   static void FillShmData( AliHLTComponentShmData& shmData );
681
682   /**
683    * Fill AliHLTComponentDataType structure with default values.
684    * @param dataType   reference to data structure
685    */
686   static void FillDataType( AliHLTComponentDataType& dataType );
687   
688   /**
689    * Copy data type structure
690    * Copies the value an AliHLTComponentDataType structure to another one
691    * @param [out] tgtdt   target structure
692    * @param [in] srcdt   source structure
693    */
694   static void CopyDataType(AliHLTComponentDataType& tgtdt, const AliHLTComponentDataType& srcdt);
695
696   /**
697    * Set the ID and Origin of an AliHLTComponentDataType structure.
698    * The function sets the fStructureSize member and copies the strings
699    * to the ID and Origin. Only characters from the valid part of the string
700    * are copied, the rest is filled with 0's. <br>
701    * Please note that the fID and fOrigin members are not strings, just arrays of
702    * chars of size @ref kAliHLTComponentDataTypefIDsize and
703    * @ref kAliHLTComponentDataTypefOriginSize respectively and not necessarily with
704    * a terminating zero. <br>
705    * It is possible to pass NULL pointers as id or origin argument, in that case they
706    * are just ignored.
707    * @param tgtdt   target data type structure
708    * @param id      ID string
709    * @param origin  Origin string
710    */
711   static void SetDataType(AliHLTComponentDataType& tgtdt, const char* id, const char* origin);
712
713   /**
714    * Set the ID and Origin of an AliHLTComponentDataType structure.
715    * Given the fact that the data type ID is 64bit wide and origin 32, this helper
716    * function sets the data type from those two parameters.
717    * @param dt      target data type structure
718    * @param id      64bit id
719    * @param orig    32bit origin
720    */
721   static void SetDataType(AliHLTComponentDataType& dt, AliHLTUInt64_t id, AliHLTUInt32_t orig); 
722
723   /**
724    * Extract a component table entry from the payload buffer.
725    * The entry consists of the AliHLTComponentTableEntry structure, the array of
726    * parents and a description string of the format 'chain-id{component-id:component-args}'.
727    * The function fills all the variables after a consistency check.
728    */
729   static int ExtractComponentTableEntry(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size,
730                                         string& chainId, string& compId, string& compParam,
731                                         vector<AliHLTUInt32_t>& parents) {
732     int dummy=0;
733     return ExtractComponentTableEntry(pBuffer, size, chainId, compId, compParam, parents, dummy);
734   }
735
736   static int ExtractComponentTableEntry(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size,
737                                         string& chainId, string& compId, string& compParam,
738                                         vector<AliHLTUInt32_t>& parents, int& level);
739
740   /**
741    * Extracts the different data parts from the trigger data structure.
742    * @param [in] trigData  The trigger data as passed to the DoProcessing method.
743    * @param [out] attributes  The data block attributes given by the HLT framework.
744    * @param [out] status  The HLT status bits given by the HLT framework.
745    * @param [out] cdh  The common data header received from DDL links.
746    * @param [out] readoutlist  The readout list to fill with readout list bits
747    *                           passed on by the HLT framework.
748    * @param [in] printErrors  If true then error messages are generated as necessary
749    *                          and suppressed otherwise.
750    * @note If any of the output parameters are set to NULL then the field is not set.
751    *   For example, the following line will only fill the CDH pointer.
752    *   \code
753    *     AliRawDataHeader* cdh;
754    *     ExtractTriggerData(trigData, NULL, NULL, &cdh, NULL);
755    *   \endcode
756    * @return zero on success or one of the following error codes on failure.
757    *   if a non-zero error code is returned then none of the output parameters are
758    *   modified.
759    *    \li -ENOENT  The <i>trigData</i> structure size is wrong.
760    *    \li -EBADF   The <i>trigData</i> data size is wrong.
761    *    \li -EBADMSG The common data header (CDH) in the trigger data has the wrong
762    *                 number of words indicated.
763    *    \li -EPROTO  The readout list structure in the trigger data has the wrong
764    *                 number of words indicated.
765    */
766   static int ExtractTriggerData(
767       const AliHLTComponentTriggerData& trigData,
768       const AliHLTUInt8_t (**attributes)[gkAliHLTBlockDAttributeCount],
769       AliHLTUInt64_t* status,
770       const AliRawDataHeader** cdh,
771       AliHLTReadoutList* readoutlist,
772       bool printErrors = false
773     );
774
775   /**
776    * Extracts the readout list from a trigger data structure.
777    * @param [in] trigData  The trigger data as passed to the DoProcessing method.
778    * @param [out] list  The output readout list to fill.
779    * @param [in] printErrors  If true then error messages are generated as necessary
780    *                          and suppressed otherwise.
781    * @return zero on success or one of the error codes returned by ExtractTriggerData.
782    */
783   static int GetReadoutList(
784       const AliHLTComponentTriggerData& trigData, AliHLTReadoutList& list,
785       bool printErrors = false
786     )
787   {
788     return ExtractTriggerData(trigData, NULL, NULL, NULL, &list, printErrors);
789   }
790
791   /**
792    * Extracts the event type from the given Common Data Header.
793    * @param [in] cdh  The Common Data Header to extract the event type from.
794    * @return the event type code from the CDH.
795    */
796   static AliHLTUInt32_t ExtractEventTypeFromCDH(const AliRawDataHeader* cdh);
797   
798   /**
799    * Stopwatch type for benchmarking.
800    */
801   enum AliHLTStopwatchType {
802     /** total time for event processing */
803     kSWBase,
804     /** detector algorithm w/o interface callbacks */
805     kSWDA,
806     /** data sources */
807     kSWInput,
808     /** data sinks */
809     kSWOutput,
810     /** number of types */
811     kSWTypeCount
812   };
813
814   /**
815    * Helper class for starting and stopping a stopwatch.
816    * The guard can be used by instantiating an object in a function. The
817    * specified stopwatch is started and the previous stopwatch put on
818    * hold. When the function is terminated, the object is deleted automatically
819    * deleted, stopping the stopwatch and starting the one on hold.<br>
820    * \em IMPORTANT: never create dynamic objects from this guard as this violates
821    * the idea of a guard.
822    */
823   class AliHLTStopwatchGuard {
824   public:
825     /** standard constructor (not for use) */
826     AliHLTStopwatchGuard();
827     /** constructor */
828     AliHLTStopwatchGuard(TStopwatch* pStart);
829     /** copy constructor (not for use) */
830     AliHLTStopwatchGuard(const AliHLTStopwatchGuard&);
831     /** assignment operator (not for use) */
832     AliHLTStopwatchGuard& operator=(const AliHLTStopwatchGuard&);
833     /** destructor */
834     ~AliHLTStopwatchGuard();
835
836   private:
837     /**
838      * Hold the previous guard for the existence of this guard.
839      * Checks whether this guard controls a new stopwatch. In that case, the
840      * previous guard and its stopwatch are put on hold.
841      * @param pSucc        instance of the stopwatch of the new guard
842      * @return    1 if pSucc is a different stopwatch which should
843      *            be started<br>
844      *            0 if it controls the same stopwatch
845      */
846     int Hold(const TStopwatch* pSucc);
847
848     /**
849      * Resume the previous guard.
850      * Checks whether the peceeding guard controls a different stopwatch. In that
851      * case, the its stopwatch is resumed.
852      * @param pSucc        instance of the stopwatch of the new guard
853      * @return    1 if pSucc is a different stopwatch which should
854      *            be stopped<br>
855      *            0 if it controls the same stopwatch
856      */
857     int Resume(const TStopwatch* pSucc);
858
859     /** the stopwatch controlled by this guard */
860     TStopwatch* fpStopwatch;                                                //!transient
861
862     /** previous stopwatch guard, put on hold during existence of the guard */
863     AliHLTStopwatchGuard* fpPrec;                                           //!transient
864
865     /** active stopwatch guard */
866     static AliHLTStopwatchGuard* fgpCurrent;                                //!transient
867   };
868
869   /**
870    * Set a stopwatch for a given purpose.
871    * @param pSW         stopwatch object
872    * @param type        type of the stopwatch
873    */
874   int SetStopwatch(TObject* pSW, AliHLTStopwatchType type=kSWBase);
875
876   /**
877    * Init a set of stopwatches.
878    * @param pStopwatches object array of stopwatches
879    */
880   int SetStopwatches(TObjArray* pStopwatches);
881
882   /**
883    * Customized logging function.
884    * The chain id, component id and pointer is added at the beginning of each message.
885    */
886   int LoggingVarargs(AliHLTComponentLogSeverity severity, 
887                      const char* originClass, const char* originFunc,
888                      const char* file, int line, ... ) const;
889
890   /**
891    * Get size of last serialized object.
892    * During PushBack, TObjects are serialized in a separate buffer. The
893    * size of the last object can be retrieved by this function.
894    *
895    * This might be especially useful for PushBack failures caused by too
896    * small output buffer.
897    */
898   int GetLastObjectSize() const {return fLastObjectSize;}
899
900   /**
901    * This method generates a V4 Globally Unique Identifier (GUID) using the
902    * ROOT TRandom3 pseudo-random number generator with the process' UID, GID
903    * PID and host address as seeds. For good measure MD5 sum hashing is also
904    * applied.
905    * @return the newly generated GUID structure.
906    */
907   static TUUID GenerateGUID();
908
909   /// get the compression level for TObjects
910   int GetCompressionLevel() const {return fCompressionLevel;}
911
912  protected:
913
914   /**
915    * Default method for the internal initialization.
916    * The method is called by @ref Init
917    */
918   virtual int DoInit( int argc, const char** argv );
919
920   /**
921    * Default method for the internal clean-up.
922    * The method is called by @ref Deinit
923    */
924   virtual int DoDeinit();
925
926   /**
927    * Reconfigure the component.
928    * The method is called when an event of type @ref kAliHLTDataTypeComConf
929    * {COM_CONF:PRIV} is received by the component. If the event is sent as
930    * part of a normal event, the component configuration is called first.
931    *
932    * The CDB path parameter specifies the path in the CDB, i.e. without
933    * leading absolute path of the CDB location. The framework might also
934    * provide the id of the component in the analysis chain.
935    *
936    * The actual sequence of configuration depends on the component. As a
937    * general rule, the component should load the specific OCDB object if
938    * provided as parameter, and load the default objects if the parameter
939    * is NULL. However, other schemes are possible. See @ref 
940    *
941    * \b Note: The CDB will be initialized by the framework, either already set
942    * from AliRoot or from the wrapper interface during initialization.
943    *
944    * @param cdbEntry     path of the cdbEntry
945    * @param chainId      the id/name of the component in the current analysis
946    *                     chain. This is not necessarily the same as what is
947    *                     returned by the GetComponentID() method.
948    * @note both parameters can be NULL, check before usage
949    */
950   virtual int Reconfigure(const char* cdbEntry, const char* chainId);
951
952   /**
953    * Read the Preprocessor values.
954    * The function is invoked when the component is notified about available/
955    * updated data points from the detector Preprocessors. The 'modules'
956    * argument contains all detectors for which the Preprocessors have
957    * updated data points. The component has to implement the CDB access to
958    * get the desired data points.
959    * @param modules     detectors for which the Preprocessors have updated
960    *                    data points: TPC, TRD, ITS, PHOS, MUON, or ALL if
961    *                    no argument was received.
962    * @return neg. error code if failed
963    */
964   virtual int ReadPreprocessorValues(const char* modules);
965
966   /**
967    * Child implementation to scan a number of configuration arguments.
968    * The method is invoked by the framework in conjunction with the
969    * common framework functions ConfigureFromArgumentString and
970    * ConfigureFromCDBTObjString.
971    * Function needs to scan the argument and optional additional
972    * parameters and returns the number of elements in the array which
973    * have been treated.
974    * @param argc
975    * @param argv
976    * @return number of arguments which have been scanned or neg error
977    *         code if failed                                              <br>
978    *         \li -EINVAL      unknown argument
979    *         \li -EPROTO      protocol error, e.g. missing parameter
980    */
981   virtual int ScanConfigurationArgument(int argc, const char** argv);
982
983   /**
984    * Custom handler for the SOR event.
985    * Is invoked from the base class if an SOR event is in the block list.
986    * The handler is called before the processing function. The processing
987    * function is skipped if there are no other data blocks available.
988    *
989    * The SOR event is generated by the PubSub framework in response to
990    * the DAQ start of data (SOD - has been renamed after HLT interface
991    * was designed). The SOD event consists of 3 blocks:
992    * - ::kAliHLTDataTypeEvent block: spec ::gkAliEventTypeStartOfRun
993    * - SOD block of type ::kAliHLTDataTypeSOR, payload: AliHLTRunDesc struct
994    * - run type block ::kAliHLTDataTypeRunType, payload: run type string 
995    *
996    * Run properties can be retrieved by getters like GetRunNo().
997    * @return neg. error code if failed
998    */
999   virtual int StartOfRun();
1000
1001   /**
1002    * Custom handler for the EOR event.
1003    * Is invoked from the base class if an EOR event is in the block list.
1004    * The handler is called before the processing function. The processing
1005    * function is skipped if there are no other data blocks available.
1006    *
1007    * See StartOfRun() for more comments of the sequence of steering events.
1008    *
1009    * @return neg. error code if failed
1010    */
1011   virtual int EndOfRun();
1012
1013   /**
1014    * Check whether a component requires all steering blocks.
1015    * Childs can overload in order to indicate that they want to
1016    * receive also the steering data blocks. There is also the
1017    * possibility to add the required data types to the input
1018    * data type list in GetInputDataTypes().
1019    */
1020   virtual bool RequireSteeringBlocks() const {return false;}
1021
1022   /**
1023    * General memory allocation method.
1024    * All memory which is going to be used 'outside' of the interface must
1025    * be provided by the framework (online or offline).
1026    * The method is redirected to a function provided by the current
1027    * framework. Function pointers are transferred via the @ref
1028    * AliHLTAnalysisEnvironment structure.
1029    */
1030   void* AllocMemory( unsigned long size );
1031
1032   /**
1033    * Helper function to create a monolithic BlockData description block out
1034    * of a list BlockData descriptors.
1035    * For convenience, inside the interface vector lists are used, to make the
1036    * interface pure C style, monilithic blocks must be exchanged. 
1037    * The method is redirected to a function provided by the current
1038    * framework. Function pointers are transferred via the @ref
1039    * AliHLTAnalysisEnvironment structure.
1040    */
1041   int MakeOutputDataBlockList( const AliHLTComponentBlockDataList& blocks, AliHLTUInt32_t* blockCount,
1042                                AliHLTComponentBlockData** outputBlocks );
1043
1044   /**
1045    * Fill the EventDoneData structure.
1046    * The method is redirected to a function provided by the current
1047    * framework. Function pointers are transferred via the @ref
1048    * AliHLTAnalysisEnvironment structure.
1049    */
1050   int GetEventDoneData( unsigned long size, AliHLTComponentEventDoneData** edd ) const;
1051
1052   /**
1053    * Allocate an EventDoneData structure for the current event .
1054    * The method allocates the memory internally and does not interact with the current Framework.
1055    * The allocated data structure is empty initially and can be filled by calls to the 
1056    * @ref PushEventDoneData method. The memory will be automatically released after the event has been processed.
1057    * 
1058    */
1059   int ReserveEventDoneData( unsigned long size );
1060
1061   /**
1062    * Push a 32 bit word of data into event done data for the current event which
1063    * has previously been allocated by the @ref ReserveEventDoneData method.
1064    */
1065   int PushEventDoneData( AliHLTUInt32_t eddDataWord );
1066
1067   /**
1068    * Release event done data previously reserved by @ref ReserveEventDoneData
1069    */
1070    void ReleaseEventDoneData();
1071
1072   /**
1073    * Get the pointer to the event done data available/built so far for the current event via
1074    * @ref ReserveEventDoneData and @ref PushEventDoneData
1075    */
1076   AliHLTComponentEventDoneData* GetCurrentEventDoneData() const
1077     {
1078     return fEventDoneData;
1079     }
1080
1081   /**
1082    * Helper function to convert the data type to a string.
1083    */
1084   void DataType2Text(const AliHLTComponentDataType& type, char output[kAliHLTComponentDataTypefIDsize+kAliHLTComponentDataTypefOriginSize+2]) const;
1085
1086   /**
1087    * Loop through a list of component arguments.
1088    * The list can be either an array of separated strings or one single
1089    * string containing blank separated arguments, or both mixed.
1090    * ScanConfigurationArgument() is called to allow the component to treat
1091    * the individual arguments.
1092    * @return neg. error code if failed
1093    */
1094   int ConfigureFromArgumentString(int argc, const char** argv);
1095
1096   /**
1097    * Read configuration objects from OCDB and configure from
1098    * the content of TObjString entries.
1099    * @param entries   blank separated list of OCDB paths
1100    * @param key       if the entry is a TMap, search for the corresponding object
1101    * @return neg. error code if failed
1102    */
1103   int ConfigureFromCDBTObjString(const char* entries, const char* key=NULL);
1104
1105   /**
1106    * Load specified entry from the OCDB and extract the object.
1107    * The entry is explicitely unloaded from the cache before it is loaded.
1108    * If parameter key is specified the OCDB object is treated as TMap
1109    * and the TObject associated with 'key' is loaded.
1110    * @param path      path of the entry under to root of the OCDB
1111    * @param version   version of the entry
1112    * @param subVersion  subversion of the entry
1113    * @param key       key of the object within TMap
1114    */
1115   TObject* LoadAndExtractOCDBObject(const char* path, int version = -1, int subVersion = -1, const char* key=NULL) const;
1116
1117   TObject* LoadAndExtractOCDBObject(const char* path, const char* key) const {
1118     return LoadAndExtractOCDBObject(path, -1, -1, key);
1119   }
1120
1121   /**
1122    * Get event number.
1123    * @return value of the internal event counter
1124    */
1125   int GetEventCount() const;
1126
1127   /**
1128    * Get the number of input blocks.
1129    * @return number of input blocks
1130    */
1131   int GetNumberOfInputBlocks() const;
1132
1133   /**
1134    * Get id of the current event
1135    * @return event id
1136    */
1137   AliHLTEventID_t GetEventId() const;
1138
1139   /**
1140    * Get the first object of a specific data type from the input data.
1141    * The High-level methods provide functionality to transfer ROOT data
1142    * structures which inherit from TObject.
1143    *
1144    * The method looks for the first ROOT object of type dt in the input stream.
1145    * If also the class name is provided, the object is checked for the right
1146    * class type. The input data block needs a certain structure, namely the 
1147    * buffer size as first word. If the cross check fails, the retrieval is
1148    * silently abandoned, unless the \em bForce parameter is set.<br>
1149    * \b Note: THE OBJECT MUST NOT BE DELETED by the caller.
1150    *
1151    * If called without parameters, the function tries to create objects from
1152    * all available input blocks, also the ones of data type kAliHLTVoidDataType
1153    * which are not matched by kAliHLTAnyDataType.
1154    *
1155    * @param dt          data type of the object
1156    * @param classname   class name of the object
1157    * @param bForce      force the retrieval of an object, error messages
1158    *                    are suppressed if \em bForce is not set
1159    * @return pointer to @ref TObject, NULL if no objects of specified type
1160    *         available
1161    */
1162   const TObject* GetFirstInputObject(const AliHLTComponentDataType& dt=kAliHLTAllDataTypes,
1163                                      const char* classname=NULL,
1164                                      int bForce=0);
1165
1166   /**
1167    * Get the first object of a specific data type from the input data.
1168    * The High-level methods provide functionality to transfer ROOT data
1169    * structures which inherit from TObject.
1170    * The method looks for the first ROOT object of type specified by the ID and 
1171    * Origin strings in the input stream.
1172    * If also the class name is provided, the object is checked for the right
1173    * class type. The input data block needs a certain structure, namely the 
1174    * buffer size as first word. If the cross check fails, the retrieval is
1175    * silently abandoned, unless the \em bForce parameter is set.<br>
1176    * \em Note: THE OBJECT MUST NOT BE DELETED by the caller.
1177    * @param dtID        data type ID of the object
1178    * @param dtOrigin    data type origin of the object
1179    * @param classname   class name of the object
1180    * @param bForce      force the retrieval of an object, error messages
1181    *                    are suppressed if \em bForce is not set
1182    * @return pointer to @ref TObject, NULL if no objects of specified type
1183    *         available
1184    */
1185   const TObject* GetFirstInputObject(const char* dtID, 
1186                                      const char* dtOrigin,
1187                                      const char* classname=NULL,
1188                                      int bForce=0);
1189
1190   /**
1191    * Get the next object of a specific data type from the input data.
1192    * The High-level methods provide functionality to transfer ROOT data
1193    * structures which inherit from TObject.
1194    * The method looks for the next ROOT object of type and class specified
1195    * to the previous @ref GetFirstInputObject call.<br>
1196    * \em Note: THE OBJECT MUST NOT BE DELETED by the caller.
1197    * @param bForce      force the retrieval of an object, error messages
1198    *                    are suppressed if \em bForce is not set
1199    * @return pointer to @ref TObject, NULL if no more objects available
1200    */
1201   const TObject* GetNextInputObject(int bForce=0);
1202
1203   /**
1204    * Get data type of an input block.
1205    * Get data type of the object previously fetched via
1206    * GetFirstInputObject/NextInputObject or the last one if no object
1207    * specified.
1208    * @param pObject     pointer to TObject
1209    * @return data specification, kAliHLTVoidDataSpec if failed
1210    */
1211   AliHLTComponentDataType GetDataType(const TObject* pObject=NULL);
1212
1213   /**
1214    * Get data specification of an input block.
1215    * Get data specification of the object previously fetched via
1216    * GetFirstInputObject/NextInputObject or the last one if no object
1217    * specified.
1218    * @param pObject     pointer to TObject
1219    * @return data specification, kAliHLTVoidDataSpec if failed
1220    */
1221   AliHLTUInt32_t GetSpecification(const TObject* pObject=NULL);
1222
1223   /**
1224    * Get the first block of a specific data type from the input data.
1225    * The method looks for the first block of type dt in the input stream.
1226    * It is intended to be used within the high-level interface.<br>
1227    * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller.
1228    *
1229    * If called without parameters, the function works on all input blocks,
1230    * also the ones of data type kAliHLTVoidDataType which are not matched by
1231    * kAliHLTAnyDataType.
1232    *
1233    * @param dt          data type of the block
1234    * @return pointer to @ref AliHLTComponentBlockData
1235    */
1236   const AliHLTComponentBlockData* GetFirstInputBlock(const AliHLTComponentDataType& dt=kAliHLTAllDataTypes);
1237
1238   /**
1239    * Get the first block of a specific data type from the input data.
1240    * The method looks for the first block of type specified by the ID and 
1241    * Origin strings in the input stream.  It is intended
1242    * to be used within the high-level interface.<br>
1243    * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller.
1244    * @param dtID        data type ID of the block
1245    * @param dtOrigin    data type origin of the block
1246    * @return pointer to @ref AliHLTComponentBlockData
1247    */
1248   const AliHLTComponentBlockData* GetFirstInputBlock(const char* dtID, 
1249                                                       const char* dtOrigin);
1250
1251   /**
1252    * Get input block by index.<br>
1253    * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller.
1254    * @return pointer to AliHLTComponentBlockData, NULL if index out of range
1255    */
1256   const AliHLTComponentBlockData* GetInputBlock(int index) const;
1257
1258   /**
1259    * Get the next block of a specific data type from the input data.
1260    * The method looks for the next block  of type and class specified
1261    * to the previous @ref GetFirstInputBlock call.
1262    * To be used within the high-level interface.<br>
1263    * \em Note: THE BLOCK DESCRIPTOR MUST NOT BE DELETED by the caller.
1264    */
1265   const AliHLTComponentBlockData* GetNextInputBlock();
1266
1267   /**
1268    * Get data specification of an input block.
1269    * Get data specification of the input block previously fetched via
1270    * GetFirstInputObject/NextInputObject or the last one if no block
1271    * specified.
1272    * @param pBlock     pointer to input block
1273    * @return data specification, kAliHLTVoidDataSpec if failed
1274    */
1275   AliHLTUInt32_t GetSpecification(const AliHLTComponentBlockData* pBlock);
1276
1277   /**
1278    * Forward an input object to the output.
1279    * Forward the input block of an object previously fetched via
1280    * GetFirstInputObject/NextInputObject or the last one if no object
1281    * specified.
1282    * The block descriptor of the input block is forwarded to the
1283    * output block list.
1284    * @param pObject     pointer to TObject
1285    * @return neg. error code if failed
1286    */
1287   int Forward(const TObject* pObject);
1288
1289   /**
1290    * Forward an input block to the output.
1291    * Forward the input block fetched via GetFirstInputObject/
1292    * NextInputBlock or the last one if no block specified.
1293    * The block descriptor of the input block is forwarded to the
1294    * output block list.
1295    * @param pBlock     pointer to input block
1296    * @return neg. error code if failed
1297    */
1298   int Forward(const AliHLTComponentBlockData* pBlock=NULL);
1299
1300   /**
1301    * Insert an object into the output.
1302    * If header is specified, it will be inserted before the root object,
1303    * default is no header.
1304    * The publishing can be downscaled by means of the -pushback-period
1305    * parameter. This is especially useful for histograms which do not
1306    * need to be sent for every event.
1307    * @param pObject     pointer to root object
1308    * @param dt          data type of the object
1309    * @param spec        data specification
1310    * @param pHeader     pointer to header
1311    * @param headerSize  size of Header
1312    * @return neg. error code if failed 
1313    */
1314   int PushBack(const TObject* pObject, const AliHLTComponentDataType& dt, 
1315                AliHLTUInt32_t spec=kAliHLTVoidDataSpec, 
1316                void* pHeader=NULL, int headerSize=0);
1317
1318   /**
1319    * Insert an object into the output.
1320    * If header is specified, it will be inserted before the root object,
1321    * default is no header.
1322    * The publishing can be downscaled by means of the -pushback-period
1323    * parameter. This is especially useful for histograms which do not
1324    * need to be sent for every event.
1325    * @param pObject     pointer to root object
1326    * @param dtID        data type ID of the object
1327    * @param dtOrigin    data type origin of the object
1328    * @param spec        data specification
1329    * @param pHeader     pointer to header
1330    * @param headerSize  size of Header
1331    * @return neg. error code if failed 
1332    */
1333   int PushBack(const TObject* pObject, const char* dtID, const char* dtOrigin,
1334                AliHLTUInt32_t spec=kAliHLTVoidDataSpec,
1335                void* pHeader=NULL, int headerSize=0);
1336  
1337   /**
1338    * Insert an object into the output.
1339    * @param pBuffer     pointer to buffer
1340    * @param iSize       size of the buffer
1341    * @param dt          data type of the object
1342    * @param spec        data specification
1343    * @param pHeader     pointer to header
1344    * @param headerSize size of Header
1345    * @return neg. error code if failed 
1346    */
1347   int PushBack(const void* pBuffer, int iSize, const AliHLTComponentDataType& dt,
1348                AliHLTUInt32_t spec=kAliHLTVoidDataSpec,
1349                const void* pHeader=NULL, int headerSize=0);
1350
1351   /**
1352    * Insert an object into the output.
1353    * @param pBuffer     pointer to buffer
1354    * @param iSize       size of the buffer
1355    * @param dtID        data type ID of the object
1356    * @param dtOrigin    data type origin of the object
1357    * @param spec        data specification
1358    * @param pHeader     pointer to header
1359    * @param headerSize size of Header
1360    * @return neg. error code if failed 
1361    */
1362   int PushBack(const void* pBuffer, int iSize, const char* dtID, const char* dtOrigin,
1363                AliHLTUInt32_t spec=kAliHLTVoidDataSpec,
1364                const void* pHeader=NULL, int headerSize=0);
1365
1366   /**
1367    * Estimate size of a TObject
1368    * @param pObject
1369    * @return buffer size in byte
1370    */
1371   int EstimateObjectSize(const TObject* pObject) const;
1372
1373   /**
1374    * Create a memory file in the output stream.
1375    * This method creates a TFile object which stores all data in
1376    * memory instead of disk. The TFile object is published as binary data.
1377    * The instance can be used like a normal TFile object. The TFile::Close
1378    * or @ref CloseMemoryFile method has to be called in order to flush the
1379    * output stream.
1380    *
1381    * \b Note: The returned object is deleted by the framework.
1382    * @param capacity    total size reserved for the memory file
1383    * @param dtID        data type ID of the file
1384    * @param dtOrigin    data type origin of the file
1385    * @param spec        data specification
1386    * @return file handle, NULL if failed 
1387    */
1388   AliHLTMemoryFile* CreateMemoryFile(int capacity, const char* dtID, const char* dtOrigin,
1389                                      AliHLTUInt32_t spec=kAliHLTVoidDataSpec);
1390
1391   /**
1392    * Create a memory file in the output stream.
1393    * This method creates a TFile object which stores all data in
1394    * memory instead of disk. The TFile object is published as binary data.
1395    * The instance can be used like a normal TFile object. The TFile::Close
1396    * or @ref CloseMemoryFile method has to be called in order to flush the
1397    * output stream.
1398    *
1399    * \b Note: The returned object is deleted by the framework.
1400    * @param capacity    total size reserved for the memory file
1401    * @param dt          data type of the file
1402    * @param spec        data specification
1403    * @return file handle, NULL if failed 
1404    */
1405   AliHLTMemoryFile* CreateMemoryFile(int capacity, 
1406                                      const AliHLTComponentDataType& dt=kAliHLTAnyDataType,
1407                                      AliHLTUInt32_t spec=kAliHLTVoidDataSpec);
1408
1409   /**
1410    * Create a memory file in the output stream.
1411    * This method creates a TFile object which stores all data in
1412    * memory instead of disk. The TFile object is published as binary data.
1413    * The instance can be used like a normal TFile object. The TFile::Close
1414    * or @ref CloseMemoryFile method has to be called in order to flush the
1415    * output stream.
1416    *
1417    * \b Note: The returned object is deleted by the framework.
1418    * @param dtID        data type ID of the file
1419    * @param dtOrigin    data type origin of the file
1420    * @param spec        data specification
1421    * @param capacity    fraction of the available output buffer size
1422    * @return file handle, NULL if failed 
1423    */
1424   AliHLTMemoryFile* CreateMemoryFile(const char* dtID, const char* dtOrigin,
1425                                      AliHLTUInt32_t spec=kAliHLTVoidDataSpec,
1426                                      float capacity=1.0);
1427
1428   /**
1429    * Create a memory file in the output stream.
1430    * This method creates a TFile object which stores all data in
1431    * memory instead of disk. The TFile object is published as binary data.
1432    * The instance can be used like a normal TFile object. The TFile::Close
1433    * or @ref CloseMemoryFile method has to be called in order to flush the
1434    * output stream.
1435    *
1436    * \b Note: The returned object is deleted by the framework.
1437    * @param dt          data type of the file
1438    * @param spec        data specification
1439    * @param capacity    fraction of the available output buffer size
1440    * @return file handle, NULL if failed 
1441    */
1442   AliHLTMemoryFile* CreateMemoryFile(const AliHLTComponentDataType& dt=kAliHLTAnyDataType,
1443                                      AliHLTUInt32_t spec=kAliHLTVoidDataSpec,
1444                                      float capacity=1.0);
1445
1446   /**
1447    * Write an object to memory file in the output stream.
1448    * @param pFile       file handle
1449    * @param pObject     pointer to root object
1450    * @param key         key in ROOT file
1451    * @param option      options, see TObject::Write
1452    * @return neg. error code if failed
1453    *         - -ENOSPC    no space left
1454    */
1455   int Write(AliHLTMemoryFile* pFile, const TObject* pObject, const char* key=NULL, int option=TObject::kOverwrite);
1456
1457   /**
1458    * Close object memory file.
1459    * @param pFile       file handle
1460    * @return neg. error code if failed
1461    *         - -ENOSPC    buffer size too small
1462    */
1463   int CloseMemoryFile(AliHLTMemoryFile* pFile);
1464
1465   /**
1466    * Insert event-done data information into the output.
1467    * @param edd          event-done data information
1468    */
1469   int CreateEventDoneData(AliHLTComponentEventDoneData edd);
1470
1471   /**
1472    * Get current run number
1473    */
1474   AliHLTUInt32_t GetRunNo() const;
1475
1476   /**
1477    * Get the current run type.
1478    */
1479   AliHLTUInt32_t GetRunType() const;
1480
1481   /**
1482    * Get the chain id of the component.
1483    */
1484   const char* GetChainId() const {return fChainId.c_str();}
1485
1486   /**
1487    * Get a timestamp of the current event
1488    * Exact format needs to be documented.
1489    */
1490   AliHLTUInt32_t    GetTimeStamp() const;
1491
1492   /**
1493    * Get the period number.
1494    * Upper 28 bits (36 to 63) of the 64-bit event id 
1495    */
1496   AliHLTUInt32_t    GetPeriodNumber() const;
1497
1498   /**
1499    * Get the period number.
1500    * 24 bits, 12 to 35 of the 64-bit event id 
1501    */
1502   AliHLTUInt32_t    GetOrbitNumber() const;
1503
1504   /**
1505    * Get the bunch crossing number.
1506    * 12 bits, 0 to 12 of the 64-bit event id 
1507    */
1508   AliHLTUInt16_t    GetBunchCrossNumber() const;
1509
1510   /**
1511    * Setup the CTP accounting functionality of the base class.
1512    * The method can be invoked from DoInit() for componenets which want to
1513    * use the CTP functionality of the base class.
1514    *
1515    * The AliHLTCTPData is initialized with the trigger classes from the ECS
1516    * parameters. The base class automatically increments the counters according
1517    * to the trigger pattern in the CDH before the event processing. 
1518    */
1519   int SetupCTPData();
1520
1521   /**
1522    * Get the instance of the CTP data.
1523    */
1524   const AliHLTCTPData* CTPData() const {return fpCTPData;}
1525
1526   /**
1527    * Check whether a combination of trigger classes is fired.
1528    * The expression can contain trigger class ids and logic operators
1529    * like &&, ||, !, and ^, and may be grouped by parentheses.
1530    * @note the function requires the setup of the CTP handling for the component by
1531    * invoking SetupCTPData() from DoInit()
1532    * @param expression     a logic expression of trigger class ids
1533    * @param trigData       the trigger data data
1534    */
1535   bool EvaluateCTPTriggerClass(const char* expression, AliHLTComponentTriggerData& trigData) const;
1536
1537   /**
1538    * Check state of a trigger class.
1539    * If the class name is not part of the current trigger setup (i.e. ECS parameter
1540    * does not contain a trigger definition for this class name) the function
1541    * returns -1
1542    * @note the function requires the setup of the CTP handling for the component by
1543    * invoking SetupCTPData() from DoInit()
1544    * @return -1 class name not initialized, 
1545    *          0 trigger not active
1546    *          1 trigger active
1547    */
1548   int CheckCTPTrigger(const char* name) const;
1549
1550   /**
1551    * Get the overall solenoid field.
1552    */
1553   Double_t GetBz();
1554   /**
1555    * Get the solenoid field at point r.
1556    */
1557   Double_t GetBz(const Double_t *r);
1558   /**
1559    * Get the solenoid field components at point r.
1560    */
1561   void GetBxByBz(const Double_t r[3], Double_t b[3]);
1562
1563   /**
1564    * Check whether the current event is a valid data event.
1565    * @param pTgt    optional pointer to get the event type
1566    * @return true if the current event is a real data event
1567    */
1568   bool IsDataEvent(AliHLTUInt32_t* pTgt=NULL) const;
1569
1570   /**
1571    * Copy a struct from block data.
1572    * The function checks for block size and struct size. The least common
1573    * size will be copied to the target struct, remaining fields are initialized
1574    * to zero.<br>
1575    * The target struct must have a 32bit struct size indicator as first member.
1576    * @param pStruct     target struct
1577    * @param iStructSize size of the struct
1578    * @param iBlockNo    index of input block
1579    * @param structname  name of the struct (log messages)
1580    * @param eventname   name of the event (log messages)
1581    * @return size copied, neg. error if failed
1582    */
1583   int CopyStruct(void* pStruct, unsigned int iStructSize, unsigned int iBlockNo,
1584                  const char* structname="", const char* eventname="");
1585
1586  private:
1587   /** copy constructor prohibited */
1588   AliHLTComponent(const AliHLTComponent&);
1589   /** assignment operator prohibited */
1590   AliHLTComponent& operator=(const AliHLTComponent&);
1591
1592   /**
1593    * Increment the internal event counter.
1594    * To be used by the friend classes AliHLTProcessor, AliHLTDataSource
1595    * and AliHLTDataSink.
1596    * @return new value of the internal event counter
1597    * @internal
1598    */
1599   int IncrementEventCounter();
1600
1601   /**
1602    * Find the first input block of specified data type beginning at index.
1603    * Input blocks containing a TObject have the size of the object as an
1604    * unsigned 32 bit number in the first 4 bytes. This has to match the block
1605    * size minus 4.
1606    *
1607    * kAliHLTAllDataTypes is a special data type which includes both 
1608    * kAliHLTVoidDataType and kAliHLTAnyDataType.
1609    *
1610    * @param dt          data type
1611    * @param startIdx    index to start the search
1612    * @param bObject     check if this is an object
1613    * @return index of the block, -ENOENT if no block found
1614    *
1615    * @internal
1616    */
1617   int FindInputBlock(const AliHLTComponentDataType& dt, int startIdx=-1, int bObject=0) const;
1618
1619   /**
1620    * Get index in the array of input bocks.
1621    * Calculate index and check integrety of a block data structure pointer.
1622    * @param pBlock      pointer to block data
1623    * @return index of the block, -ENOENT if no block found
1624    *
1625    * @internal
1626    */
1627   int FindInputBlock(const AliHLTComponentBlockData* pBlock) const;
1628
1629   /**
1630    * Create an object from a specified input block.
1631    * @param idx         index of the input block
1632    * @param bForce      force the retrieval of an object, error messages
1633    *                    are suppressed if \em bForce is not set
1634    * @return pointer to TObject, caller must delete the object after use
1635    *
1636    * @internal
1637    */
1638   TObject* CreateInputObject(int idx, int bForce=0);
1639
1640   /**
1641    * Get input object
1642    * Get object from the input block list. The methods first checks whether the
1643    * object was already created. If not, it is created by @ref CreateInputObject
1644    * and inserted into the list of objects.
1645    * @param idx         index in the input block list
1646    * @param classname   name of the class, object is checked for correct class
1647    *                    name if set
1648    * @param bForce      force the retrieval of an object, error messages
1649    *                    are suppressed if \em bForce is not set
1650    * @return pointer to TObject
1651    *
1652    * @internal
1653    */
1654   TObject* GetInputObject(int idx, const char* classname=NULL, int bForce=0);
1655
1656   /**
1657    * Clean the list of input objects.
1658    * Cleanup is done at the end of each event processing.
1659    */
1660   int CleanupInputObjects();
1661
1662   /**
1663    * Insert a buffer into the output block stream.
1664    * This is the only method to insert blocks into the output stream, called
1665    * from all types of the Pushback method. The actual data might have been
1666    * written to the output buffer already. In that case NULL can be provided
1667    * as buffer, only the block descriptor will be build. If a header is specified, 
1668    * it will be inserted before the buffer, default is no header.
1669    * @param pBuffer     pointer to buffer
1670    * @param iBufferSize size of the buffer in byte
1671    * @param dt          data type
1672    * @param spec        data specification
1673    * @param pHeader     pointer to header
1674    * @param iHeaderSize size of Header
1675    * @return neg. error code if failed
1676    */
1677   int InsertOutputBlock(const void* pBuffer, int iBufferSize,
1678                         const AliHLTComponentDataType& dt,
1679                         AliHLTUInt32_t spec,
1680                         const void* pHeader=NULL, int iHeaderSize=0);
1681
1682   /**
1683    * Add a component statistics block to the output.
1684    * @return size of the added data
1685    */
1686   int AddComponentStatistics(AliHLTComponentBlockDataList& blocks, 
1687                              AliHLTUInt8_t* buffer,
1688                              AliHLTUInt32_t bufferSize,
1689                              AliHLTUInt32_t offset,
1690                              AliHLTComponentStatisticsList& stats) const;
1691
1692   /**
1693    * Add a component table entry (descriptor) to the output
1694    * This is done at SOR/EOR. The component table is a list of chain ids
1695    * and 32bit ids calculated by a crc algorithm from the chian id. This
1696    * allows to tag data blocks with the id number rather than the string.
1697    *
1698    * The kAliHLTDataTypeComponentTable data block currently has the string
1699    * as payload and the crc id as specification.
1700    * @return size of the added data
1701    */
1702   int  AddComponentTableEntry(AliHLTComponentBlockDataList& blocks, 
1703                               AliHLTUInt8_t* buffer,
1704                               AliHLTUInt32_t bufferSize,
1705                               AliHLTUInt32_t offset,
1706                               const vector<AliHLTUInt32_t>& parents,
1707                               int processingLevel) const;
1708
1709   /**
1710    * Scan the ECS parameter string.
1711    * The framework provides both the parameters of CONFIGURE and ENGAGE
1712    * in one string in a special data block kAliHLTDataTypeECSParam
1713    * {ECSPARAM:PRIV}. The general format is
1714    * <command>;<parameterkey>=<parametervalue>;<parameterkey>=<parametervalue>;...
1715    */
1716   int ScanECSParam(const char* ecsParam);
1717
1718   /**
1719    * The trigger classes are determined from the trigger and propagated by
1720    * ECS as part of the ENGAGE command parameter which is sent through the
1721    * framework during the SOR event. This function treats the value of the
1722    * parameter key CTP_TRIGGER_CLASS.
1723    */
1724   int InitCTPTriggerClasses(const char* ctpString);
1725
1726   enum {
1727     kRequireSteeringBlocks = 0x1,
1728     kDisableComponentStat = 0x2
1729   };
1730
1731   /** The global component handler instance */
1732   static AliHLTComponentHandler* fgpComponentHandler;              //! transient
1733
1734   /** The environment where the component is running in */
1735   AliHLTAnalysisEnvironment fEnvironment;                         // see above
1736
1737   /** Set by ProcessEvent before the processing starts */
1738   AliHLTEventID_t fCurrentEvent;                                   // see above
1739
1740   /** internal event no */
1741   int fEventCount;                                                 // see above
1742
1743   /** the number of failed events */
1744   int fFailedEvents;                                               // see above
1745
1746   /** event data struct of the current event under processing */
1747   AliHLTComponentEventData fCurrentEventData;                      // see above
1748
1749   /** array of input data blocks of the current event */
1750   const AliHLTComponentBlockData* fpInputBlocks;                   //! transient
1751
1752   /** index of the current input block */
1753   int fCurrentInputBlock;                                          // see above
1754
1755   /** data type of the last block search */
1756   AliHLTComponentDataType fSearchDataType;                         // see above
1757
1758   /** name of the class for the object to search for */
1759   string fClassName;                                               // see above
1760
1761   /** array of generated input objects */
1762   TObjArray* fpInputObjects;                                       //! transient
1763  
1764   /** the output buffer */
1765   AliHLTUInt8_t* fpOutputBuffer;                                   //! transient
1766
1767   /** size of the output buffer */
1768   AliHLTUInt32_t fOutputBufferSize;                                // see above
1769
1770   /** size of data written to output buffer */
1771   AliHLTUInt32_t fOutputBufferFilled;                              // see above
1772
1773   /** list of ouput block data descriptors */
1774   AliHLTComponentBlockDataList fOutputBlocks;                      // see above
1775
1776   /** stopwatch array */
1777   TObjArray* fpStopwatches;                                        //! transient
1778
1779   /** array of memory files AliHLTMemoryFile */
1780   AliHLTMemoryFilePList fMemFiles;                                 //! transient
1781
1782   /** descriptor of the current run */
1783   AliHLTRunDesc* fpRunDesc;                                        //! transient
1784
1785   /** external fct to set CDB run no, indicates external CDB initialization */
1786   void (*fCDBSetRunNoFunc)();                                      //! transient
1787
1788   /** id of the component in the analysis chain */
1789   string fChainId;                                                 //! transient
1790
1791   /** crc value of the chainid, used as a 32bit id */
1792   AliHLTUInt32_t fChainIdCrc;                                      //! transient
1793
1794   /** optional benchmarking for the component statistics */
1795   TStopwatch* fpBenchmark;                                         //! transient
1796
1797   /** component flags, cleared in Deinit */
1798   AliHLTUInt32_t fFlags;                                           //! transient
1799
1800   /** current event type */
1801   AliHLTUInt32_t fEventType;                                       //! transient
1802
1803   /** component arguments */
1804   string fComponentArgs;                                           //! transient
1805
1806
1807   /** event done data */
1808   AliHLTComponentEventDoneData* fEventDoneData;                    //! transient
1809
1810   /** Reserved size of the memory stored at fEventDoneData */
1811   unsigned long fEventDoneDataSize;                                //! transient
1812
1813   /** Comression level for ROOT objects */
1814   int fCompressionLevel;                                           //! transient
1815
1816   /** size of last PushBack-serialized object */
1817   int fLastObjectSize;                                             //! transient
1818
1819  /**  array of trigger class descriptors */
1820   AliHLTCTPData* fpCTPData;                                        //! transient
1821
1822   /// update period for PushBack calls
1823   int fPushbackPeriod;                                             //! transient
1824   /// time of last executed PushBack
1825   int fLastPushBackTime;                                           //! transient
1826
1827   ClassDef(AliHLTComponent, 0)
1828 };
1829 #endif