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"
21 * @class AliHLTRootSchemaEvolutionComponent
23 * <h2>General properties:</h2>
25 * Component ID: \b ROOTFileWriter <br>
26 * Library: \b libAliHLTUtil.so <br>
27 * Input Data Types: ::kAliHLTAnyDataType <br>
28 * Output Data Types: none <br>
30 * <h2>Mandatory arguments:</h2>
31 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
33 * <h2>Optional arguments:</h2>
34 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
36 * push streamer info to FXS, fetched by Shuttle and store in the entry
37 * HLT/Calib/StreamerInfo
39 * \li -hltout<=[all,first,eor,off]> <br>
40 * push streamer info to output, the streamer info is stored in the
41 * events in all, the first, and/or the EOR.
43 * <h2>Configuration:</h2>
44 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
45 * Configuration by component arguments.
47 * <h2>Default CDB entries:</h2>
48 * The component loads no CDB entries.
50 * <h2>Performance:</h2>
51 * The component does not process any event data.
53 * <h2>Memory consumption:</h2>
54 * The component does not process any event data.
56 * <h2>Output size:</h2>
57 * Depending on the mode.
59 * @ingroup alihlt_util_components
61 class AliHLTRootSchemaEvolutionComponent : public AliHLTProcessor
64 /// standard constructor
65 AliHLTRootSchemaEvolutionComponent();
67 virtual ~AliHLTRootSchemaEvolutionComponent();
69 /// inherited from AliHLTComponent: return id of the component.
70 virtual const char* GetComponentID() {return "ROOTSchemaEvolutionComponent";};
71 /// inherited from AliHLTComponent: input data types
72 virtual void GetInputDataTypes(AliHLTComponentDataTypeList&);
73 /// inherited from AliHLTComponent: output data types
74 virtual AliHLTComponentDataType GetOutputDataType();
75 /// inherited from AliHLTComponent: output data size
76 virtual void GetOutputDataSize(unsigned long&, double&);
78 /// inherited from AliHLTComponent: spawn function, create an instance.
79 virtual AliHLTComponent* Spawn() {return new AliHLTRootSchemaEvolutionComponent;}
82 /// push streamer info to the HLTOUT for the first event
83 kHLTOUTatFirstEvent = 0x1,
84 /// push streamer info to the HLTOUT for all events
85 kHLTOUTatAllEvents = 0x2,
86 /// push streamer info to the HLTOUT at EOR, this has no relevance
87 /// for reconstruction as it is too late and just in one raw file,
88 /// but it allows archival at the end of the run
90 /// push streamer info to FXS
94 /// Update the array of known streamer infos from a list of infos
95 /// Checks whether the provided infos are already there in the present version
96 /// and adds if it is a new info.
97 int UpdateStreamerInfos(const TList* list, TObjArray* infos) const;
100 /// inherited from AliHLTComponent: custom initialization
101 int DoInit( int argc, const char** argv );
102 /// inherited from AliHLTComponent: cleanup
105 /// inherited from AliHLTProcessor processing
106 virtual int DoEvent( const AliHLTComponentEventData& evtData,
107 AliHLTComponentTriggerData& trigData );
109 using AliHLTProcessor::DoEvent;
112 * Inherited from AliHLTComponent
113 * Scan one argument and adjacent parameters.
114 * @return number of scanned parameters, neg. error code if failed
116 virtual int ScanConfigurationArgument(int argc, const char** argv);
118 void SetBits(AliHLTUInt32_t b) {fFlags|=b;}
119 void ClearBits(AliHLTUInt32_t b) {fFlags&=~b;}
120 bool TestBits(AliHLTUInt32_t b) {return (fFlags&b) != 0;}
123 /** copy constructor prohibited */
124 AliHLTRootSchemaEvolutionComponent(const AliHLTRootSchemaEvolutionComponent&);
125 /** assignment operator prohibited */
126 AliHLTRootSchemaEvolutionComponent& operator=(const AliHLTRootSchemaEvolutionComponent&);
128 AliHLTUInt32_t fFlags; //! property flags
130 TObjArray* fpStreamerInfos; //! array of streamer infos
132 AliHLTUInt32_t fFXSPrescaler; //! prescalar for the publishing to FXS
134 static const char* fgkConfigurationObject; //! configuration object
136 ClassDef(AliHLTRootSchemaEvolutionComponent, 1) // ROOT schema evolution component