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 #include "AliHLTComponent.h"
19 * @class AliHLTDataSink
20 * Base class of HLT data sink components.
21 * The class provides a common interface for the implementation of HLT data
22 * sink components. The child class must implement the functions:
23 * - @ref DoInit (optional)
24 * - @ref DoDeinit (optional)
26 * - @ref GetComponentID
27 * - @ref GetInputDataTypes
30 * @ingroup alihlt_component
32 class AliHLTDataSink : public AliHLTComponent {
34 /** standard constructor */
36 /** standard destructor */
37 virtual ~AliHLTDataSink();
40 * Event processing function.
41 * The method is called by the framework to process one event. After
42 * preparation of data structures. The call is redirected to DumpEvent.
43 * @return neg. error code if failed
45 int DoProcessing( const AliHLTComponentEventData& evtData,
46 const AliHLTComponentBlockData* blocks,
47 AliHLTComponentTriggerData& trigData,
48 AliHLTUInt8_t* outputPtr,
50 AliHLTComponentBlockDataList& outputBlocks,
51 AliHLTComponentEventDoneData*& edd );
53 // Information member functions for registration.
56 * Return @ref AliHLTComponent::kSink type as component type.
57 * @return component type id
59 TComponentType GetComponentType() { return AliHLTComponent::kSink;}
62 * Default implementation for all data sinks.
63 * There are no output data types.
65 AliHLTComponentDataType GetOutputDataType();
68 * Default implementation for all data sinks.
69 * There is no output data.
71 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
76 * The low-level data processing method for the component.
77 * This is the custom processing method and can be overloaded by
79 * @param evtData event data structure
80 * @param blocks input data block descriptors
81 * @param trigData trigger data structure
83 virtual int DumpEvent( const AliHLTComponentEventData& evtData,
84 const AliHLTComponentBlockData* blocks,
85 AliHLTComponentTriggerData& trigData );
88 * The high-level data processing method.
89 * This is the default processing method; the method is called
90 * if no low level @ref DumpEvent method is overloaded by the component.
91 * @param evtData event data structure
92 * @param trigData trigger data structure
94 virtual int DumpEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
97 ClassDef(AliHLTDataSink, 1)