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 */
10 /** @file AliHLTRootFileStreamerComponent.h
11 @author Matthias Richter
13 @brief Save objects in a ROOT memory file
16 #include "AliHLTProcessor.h"
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.
24 * Component ID: \b ROOTFileStreamer <br>
25 * Library: \b libAliHLTUtil.
27 * Mandatory arguments: <br>
28 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formating -->
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
37 * @ingroup alihlt_component
39 class AliHLTRootFileStreamerComponent : public AliHLTProcessor
42 /** standard constructor */
43 AliHLTRootFileStreamerComponent();
45 virtual ~AliHLTRootFileStreamerComponent();
48 * The id of the component.
49 * @return component id (string)
51 const char* GetComponentID() {return "ROOTFileStreamer";};
55 * @return new class instance
57 AliHLTComponent* Spawn() {return new AliHLTRootFileStreamerComponent;}
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
64 void GetInputDataTypes( vector<AliHLTComponentDataType>& );
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
71 AliHLTComponentDataType GetOutputDataType();
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
78 * @param inputMultiplier <i>return</i>: multiplication ratio
79 * @return values in the reference variables
81 void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
85 * Internal initialization.
86 * @see @ref AliHLTComponent::DoInit for description and parameters
88 virtual int DoInit( int argc, const char** argv );
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
97 int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
99 using AliHLTProcessor::DoEvent;
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&);
108 AliHLTComponentDataType fDataType; // see above
109 /** data specification */
110 AliHLTUInt32_t fSpecification; // see above
112 ClassDef(AliHLTRootFileStreamerComponent, 0)