]>
Commit | Line | Data |
---|---|---|
a655eae3 | 1 | //-*- Mode: C++ -*- |
f23a6e1a | 2 | // @(#) $Id$ |
3 | ||
4 | #ifndef ALIHLTPROCESSOR_H | |
5 | #define ALIHLTPROCESSOR_H | |
6 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
7 | * See cxx source for full Copyright notice */ | |
8 | ||
bfccbf68 | 9 | /** @file AliHLTProcessor.h |
10 | @author Matthias Richter, Timm Steinbeck | |
11 | @date | |
12 | @brief Base class declaration for HLT analysis components. */ | |
f23a6e1a | 13 | |
14 | #include "AliHLTComponent.h" | |
15 | ||
bfccbf68 | 16 | /** |
17 | * @class AliHLTProcessor | |
18 | * Base class of HLT data analysis components. | |
19 | * The class provides a common interface for the implementation of HLT data | |
20 | * analysis components. The child class must implement the functions: | |
b22e91eb | 21 | * - @ref DoInit (optional) |
22 | * - @ref DoDeinit (optional) | |
23 | * - @ref DoEvent | |
24 | * - @ref GetComponentID | |
25 | * - @ref GetInputDataTypes | |
26 | * - @ref GetOutputDataType | |
27 | * - @ref GetOutputDataSize | |
28 | * - @ref Spawn | |
bfccbf68 | 29 | * |
b22e91eb | 30 | * @ingroup alihlt_component |
bfccbf68 | 31 | */ |
f23a6e1a | 32 | class AliHLTProcessor : public AliHLTComponent { |
33 | public: | |
bfccbf68 | 34 | /** standard constructor */ |
f23a6e1a | 35 | AliHLTProcessor(); |
bfccbf68 | 36 | /** standard destructor */ |
f23a6e1a | 37 | virtual ~AliHLTProcessor(); |
38 | ||
bfccbf68 | 39 | /* depricated */ |
9ddaea75 | 40 | int Init( AliHLTComponentEnvironment* environ, void* environParam, int argc, const char** argv ); |
bfccbf68 | 41 | /* depricated */ |
f23a6e1a | 42 | int Deinit(); |
bfccbf68 | 43 | |
44 | /** | |
45 | * Event processing function. | |
46 | * The method is called by the framework to process one event. After | |
47 | * preparation of data structures. The call is redirected to DoEvent. | |
48 | * @return neg. error code if failed | |
49 | */ | |
3cde846d | 50 | int DoProcessing( const AliHLTComponentEventData& evtData, |
8ede8717 | 51 | const AliHLTComponentBlockData* blocks, |
52 | AliHLTComponentTriggerData& trigData, | |
bfccbf68 | 53 | AliHLTUInt8_t* outputPtr, |
54 | AliHLTUInt32_t& size, | |
a655eae3 | 55 | vector<AliHLTComponentBlockData>& outputBlocks, |
8ede8717 | 56 | AliHLTComponentEventDoneData*& edd ); |
f23a6e1a | 57 | |
58 | // Information member functions for registration. | |
bfccbf68 | 59 | |
60 | /** | |
61 | * Return @ref AliHLTComponent::kProcessor type as component type. | |
62 | * @return component type id | |
63 | */ | |
f23a6e1a | 64 | TComponentType GetComponentType() { return AliHLTComponent::kProcessor;} |
65 | ||
66 | private: | |
bfccbf68 | 67 | /** |
a655eae3 | 68 | * The low-level data processing method for the component. |
69 | * This is the custom processing method and can be overloaded by | |
70 | * the component. | |
bfccbf68 | 71 | * @param evtData event data structure |
72 | * @param blocks input data block descriptors | |
73 | * @param trigData trigger data structure | |
74 | * @param outputPtr pointer to target buffer | |
75 | * @param size <i>input</i>: size of target buffer | |
76 | * <i>output</i>:size of produced data | |
77 | * @param outputBlocks list to receive output block descriptors | |
a655eae3 | 78 | * @return neg. error code if failed |
bfccbf68 | 79 | */ |
8ede8717 | 80 | virtual int DoEvent( const AliHLTComponentEventData& evtData, |
81 | const AliHLTComponentBlockData* blocks, | |
82 | AliHLTComponentTriggerData& trigData, | |
bfccbf68 | 83 | AliHLTUInt8_t* outputPtr, |
84 | AliHLTUInt32_t& size, | |
a655eae3 | 85 | vector<AliHLTComponentBlockData>& outputBlocks ); |
f23a6e1a | 86 | |
a655eae3 | 87 | /** |
88 | * The high-level data processing method. | |
89 | * This is the default processing method; the method is called | |
90 | * if no low level @ref DoEvent method is overloaded by the component. | |
91 | * @param evtData event data structure | |
92 | * @param trigData trigger data structure | |
93 | * @return neg. error code if failed | |
94 | */ | |
95 | virtual int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); | |
96 | ||
97 | ClassDef(AliHLTProcessor, 1) | |
f23a6e1a | 98 | }; |
99 | #endif |