]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/BASE/util/AliHLTRootFileStreamerComponent.h
Getting rid of warnings about hidden virtual methods.
[u/mrichter/AliRoot.git] / HLT / BASE / util / AliHLTRootFileStreamerComponent.h
1 // -*- Mode: C++ -*-
2 // @(#) $Id$
3
4 #ifndef ALIHLTROOTFILESTREAMERCOMPONENT_H
5 #define ALIHLTROOTFILESTREAMERCOMPONENT_H
6 /* This file is property of and copyright by the ALICE HLT Project        * 
7  * ALICE Experiment at CERN, All rights reserved.                         *
8  * See cxx source for full Copyright notice                               */
9
10 /** @file   AliHLTRootFileStreamerComponent.h
11     @author Matthias Richter
12     @date   
13     @brief  Save objects in a ROOT memory file
14
15                                                                           */
16 #include "AliHLTProcessor.h"
17
18 /**
19  * @class AliHLTRootFileStreamerComponent
20  * The RootFileStreamer provides a stand alone component to write incoming
21  * TObject like structures into a ROOT memory file. The memory file is
22  * published via the output stream.
23  *
24  * Component ID: \b ROOTFileStreamer <br>
25  * Library: \b libAliHLTUtil.
26  *
27  * Mandatory arguments: <br>
28  * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
29  *
30  * Optional arguments:<br>
31  * \li -datatype     <i> datatype   dataorigin </i> <br>
32  *      data type ID and origin, e.g. <tt>-datatype CLUSTERS TPC </tt>
33  * \li -dataspec     <i> specification </i> <br>
34  *      data specification treated as decimal number or hex number if
35  *      prepended by '0x'
36  *
37  * @ingroup alihlt_component
38  */
39 class AliHLTRootFileStreamerComponent : public AliHLTProcessor
40 {
41  public:
42   /** standard constructor */
43   AliHLTRootFileStreamerComponent();
44   /** destructor */
45   virtual ~AliHLTRootFileStreamerComponent();
46
47   /**
48    * The id of the component.
49    * @return component id (string)
50    */
51   const char* GetComponentID() {return "ROOTFileStreamer";};
52
53   /**
54    * Spawn function.
55    * @return new class instance
56    */
57   AliHLTComponent* Spawn() {return new AliHLTRootFileStreamerComponent;}
58
59   /**
60    * Get the input data types of the component.
61    * The function is pure virtual and must be implemented by the child class.
62    * @return list of data types in the vector reference
63    */
64   void GetInputDataTypes( vector<AliHLTComponentDataType>& );
65
66   /**
67    * Get the output data type of the component.
68    * The function is pure virtual and must be implemented by the child class.
69    * @return output data type
70    */
71   AliHLTComponentDataType GetOutputDataType();
72
73   /**
74    * Get a ratio by how much the data volume is shrinked or enhanced.
75    * The function is pure virtual and must be implemented by the child class.
76    * @param constBase        <i>return</i>: additive part, independent of the
77    *                                   input data volume  
78    * @param inputMultiplier  <i>return</i>: multiplication ratio
79    * @return values in the reference variables
80    */
81   void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
82
83  protected:
84   /**
85    * Internal initialization.
86    * @see @ref AliHLTComponent::DoInit for description and parameters
87    */
88   virtual int DoInit( int argc, const char** argv );
89
90   /**
91    * The high-level data processing method.
92    * All incoming objects are saved into a ROOT file in memory.
93    * @param evtData       event data structure
94    * @param trigData      trigger data structure
95    * @return neg. error code if failed
96    */
97   int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
98   
99   using AliHLTProcessor::DoEvent;
100
101  private:
102   /** not a valid copy constructor, defined according to effective C++ style */
103   AliHLTRootFileStreamerComponent(const AliHLTRootFileStreamerComponent&);
104   /** not a valid assignment op, but defined according to effective C++ style */
105   AliHLTRootFileStreamerComponent& operator=(const AliHLTRootFileStreamerComponent&);
106
107   /** data type */
108   AliHLTComponentDataType fDataType;                               // see above
109   /** data specification */
110   AliHLTUInt32_t          fSpecification;                          // see above
111
112   ClassDef(AliHLTRootFileStreamerComponent, 0)
113 };
114 #endif