Line data Source code
1 : // $Id$
2 :
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 : //**************************************************************************
18 :
19 : /// @file AliHLTDataSink.cxx
20 : /// @author Matthias Richter
21 : /// @date
22 : /// @brief Base class implementation for HLT data source components.
23 : ///
24 :
25 : #include "AliHLTDataSink.h"
26 :
27 : /** ROOT macro for the implementation of ROOT specific class methods */
28 126 : ClassImp(AliHLTDataSink)
29 :
30 27 : AliHLTDataSink::AliHLTDataSink()
31 81 : {
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'.
37 27 : }
38 :
39 : AliHLTDataSink::~AliHLTDataSink()
40 0 : {
41 : // destructor
42 54 : }
43 :
44 : AliHLTComponentDataType AliHLTDataSink::GetOutputDataType()
45 : {
46 : // default method as sink components do not produce output
47 : AliHLTComponentDataType dt =
48 : {sizeof(AliHLTComponentDataType),
49 : kAliHLTVoidDataTypeID,
50 : kAliHLTVoidDataOrigin};
51 0 : return dt;
52 : }
53 :
54 : void AliHLTDataSink::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
55 : {
56 : // default method as sink components do not produce output
57 0 : constBase=0;
58 0 : inputMultiplier=0;
59 0 : }
60 :
61 : int AliHLTDataSink::DoProcessing( const AliHLTComponentEventData& evtData,
62 : const AliHLTComponentBlockData* blocks,
63 : AliHLTComponentTriggerData& trigData,
64 : AliHLTUInt8_t* outputPtr,
65 : AliHLTUInt32_t& size,
66 : AliHLTComponentBlockDataList& outputBlocks,
67 : AliHLTComponentEventDoneData*& edd )
68 : {
69 : // Processing method, calls child's DumpEvent
70 : int iResult=0;
71 : if (outputPtr==NULL
72 : && size==0
73 : && edd==NULL) {
74 : // this is currently just to get rid of the warning "unused parameter"
75 : }
76 0 : outputBlocks.clear();
77 0 : iResult=DumpEvent(evtData, blocks, trigData);
78 0 : return iResult;
79 : }
80 :
81 : int AliHLTDataSink::DumpEvent( const AliHLTComponentEventData& evtData,
82 : const AliHLTComponentBlockData* /*blocks*/,
83 : AliHLTComponentTriggerData& trigData )
84 : {
85 : // we just forward to the high level method, all other parameters already
86 : // have been stored internally
87 0 : return DumpEvent(evtData, trigData);
88 : }
89 :
90 : int AliHLTDataSink::DumpEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/)
91 : {
92 : // default method: one of DumpEvent methods must be implemented
93 0 : HLTFatal("no processing method implemented");
94 0 : return -ENOSYS;
95 : }
|