4 #ifndef ALIHLTDATASOURCE_H
5 #define ALIHLTDATASOURCE_H
6 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
9 /** @file AliHLTDataSource.h
10 @author Matthias Richter
12 @brief Base class declaration for HLT data source 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 AliHLTDataSource
26 * Base class of HLT data source components.
27 * The class provides a common interface for the implementation of HLT data
28 * source components. The child class must implement the functions:
29 * - @ref DoInit (optional)
30 * - @ref DoDeinit (optional)
32 * - @ref GetComponentID
33 * - @ref GetOutputDataType
34 * - @ref GetOutputDataSize
37 * @ingroup alihlt_component
39 class AliHLTDataSource : public AliHLTComponent {
41 /** standard constructor */
43 /** standard destructor */
44 virtual ~AliHLTDataSource();
47 * Event processing function.
48 * The method is called by the framework to process one event. After
49 * preparation of data structures. The call is redirected to GetEvent.
50 * @return neg. error code if failed
52 int DoProcessing( const AliHLTComponentEventData& evtData,
53 const AliHLTComponentBlockData* blocks,
54 AliHLTComponentTriggerData& trigData,
55 AliHLTUInt8_t* outputPtr,
57 vector<AliHLTComponentBlockData>& outputBlocks,
58 AliHLTComponentEventDoneData*& edd );
60 // Information member functions for registration.
63 * Return @ref AliHLTComponent::kSource type as component type.
64 * @return component type id
66 TComponentType GetComponentType() { return AliHLTComponent::kSource;}
69 * Default implementation for all data sources.
70 * There are no input data types.
72 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
77 * The low-level data processing method for the component.
78 * This is the custom processing method and can be overloaded by
80 * @param evtData event data structure
81 * @param trigData trigger data structure
82 * @param outputPtr pointer to target buffer
83 * @param size <i>input</i>: size of target buffer
84 * <i>output</i>:size of produced data
85 * @param outputBlocks list to receive output block descriptors
86 * @return neg. error code if failed
88 virtual int GetEvent( const AliHLTComponentEventData& evtData,
89 AliHLTComponentTriggerData& trigData,
90 AliHLTUInt8_t* outputPtr,
92 vector<AliHLTComponentBlockData>& outputBlocks );
95 * The high-level data processing method.
96 * This is the default processing method; the method is called
97 * if no low level @ref GetEvent method is overloaded by the component.
98 * @param evtData event data structure
99 * @param trigData trigger data structure
100 * @return neg. error code if failed
102 virtual int GetEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
104 ClassDef(AliHLTDataSource, 1)