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"
31 * @class AliHLTGlobalHistoCollector
32 * Implementation of the component to read histograms from other
33 * components and add, divide etc.
34 * The component implements the interface methods of the @ref AliHLTProcessor.
36 * The component has the following component arguments:
38 * -sum-noise-histograms Loops over the output of TPCNoiseMap and sums the partition histograms
39 * They are sorted per TPC side.
41 * -sum-krypton-histograms Loops over the output of the krypton CF and sums the histograms
42 * (it will become obsolete, when the next option does all the work)
44 * -use-general It will become the standard general option for summing histograms
46 * -ignore-specification It ignores the last part of the histogram name, if it has
47 * the form "_Slice_%.2d%.2d_Partition_%.2d%.2d, minSlice, maxSlice, minPartition, maxPartition".
48 * It keeps the first part of the hist name and uses it to name the summed histogram.
52 class AliHLTGlobalHistoCollector : public AliHLTProcessor {
55 struct AliHLTHistoData
58 AliHLTUInt32_t fSpecification;
61 struct AliHLTHistoBaseData
63 AliHLTHistoBaseData():fMergedHisto(0),fDataType(kAliHLTVoidDataType),fHistos(){}
64 AliHLTHistoBaseData( const AliHLTHistoBaseData &x):fMergedHisto(x.fMergedHisto),fDataType(x.fDataType),fHistos(x.fHistos){}
65 AliHLTHistoBaseData &operator=( const AliHLTHistoBaseData &x){ fMergedHisto= x.fMergedHisto; fDataType=x.fDataType; fHistos = x.fHistos; return *this; }
67 AliHLTComponentDataType fDataType;
68 std::vector<AliHLTHistoData> fHistos;
70 //typedef struct AliHLTHistoData AliHLTHistoData; //!
71 //typedef struct AliHLTHistoBaseData AliHLTHistoBaseData; //!
73 /** standard constructor */
74 AliHLTGlobalHistoCollector();
76 virtual ~AliHLTGlobalHistoCollector();
78 // Public functions to implement AliHLTComponent's interface.
79 // These functions are required for the registration process
81 /** interface function, see AliHLTComponent for description */
82 const char* GetComponentID();
83 /** interface function, see AliHLTComponent for description */
84 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
85 /** interface function, see AliHLTComponent for description */
86 AliHLTComponentDataType GetOutputDataType();
87 /** interface function, see AliHLTComponent for description */
88 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
89 /** interface function, see AliHLTComponent for description */
90 AliHLTComponent* Spawn();
94 // Protected functions to implement AliHLTComponent's interface.
95 // These functions provide initialization as well as the actual processing capabilities of the component.
97 int DoInit( int argc, const char** argv );
99 int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
100 int Reconfigure(const char* cdbEntry, const char* chainId);
102 using AliHLTProcessor::DoEvent;
106 int Configure(const char* arguments);
108 /** copy constructor prohibited */
109 AliHLTGlobalHistoCollector(const AliHLTGlobalHistoCollector&);
111 /** assignment operator prohibited */
112 AliHLTGlobalHistoCollector& operator=(const AliHLTGlobalHistoCollector&);
114 void Clear(); // reset the store
116 AliHLTUInt32_t fUID;// uID of the component
118 std::vector<AliHLTHistoBaseData> fStore;
120 ClassDef(AliHLTGlobalHistoCollector, 0)