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 */
9 /** @file AliHLTDataSink.h
10 @author Matthias Richter
12 @brief Base class declaration for HLT data sink components.
13 @note The class is used in Offline (AliRoot) context
16 // see below for class documentation
18 // refer to README to build package
20 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
22 #include "AliHLTComponent.h"
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)
32 * - @ref GetComponentID
33 * - @ref GetInputDataTypes
36 * @ingroup alihlt_component
38 class AliHLTDataSink : public AliHLTComponent {
40 /** standard constructor */
42 /** standard destructor */
43 virtual ~AliHLTDataSink();
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
51 int DoProcessing( const AliHLTComponentEventData& evtData,
52 const AliHLTComponentBlockData* blocks,
53 AliHLTComponentTriggerData& trigData,
54 AliHLTUInt8_t* outputPtr,
56 vector<AliHLTComponentBlockData>& outputBlocks,
57 AliHLTComponentEventDoneData*& edd );
59 // Information member functions for registration.
62 * Return @ref AliHLTComponent::kSink type as component type.
63 * @return component type id
65 TComponentType GetComponentType() { return AliHLTComponent::kSink;}
68 * Default implementation for all data sinks.
69 * There are no output data types.
71 AliHLTComponentDataType GetOutputDataType();
74 * Default implementation for all data sinks.
75 * There is no output data.
77 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
82 * The low-level data processing method for the component.
83 * This is the custom processing method and can be overloaded by
85 * @param evtData event data structure
86 * @param blocks input data block descriptors
87 * @param trigData trigger data structure
89 virtual int DumpEvent( const AliHLTComponentEventData& evtData,
90 const AliHLTComponentBlockData* blocks,
91 AliHLTComponentTriggerData& trigData );
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
100 virtual int DumpEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
103 ClassDef(AliHLTDataSink, 1)