+//-*- Mode: C++ -*-
// @(#) $Id$
#ifndef ALIHLTDATASINK_H
/** @file AliHLTDataSink.h
@author Matthias Richter
@date
- @brief Base class declaration for HLT data sink components. */
+ @brief Base class declaration for HLT data sink components.
+ @note The class is used in Offline (AliRoot) context
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
#include "AliHLTComponent.h"
* Base class of HLT data sink components.
* The class provides a common interface for the implementation of HLT data
* sink components. The child class must implement the functions:
- * - DoInit (optional)
- * - DoDeinit (optional)
- * - DumpEvent
- * - GetComponentID
- * - GetInputDataTypes
- * - GetOutputDataType
- * - GetOutputDataSize
- * - Spawn
+ * - @ref DoInit (optional)
+ * - @ref DoDeinit (optional)
+ * - @ref DumpEvent
+ * - @ref GetComponentID
+ * - @ref GetInputDataTypes
+ * - @ref Spawn
*
- * @ingroup AliHLTbase
+ * @ingroup alihlt_component
*/
class AliHLTDataSink : public AliHLTComponent {
public:
* preparation of data structures. The call is redirected to DumpEvent.
* @return neg. error code if failed
*/
- int ProcessEvent( const AliHLTComponent_EventData& evtData,
- const AliHLTComponent_BlockData* blocks,
- AliHLTComponent_TriggerData& trigData,
+ int DoProcessing( const AliHLTComponentEventData& evtData,
+ const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData,
AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size,
- AliHLTUInt32_t& outputBlockCnt,
- AliHLTComponent_BlockData*& outputBlocks,
- AliHLTComponent_EventDoneData*& edd );
+ vector<AliHLTComponentBlockData>& outputBlocks,
+ AliHLTComponentEventDoneData*& edd );
// Information member functions for registration.
*/
TComponentType GetComponentType() { return AliHLTComponent::kSink;}
- private:
/**
- * Data processing method for the component.
+ * Default implementation for all data sinks.
+ * There are no output data types.
+ */
+ AliHLTComponentDataType GetOutputDataType();
+
+ /**
+ * Default implementation for all data sinks.
+ * There is no output data.
+ */
+ void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
+
+ protected:
+
+ /**
+ * The low-level data processing method for the component.
+ * This is the custom processing method and can be overloaded by
+ * the component.
* @param evtData event data structure
* @param blocks input data block descriptors
* @param trigData trigger data structure
*/
- virtual int DumpEvent( const AliHLTComponent_EventData& evtData,
- const AliHLTComponent_BlockData* blocks,
- AliHLTComponent_TriggerData& trigData ) = 0;
+ virtual int DumpEvent( const AliHLTComponentEventData& evtData,
+ const AliHLTComponentBlockData* blocks,
+ AliHLTComponentTriggerData& trigData );
+
+ /**
+ * The high-level data processing method.
+ * This is the default processing method; the method is called
+ * if no low level @ref DumpEvent method is overloaded by the component.
+ * @param evtData event data structure
+ * @param trigData trigger data structure
+ */
+ virtual int DumpEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+
- ClassDef(AliHLTDataSink, 0)
+ ClassDef(AliHLTDataSink, 1)
};
#endif