]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/AliHLTDataSink.cxx
high-level component interface added
[u/mrichter/AliRoot.git] / HLT / BASE / AliHLTDataSink.cxx
1 // $Id$
2
3 /**************************************************************************
4  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  *                                                                        *
6  * Authors: Matthias Richter <Matthias.Richter@ift.uib.no>                *
7  *          for The ALICE Off-line Project.                               *
8  *                                                                        *
9  * Permission to use, copy, modify and distribute this software and its   *
10  * documentation strictly for non-commercial purposes is hereby granted   *
11  * without fee, provided that the above copyright notice appears in all   *
12  * copies and that both the copyright notice and this permission notice   *
13  * appear in the supporting documentation. The authors make no claims     *
14  * about the suitability of this software for any purpose. It is          *
15  * provided "as is" without express or implied warranty.                  *
16  **************************************************************************/
17
18 /** @file   AliHLTDataSink.cxx
19     @author Matthias Richter
20     @date   
21     @brief  Base class implementation for HLT data source components. */
22
23 #if __GNUC__>= 3
24 using namespace std;
25 #endif
26
27 #include "AliHLTDataSink.h"
28
29 /** ROOT macro for the implementation of ROOT specific class methods */
30 ClassImp(AliHLTDataSink)
31
32 AliHLTDataSink::AliHLTDataSink()
33
34   // see header file for class documentation
35   // or
36   // refer to README to build package
37   // or
38   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
39 }
40
41 AliHLTDataSink::~AliHLTDataSink()
42
43   // see header file for class documentation
44 }
45
46 AliHLTComponentDataType AliHLTDataSink::GetOutputDataType()
47 {
48   // see header file for class documentation
49   AliHLTComponentDataType dt =
50     {sizeof(AliHLTComponentDataType),
51      kAliHLTVoidDataTypeID,
52      kAliHLTVoidDataOrigin};
53   return dt;
54 }
55
56 void AliHLTDataSink::GetOutputDataSize( unsigned long& constBase, double& inputMultiplier )
57 {
58   // see header file for class documentation
59   constBase=0;
60   inputMultiplier=0;
61 }
62
63 int AliHLTDataSink::DoProcessing( const AliHLTComponentEventData& evtData,
64                                   const AliHLTComponentBlockData* blocks, 
65                                   AliHLTComponentTriggerData& trigData,
66                                   AliHLTUInt8_t* outputPtr, 
67                                   AliHLTUInt32_t& size,
68                                   vector<AliHLTComponentBlockData>& outputBlocks,
69                                   AliHLTComponentEventDoneData*& edd )
70 {
71   // see header file for class documentation
72   int iResult=0;
73   if (outputPtr==NULL
74       && size==0 
75       && edd==NULL) {
76     // this is currently just to get rid of the warning "unused parameter"
77   }
78   outputBlocks.clear();
79   iResult=DumpEvent(evtData, blocks, trigData);
80   return iResult;
81 }
82
83 int AliHLTDataSink::DumpEvent( const AliHLTComponentEventData& evtData,
84                                const AliHLTComponentBlockData* blocks, 
85                                AliHLTComponentTriggerData& trigData )
86 {
87   // we just forward to the high level method, all other parameters already
88   // have been stored internally
89   return DumpEvent(evtData, trigData);
90 }
91
92 int AliHLTDataSink::DumpEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData)
93 {
94   HLTFatal("no processing method implemented");
95   return -ENOSYS;
96 }