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