]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/AliHLTDataSource.h
Air with increased transport cuts close to qb28.
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataSource.h
CommitLineData
a655eae3 1//-*- Mode: C++ -*-
421b7534 2// @(#) $Id$
3
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 */
8
9/** @file AliHLTDataSource.h
10 @author Matthias Richter
11 @date
b22e91eb 12 @brief Base class declaration for HLT data source components.
13 @note The class is used in Offline (AliRoot) context
14*/
421b7534 15
16#include "AliHLTComponent.h"
17
18/**
19 * @class AliHLTDataSource
20 * Base class of HLT data source components.
21 * The class provides a common interface for the implementation of HLT data
22 * source components. The child class must implement the functions:
b22e91eb 23 * - @ref DoInit (optional)
24 * - @ref DoDeinit (optional)
25 * - @ref GetEvent
26 * - @ref GetComponentID
b22e91eb 27 * - @ref GetOutputDataType
28 * - @ref GetOutputDataSize
29 * - @ref Spawn
421b7534 30 *
b22e91eb 31 * @ingroup alihlt_component
421b7534 32 */
33class AliHLTDataSource : public AliHLTComponent {
34 public:
35 /** standard constructor */
36 AliHLTDataSource();
37 /** standard destructor */
38 virtual ~AliHLTDataSource();
39
40 /**
41 * Event processing function.
42 * The method is called by the framework to process one event. After
43 * preparation of data structures. The call is redirected to GetEvent.
44 * @return neg. error code if failed
45 */
3cde846d 46 int DoProcessing( const AliHLTComponentEventData& evtData,
8ede8717 47 const AliHLTComponentBlockData* blocks,
48 AliHLTComponentTriggerData& trigData,
421b7534 49 AliHLTUInt8_t* outputPtr,
50 AliHLTUInt32_t& size,
a655eae3 51 vector<AliHLTComponentBlockData>& outputBlocks,
8ede8717 52 AliHLTComponentEventDoneData*& edd );
421b7534 53
54 // Information member functions for registration.
55
56 /**
57 * Return @ref AliHLTComponent::kSource type as component type.
58 * @return component type id
59 */
60 TComponentType GetComponentType() { return AliHLTComponent::kSource;}
61
2d7ff710 62 /**
63 * Default implementation for all data sources.
64 * There are no input data types.
65 */
21745ddc 66 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
2d7ff710 67
421b7534 68 private:
a655eae3 69
421b7534 70 /**
a655eae3 71 * The low-level data processing method for the component.
72 * This is the custom processing method and can be overloaded by
73 * the component.
421b7534 74 * @param evtData event data structure
75 * @param trigData trigger data structure
76 * @param outputPtr pointer to target buffer
77 * @param size <i>input</i>: size of target buffer
78 * <i>output</i>:size of produced data
79 * @param outputBlocks list to receive output block descriptors
a655eae3 80 * @return neg. error code if failed
421b7534 81 */
8ede8717 82 virtual int GetEvent( const AliHLTComponentEventData& evtData,
a655eae3 83 AliHLTComponentTriggerData& trigData,
84 AliHLTUInt8_t* outputPtr,
85 AliHLTUInt32_t& size,
86 vector<AliHLTComponentBlockData>& outputBlocks );
87
88 /**
89 * The high-level data processing method.
90 * This is the default processing method; the method is called
91 * if no low level @ref GetEvent method is overloaded by the component.
92 * @param evtData event data structure
93 * @param trigData trigger data structure
94 * @return neg. error code if failed
95 */
96 virtual int GetEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
421b7534 97
a655eae3 98 ClassDef(AliHLTDataSource, 1)
421b7534 99};
100#endif