+//-*- Mode: C++ -*-
// @(#) $Id$
#ifndef ALIHLTDATASOURCE_H
#define ALIHLTDATASOURCE_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+/* This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/** @file AliHLTDataSource.h
@author Matthias Richter
@date
- @brief Base class declaration for HLT data source components. */
+ @brief Base class declaration for HLT data source 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 source components.
* The class provides a common interface for the implementation of HLT data
* source components. The child class must implement the functions:
- * - DoInit (optional)
- * - DoDeinit (optional)
- * - GetEvent
- * - GetComponentID
- * - GetInputDataTypes
- * - GetOutputDataType
- * - GetOutputDataSize
- * - Spawn
+ * - @ref DoInit (optional)
+ * - @ref DoDeinit (optional)
+ * - @ref GetEvent
+ * - @ref GetComponentID
+ * - @ref GetOutputDataType
+ * - @ref GetOutputDataSize
+ * - @ref Spawn
*
- * @ingroup AliHLTbase
+ * @ingroup alihlt_component
*/
class AliHLTDataSource : public AliHLTComponent {
public:
* Event processing function.
* The method is called by the framework to process one event. After
* preparation of data structures. The call is redirected to GetEvent.
- * @return neg. error code if failed
+ * @return neg. error code if failed <br>
+ * -ENOSPC output buffer too small
*/
- 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::kSource;}
- private:
/**
- * Data processing method for the component.
+ * Default implementation for all data sources.
+ * There are no input data types.
+ */
+ void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
+
+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 trigData trigger data structure
* @param outputPtr pointer to target buffer
* @param size <i>input</i>: size of target buffer
* <i>output</i>:size of produced data
* @param outputBlocks list to receive output block descriptors
- * @return
+ * @return neg. error code if failed
*/
- virtual int GetEvent( const AliHLTComponent_EventData& evtData,
- AliHLTComponent_TriggerData& trigData,
- AliHLTUInt8_t* outputPtr,
- AliHLTUInt32_t& size,
- vector<AliHLTComponent_BlockData>& outputBlocks ) = 0;
+ virtual int GetEvent( const AliHLTComponentEventData& evtData,
+ AliHLTComponentTriggerData& trigData,
+ AliHLTUInt8_t* outputPtr,
+ AliHLTUInt32_t& size,
+ vector<AliHLTComponentBlockData>& outputBlocks );
+
+ /**
+ * The high-level data processing method.
+ * This is the default processing method; the method is called
+ * if no low level @ref GetEvent method is overloaded by the component.
+ * @param evtData event data structure
+ * @param trigData trigger data structure
+ * @return neg. error code if failed
+ */
+ virtual int GetEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+
+private:
- ClassDef(AliHLTDataSource, 0)
+ ClassDef(AliHLTDataSource, 3)
};
#endif