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