4 #ifndef ALIHLTROOTSCHEMAEVOLUTIONCOMPONENT_H
5 #define ALIHLTROOTSCHEMAEVOLUTIONCOMPONENT_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 AliHLTRootSchemaEvolutionComponent.h
11 @author Matthias Richter
13 @brief Handler component for ROOT schema evolution of streamed objects
16 #include "AliHLTProcessor.h"
22 * @class AliHLTRootSchemaEvolutionComponent
24 * <h2>General properties:</h2>
26 * Component ID: \b ROOTFileWriter <br>
27 * Library: \b libAliHLTUtil.so <br>
28 * Input Data Types: ::kAliHLTAnyDataType <br>
29 * Output Data Types: none <br>
31 * <h2>Mandatory arguments:</h2>
32 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
34 * <h2>Optional arguments:</h2>
35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
37 * push streamer info to FXS, fetched by Shuttle and store in the entry
38 * HLT/Calib/StreamerInfo
40 * \li -hltout<=[all,first,eor,off]> <br>
41 * push streamer info to output, the streamer info is stored in the
42 * events in all, the first, and/or the EOR.
43 * \li -file=<filename> <br>
44 * write to file at EOR
46 * <h2>Configuration:</h2>
47 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
48 * Configuration by component arguments.
50 * <h2>Default CDB entries:</h2>
51 * The component loads no CDB entries.
53 * <h2>Performance:</h2>
54 * The component does not process any event data.
56 * <h2>Memory consumption:</h2>
57 * The component does not process any event data.
59 * <h2>Output size:</h2>
60 * Depending on the mode.
62 * @ingroup alihlt_util_components
64 class AliHLTRootSchemaEvolutionComponent : public AliHLTProcessor
67 /// standard constructor
68 AliHLTRootSchemaEvolutionComponent();
70 virtual ~AliHLTRootSchemaEvolutionComponent();
72 /// inherited from AliHLTComponent: return id of the component.
73 virtual const char* GetComponentID() {return "ROOTSchemaEvolutionComponent";};
74 /// inherited from AliHLTComponent: input data types
75 virtual void GetInputDataTypes(AliHLTComponentDataTypeList&);
76 /// inherited from AliHLTComponent: output data types
77 virtual AliHLTComponentDataType GetOutputDataType();
78 /// inherited from AliHLTComponent: output data size
79 virtual void GetOutputDataSize(unsigned long&, double&);
81 /// inherited from AliHLTComponent: spawn function, create an instance.
82 virtual AliHLTComponent* Spawn() {return new AliHLTRootSchemaEvolutionComponent;}
85 /// push streamer info to the HLTOUT for the first event
86 kHLTOUTatFirstEvent = 0x1,
87 /// push streamer info to the HLTOUT for all events
88 kHLTOUTatAllEvents = 0x2,
89 /// push streamer info to the HLTOUT at EOR, this has no relevance
90 /// for reconstruction as it is too late and just in one raw file,
91 /// but it allows archival at the end of the run
93 /// push streamer info to FXS
97 /// Update the array of known streamer infos from a list of infos
98 /// Checks whether the provided infos are already there in the present version
99 /// and adds if it is a new info.
100 int UpdateStreamerInfos(const TList* list, TObjArray* infos) const;
103 /// inherited from AliHLTComponent: custom initialization
104 int DoInit( int argc, const char** argv );
105 /// inherited from AliHLTComponent: cleanup
108 /// inherited from AliHLTProcessor processing
109 virtual int DoEvent( const AliHLTComponentEventData& evtData,
110 AliHLTComponentTriggerData& trigData );
112 using AliHLTProcessor::DoEvent;
115 * Inherited from AliHLTComponent
116 * Scan one argument and adjacent parameters.
117 * @return number of scanned parameters, neg. error code if failed
119 virtual int ScanConfigurationArgument(int argc, const char** argv);
121 void SetBits(AliHLTUInt32_t b) {fFlags|=b;}
122 void ClearBits(AliHLTUInt32_t b) {fFlags&=~b;}
123 bool TestBits(AliHLTUInt32_t b) {return (fFlags&b) != 0;}
124 int WriteToFile(const char* filename, const TObjArray* infos) const;
127 /** copy constructor prohibited */
128 AliHLTRootSchemaEvolutionComponent(const AliHLTRootSchemaEvolutionComponent&);
129 /** assignment operator prohibited */
130 AliHLTRootSchemaEvolutionComponent& operator=(const AliHLTRootSchemaEvolutionComponent&);
132 AliHLTUInt32_t fFlags; //! property flags
134 TObjArray* fpStreamerInfos; //! array of streamer infos
136 AliHLTUInt32_t fFXSPrescaler; //! prescalar for the publishing to FXS
138 TString fFileName; //! file name for dump at EOR
140 static const char* fgkConfigurationObject; //! configuration object
142 ClassDef(AliHLTRootSchemaEvolutionComponent, 2) // ROOT schema evolution component