]>
Commit | Line | Data |
---|---|---|
421b7534 | 1 | // $Id$ |
2 | ||
c515df4c | 3 | //************************************************************************** |
4 | //* This file is property of and copyright by the * | |
5 | //* ALICE Experiment at CERN, All rights reserved. * | |
6 | //* * | |
7 | //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> * | |
8 | //* for The ALICE HLT Project. * | |
9 | //* * | |
10 | //* Permission to use, copy, modify and distribute this software and its * | |
11 | //* documentation strictly for non-commercial purposes is hereby granted * | |
12 | //* without fee, provided that the above copyright notice appears in all * | |
13 | //* copies and that both the copyright notice and this permission notice * | |
14 | //* appear in the supporting documentation. The authors make no claims * | |
15 | //* about the suitability of this software for any purpose. It is * | |
16 | //* provided "as is" without express or implied warranty. * | |
17 | //************************************************************************** | |
421b7534 | 18 | |
c515df4c | 19 | /// @file AliHLTDataSink.cxx |
20 | /// @author Matthias Richter | |
21 | /// @date | |
22 | /// @brief Base class implementation for HLT data source components. | |
23 | /// | |
421b7534 | 24 | |
25 | #include "AliHLTDataSink.h" | |
26 | ||
b22e91eb | 27 | /** ROOT macro for the implementation of ROOT specific class methods */ |
421b7534 | 28 | ClassImp(AliHLTDataSink) |
29 | ||
30 | AliHLTDataSink::AliHLTDataSink() | |
31 | { | |
c515df4c | 32 | // Base class of HLT data sink components. |
33 | // The class provides a common interface for the implementation of HLT data | |
34 | // sink components. | |
35 | // Sink components do not produce any output consequently the processing | |
36 | // function is called 'DumpEvent'. | |
421b7534 | 37 | } |
38 | ||
39 | AliHLTDataSink::~AliHLTDataSink() | |
40 | { | |
c515df4c | 41 | // destructor |
421b7534 | 42 | } |
43 | ||
9ce4bf4a | 44 | AliHLTComponentDataType AliHLTDataSink::GetOutputDataType() |
45 | { | |
c515df4c | 46 | // default method as sink components do not produce output |
8b250b0e | 47 | AliHLTComponentDataType dt = |
48 | {sizeof(AliHLTComponentDataType), | |
49 | kAliHLTVoidDataTypeID, | |
50 | kAliHLTVoidDataOrigin}; | |
51 | return dt; | |
9ce4bf4a | 52 | } |
53 | ||
54 | void AliHLTDataSink::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ) | |
55 | { | |
c515df4c | 56 | // default method as sink components do not produce output |
9ce4bf4a | 57 | constBase=0; |
58 | inputMultiplier=0; | |
59 | } | |
60 | ||
3cde846d | 61 | int AliHLTDataSink::DoProcessing( const AliHLTComponentEventData& evtData, |
a655eae3 | 62 | const AliHLTComponentBlockData* blocks, |
63 | AliHLTComponentTriggerData& trigData, | |
64 | AliHLTUInt8_t* outputPtr, | |
65 | AliHLTUInt32_t& size, | |
c515df4c | 66 | AliHLTComponentBlockDataList& outputBlocks, |
a655eae3 | 67 | AliHLTComponentEventDoneData*& edd ) |
421b7534 | 68 | { |
c515df4c | 69 | // Processing method, calls child's DumpEvent |
421b7534 | 70 | int iResult=0; |
53feaef5 | 71 | if (outputPtr==NULL |
72 | && size==0 | |
53feaef5 | 73 | && edd==NULL) { |
74 | // this is currently just to get rid of the warning "unused parameter" | |
75 | } | |
a655eae3 | 76 | outputBlocks.clear(); |
421b7534 | 77 | iResult=DumpEvent(evtData, blocks, trigData); |
78 | return iResult; | |
79 | } | |
a655eae3 | 80 | |
81 | int AliHLTDataSink::DumpEvent( const AliHLTComponentEventData& evtData, | |
298ef463 | 82 | const AliHLTComponentBlockData* /*blocks*/, |
a655eae3 | 83 | AliHLTComponentTriggerData& trigData ) |
84 | { | |
85 | // we just forward to the high level method, all other parameters already | |
86 | // have been stored internally | |
87 | return DumpEvent(evtData, trigData); | |
88 | } | |
89 | ||
298ef463 | 90 | int AliHLTDataSink::DumpEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/) |
a655eae3 | 91 | { |
c515df4c | 92 | // default method: one of DumpEvent methods must be implemented |
a655eae3 | 93 | HLTFatal("no processing method implemented"); |
94 | return -ENOSYS; | |
95 | } |