]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTDataSink.h
corrected trigger structs to comply with PubSub
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataSink.h
1 //-*- Mode: C++ -*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTDATASINK_H
5 #define ALIHLTDATASINK_H
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7  * See cxx source for full Copyright notice                               */
8
9 /** @file   AliHLTDataSink.h
10     @author Matthias Richter
11     @date   
12     @brief  Base class declaration for HLT data sink components.
13     @note   The class is used in Offline (AliRoot) context
14 */
15
16 // see below for class documentation
17 // or
18 // refer to README to build package
19 // or
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt   
21
22 #include "AliHLTComponent.h"
23
24 /**
25  * @class AliHLTDataSink
26  * Base class of HLT data sink components.
27  * The class provides a common interface for the implementation of HLT data
28  * sink components. The child class must implement the functions:
29  * - @ref DoInit (optional)
30  * - @ref DoDeinit (optional)
31  * - @ref DumpEvent
32  * - @ref GetComponentID
33  * - @ref GetInputDataTypes
34  * - @ref Spawn
35  *
36  * @ingroup alihlt_component
37  */
38 class AliHLTDataSink : public AliHLTComponent {
39  public:
40   /** standard constructor */
41   AliHLTDataSink();
42   /** standard destructor */
43   virtual ~AliHLTDataSink();
44
45   /**
46    * Event processing function.
47    * The method is called by the framework to process one event. After 
48    * preparation of data structures. The call is redirected to DumpEvent.
49    * @return neg. error code if failed
50    */
51   int DoProcessing( const AliHLTComponentEventData& evtData,
52                     const AliHLTComponentBlockData* blocks, 
53                     AliHLTComponentTriggerData& trigData,
54                     AliHLTUInt8_t* outputPtr, 
55                     AliHLTUInt32_t& size,
56                     vector<AliHLTComponentBlockData>& outputBlocks,
57                     AliHLTComponentEventDoneData*& edd );
58
59   // Information member functions for registration.
60
61   /**
62    * Return @ref AliHLTComponent::kSink type as component type.
63    * @return component type id
64    */
65   TComponentType GetComponentType() { return AliHLTComponent::kSink;}
66
67   /**
68    * Default implementation for all data sinks.
69    * There are no output data types.
70    */
71   AliHLTComponentDataType GetOutputDataType();
72
73   /**
74    * Default implementation for all data sinks.
75    * There is no output data.
76    */
77   void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
78
79  protected:
80
81   /**
82    * The low-level data processing method for the component.
83    * This is the custom processing method and can be overloaded by 
84    * the component.
85    * @param evtData       event data structure
86    * @param blocks        input data block descriptors
87    * @param trigData      trigger data structure
88    */
89   virtual int DumpEvent( const AliHLTComponentEventData& evtData,
90                  const AliHLTComponentBlockData* blocks, 
91                  AliHLTComponentTriggerData& trigData );
92
93   /**
94    * The high-level data processing method.
95    * This is the default processing method; the method is called
96    * if no low level @ref DumpEvent method is overloaded by the component.
97    * @param evtData       event data structure
98    * @param trigData      trigger data structure
99    */
100   virtual int DumpEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
101
102
103   ClassDef(AliHLTDataSink, 1)
104 };
105 #endif