4 #ifndef ALIHLTGLOBALHISTOCOLLECTOR_H
5 #define ALIHLTGLOBALHISTOCOLLECTOR_H
7 //* This file is property of and copyright by the ALICE HLT Project *
8 //* ALICE Experiment at CERN, All rights reserved. *
9 //* See cxx source for full Copyright notice *
11 /** @file AliHLTGlobalHistoCollector.h
12 @author Kalliopi Kanaki, Kenneth Aamodt
14 @brief Component for acting upon histograms
17 // see below for class documentation
19 // refer to README to build package
21 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
23 #include "AliHLTProcessor.h"
24 #include "AliHLTDataTypes.h"
25 #include "AliHLTComponentBenchmark.h"
32 * @class AliHLTGlobalHistoCollector
33 * Implementation of the component to read histograms from other
34 * components and add, divide etc.
35 * The component implements the interface methods of the @ref AliHLTProcessor.
37 * The component has the following component arguments:
39 * -sum-noise-histograms Loops over the output of TPCNoiseMap and sums the partition histograms
40 * They are sorted per TPC side.
42 * -sum-krypton-histograms Loops over the output of the krypton CF and sums the histograms
43 * (it will become obsolete, when the next option does all the work)
45 * -use-general It will become the standard general option for summing histograms
47 * -ignore-specification It ignores the last part of the histogram name, if it has
48 * the form "_Slice_%.2d%.2d_Partition_%.2d%.2d, minSlice, maxSlice, minPartition, maxPartition".
49 * It keeps the first part of the hist name and uses it to name the summed histogram.
53 class AliHLTGlobalHistoCollector : public AliHLTProcessor {
56 struct AliHLTGlobalHCInstance
59 AliHLTUInt32_t fHLTSpecification;
62 struct AliHLTGlobalHCCollection
65 AliHLTGlobalHCCollection():fMergedObject(0),fHLTDataType(kAliHLTVoidDataType),fInstances(),fNeedToMerge(0){}
66 AliHLTGlobalHCCollection( const AliHLTGlobalHCCollection &x):fMergedObject(x.fMergedObject),fHLTDataType(x.fHLTDataType),fInstances(x.fInstances),fNeedToMerge(x.fNeedToMerge){}
67 AliHLTGlobalHCCollection &operator=( const AliHLTGlobalHCCollection &x){
68 fMergedObject = x.fMergedObject;
69 fHLTDataType = x.fHLTDataType;
70 fInstances = x.fInstances;
71 fNeedToMerge = x.fNeedToMerge;
75 ~AliHLTGlobalHCCollection(){}
77 TObject *fMergedObject;
78 AliHLTComponentDataType fHLTDataType;
79 std::vector<AliHLTGlobalHCInstance> fInstances;
83 /** standard constructor */
84 AliHLTGlobalHistoCollector();
86 virtual ~AliHLTGlobalHistoCollector();
88 // Public functions to implement AliHLTComponent's interface.
89 // These functions are required for the registration process
91 /** interface function, see AliHLTComponent for description */
92 const char* GetComponentID();
93 /** interface function, see AliHLTComponent for description */
94 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
95 /** interface function, see AliHLTComponent for description */
96 AliHLTComponentDataType GetOutputDataType();
97 /** interface function, see AliHLTComponent for description */
98 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
99 /** interface function, see AliHLTComponent for description */
100 AliHLTComponent* Spawn();
104 // Protected functions to implement AliHLTComponent's interface.
105 // These functions provide initialization as well as the actual processing capabilities of the component.
107 int DoInit( int argc, const char** argv );
109 int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
110 int Reconfigure(const char* cdbEntry, const char* chainId);
112 using AliHLTProcessor::DoEvent;
116 int Configure(const char* arguments);
118 /** copy constructor prohibited */
119 AliHLTGlobalHistoCollector(const AliHLTGlobalHistoCollector&);
121 /** assignment operator prohibited */
122 AliHLTGlobalHistoCollector& operator=(const AliHLTGlobalHistoCollector&);
124 void Clear(); // reset the store
126 AliHLTUInt32_t fUID;// uID of the component
128 std::vector<AliHLTGlobalHCCollection> fStore;
129 AliHLTComponentBenchmark fBenchmark;// benchmark