3 #ifndef ALIHLTSAMPLECALIBRATIONCOMPONENT_H
4 #define ALIHLTSAMPLECALIBRATIONCOMPONENT_H
6 //* This file is property of and copyright by the *
7 //* ALICE Experiment at CERN, All rights reserved. *
8 //* See cxx source for full Copyright notice */
10 // @file AliHLTSampleCalibrationComponent.h
11 // @author Matthias Richter
13 // @brief A sample calibration component for the HLT.
16 #include "AliHLTCalibrationProcessor.h"
21 * @class AliHLTSampleCalibrationComponent
22 * An HLT calibration component example.
23 * Component illustrates the basic functionality of a calibration component.
24 * Calibration components analyze data with respect to certain calibration
25 * issues and create calibration objects to be used in the reconstruction.
27 * <h2>General properties:</h2>
29 * Component ID: \b SampleCalibration <br>
30 * Library: \b libAliHLTSample.so <br>
31 * Input Data Types: @ref kAliHLTAnyDataType <br>
32 * Output Data Types: none <br>
34 * <h2>Mandatory arguments:</h2>
35 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
37 * <h2>Optional configuration arguments:</h2>
38 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
40 * <h2>Default CDB entries:</h2>
41 * The component has just one default CDB entry in
42 * <tt>HLT/ConfigSample/SampleCalibration</tt>.
43 * It does not load any configuration from the global <tt>ConfigHLT</tt>
45 * \li -TObjString object holding a string with the configuration parameters
48 * <h2>Performance:</h2>
49 * The component does not any event data processing.
51 * <h2>Memory consumption:</h2>
52 * The component does not any event data processing.
54 * <h2>Output size:</h2>
55 * The component has no output data.
57 * The component implements the @ref alihltcomponent-high-level-interface.
58 * for data processing.
59 * Apart from the normal AliHLTComponent interface functions a calibration
60 * component needs to overload two functions from the AliHLTCalibrationProcessor:
61 * - ProcessCalibration() invoked in the normal event loop and can be used
63 * - ShipDataToFXS() invoked at EOD to ship the final result
65 * @ingroup alihlt_tutorial
67 class AliHLTSampleCalibrationComponent : public AliHLTCalibrationProcessor {
69 AliHLTSampleCalibrationComponent();
70 virtual ~AliHLTSampleCalibrationComponent();
72 // AliHLTComponent interface functions
73 const char* GetComponentID();
74 void GetInputDataTypes( AliHLTComponentDataTypeList& list);
75 AliHLTComponentDataType GetOutputDataType();
76 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
77 void GetOCDBObjectDescription( TMap* const targetArray);
79 // Spawn function, return new class instance
80 AliHLTComponent* Spawn();
83 // AliHLTComponent interface functions
84 int DoInit( int argc, const char** argv );
86 int ProcessCalibration( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
87 int ShipDataToFXS( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
88 int ScanConfigurationArgument(int argc, const char** argv);
89 int Reconfigure(const char* cdbEntry, const char* chainId);
90 int ReadPreprocessorValues(const char* modules);
92 using AliHLTCalibrationProcessor::ProcessCalibration;
93 using AliHLTCalibrationProcessor::ShipDataToFXS;
96 /** copy constructor prohibited */
97 AliHLTSampleCalibrationComponent(const AliHLTSampleCalibrationComponent&);
98 /** assignment operator prohibited */
99 AliHLTSampleCalibrationComponent& operator=(const AliHLTSampleCalibrationComponent&);
101 /// output size estimator, updated during the event processing
102 int fOutputSize; //!transient
105 TH1S* fHisto; //! transient
107 int fHistoRange; //! transient
109 // version no 0 -> no streamer for member variables
110 ClassDef(AliHLTSampleCalibrationComponent, 0)