]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTProcessor.h
changes according to coding conventions
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTProcessor.h
1 // @(#) $Id$
2
3 #ifndef ALIHLTPROCESSOR_H
4 #define ALIHLTPROCESSOR_H
5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6  * See cxx source for full Copyright notice                               */
7
8 /** @file   AliHLTProcessor.h
9     @author Matthias Richter, Timm Steinbeck
10     @date   
11     @brief  Base class declaration for HLT analysis components. */
12
13 #include "AliHLTComponent.h"
14
15 /**
16  * @class AliHLTProcessor
17  * Base class of HLT data analysis components.
18  * The class provides a common interface for the implementation of HLT data
19  * analysis components. The child class must implement the functions:
20  * - @ref DoInit (optional)
21  * - @ref DoDeinit (optional)
22  * - @ref DoEvent
23  * - @ref GetComponentID
24  * - @ref GetInputDataTypes
25  * - @ref GetOutputDataType
26  * - @ref GetOutputDataSize
27  * - @ref Spawn
28  *
29  * @ingroup alihlt_component
30  */
31 class AliHLTProcessor : public AliHLTComponent {
32  public:
33   /** standard constructor */
34   AliHLTProcessor();
35   /** standard destructor */
36   virtual ~AliHLTProcessor();
37
38   /* depricated */
39   int Init( AliHLTComponentEnvironment* environ, void* environ_param, int argc, const char** argv );
40   /* depricated */
41   int Deinit();
42
43   /**
44    * Event processing function.
45    * The method is called by the framework to process one event. After 
46    * preparation of data structures. The call is redirected to DoEvent.
47    * @return neg. error code if failed 
48    */
49   int ProcessEvent( const AliHLTComponentEventData& evtData,
50                     const AliHLTComponentBlockData* blocks, 
51                     AliHLTComponentTriggerData& trigData,
52                     AliHLTUInt8_t* outputPtr, 
53                     AliHLTUInt32_t& size,
54                     AliHLTUInt32_t& outputBlockCnt, 
55                     AliHLTComponentBlockData*& outputBlocks,
56                     AliHLTComponentEventDoneData*& edd );
57
58   // Information member functions for registration.
59
60   /**
61    * Return @ref AliHLTComponent::kProcessor type as component type.
62    * @return component type id
63    */
64   TComponentType GetComponentType() { return AliHLTComponent::kProcessor;}
65
66  private:
67   /**
68    * Data processing method for the component.
69    * @param evtData       event data structure
70    * @param blocks        input data block descriptors
71    * @param trigData      trigger data structure
72    * @param outputPtr     pointer to target buffer
73    * @param size          <i>input</i>: size of target buffer
74    *                      <i>output</i>:size of produced data
75    * @param outputBlocks  list to receive output block descriptors
76    */
77   virtual int DoEvent( const AliHLTComponentEventData& evtData,
78                        const AliHLTComponentBlockData* blocks, 
79                        AliHLTComponentTriggerData& trigData,
80                        AliHLTUInt8_t* outputPtr, 
81                        AliHLTUInt32_t& size,
82                        vector<AliHLTComponentBlockData>& outputBlocks ) = 0;
83
84   ClassDef(AliHLTProcessor, 0)
85 };
86 #endif