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