Line data Source code
1 : // -*- Mode: C++ -*-
2 : // $Id$
3 :
4 : #ifndef ALIHLTTPCHISTOGRAMHANDLERCOMPONENT_H
5 : #define ALIHLTTPCHISTOGRAMHANDLERCOMPONENT_H
6 :
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 *
10 :
11 : /** @file AliHLTTPCHistogramHandlerComponent.h
12 : @author Kalliopi Kanaki, Kenneth Aamodt
13 : @date
14 : @brief Component for acting upon histograms
15 : */
16 :
17 : // see below for class documentation
18 : // or
19 : // refer to README to build package
20 : // or
21 : // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
22 :
23 : #include "AliHLTProcessor.h"
24 : #include <vector>
25 :
26 : class TH1;
27 : class TH2;
28 :
29 : /**
30 : * @class AliHLTTPCHistogramHandlerComponent
31 : * Implementation of the component to read histograms from other
32 : * components and add, divide etc.
33 : * The component implements the interface methods of the @ref AliHLTProcessor.
34 : *
35 : * The component has the following component arguments:
36 : *
37 : * -sum-noise-histograms Loops over the output of TPCNoiseMap and sums the partition histograms
38 : * They are sorted per TPC side.
39 : *
40 : * -sum-krypton-histograms Loops over the output of the krypton CF and sums the histograms
41 : * (it will become obsolete, when the next option does all the work)
42 : *
43 : * -use-general It will become the standard general option for summing histograms
44 : *
45 : * -ignore-specification It ignores the last part of the histogram name, if it has
46 : * the form "_Slice_%.2d%.2d_Partition_%.2d%.2d, minSlice, maxSlice, minPartition, maxPartition".
47 : * It keeps the first part of the hist name and uses it to name the summed histogram.
48 : *
49 : * @ingroup alihlt_tpc
50 : */
51 : class AliHLTTPCHistogramHandlerComponent : public AliHLTProcessor {
52 :
53 : public:
54 : struct AliHLTHistogramData
55 : {
56 : TH1 *fHistogram;
57 : UInt_t fMinSlice;
58 : UInt_t fMaxSlice;
59 : UInt_t fMinPartition;
60 : UInt_t fMaxPartition;
61 : };
62 : typedef struct AliHLTHistogramData AliHLTHistogramData; //!
63 :
64 : /** standard constructor */
65 : AliHLTTPCHistogramHandlerComponent();
66 : /** destructor */
67 : virtual ~AliHLTTPCHistogramHandlerComponent();
68 :
69 : // Public functions to implement AliHLTComponent's interface.
70 : // These functions are required for the registration process
71 :
72 : /** interface function, see AliHLTComponent for description */
73 : const char* GetComponentID();
74 : /** interface function, see AliHLTComponent for description */
75 : void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
76 : /** interface function, see AliHLTComponent for description */
77 : AliHLTComponentDataType GetOutputDataType();
78 : /** interface function, see AliHLTComponent for description */
79 : int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
80 : /** interface function, see AliHLTComponent for description */
81 : virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
82 : /** interface function, see AliHLTComponent for description */
83 : AliHLTComponent* Spawn();
84 : /** function for acting on the saving and cleaning histograms, after they are filled */
85 : void MakeHistosPublic();
86 :
87 : protected:
88 :
89 : // Protected functions to implement AliHLTComponent's interface.
90 : // These functions provide initialization as well as the actual processing capabilities of the component.
91 :
92 : int DoInit( int argc, const char** argv );
93 : int DoDeinit();
94 : int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
95 : int Reconfigure(const char* cdbEntry, const char* chainId);
96 :
97 : using AliHLTProcessor::DoEvent;
98 :
99 : private:
100 :
101 : int Configure(const char* arguments);
102 :
103 : /** copy constructor prohibited */
104 : AliHLTTPCHistogramHandlerComponent(const AliHLTTPCHistogramHandlerComponent&);
105 :
106 : /** assignment operator prohibited */
107 : AliHLTTPCHistogramHandlerComponent& operator=(const AliHLTTPCHistogramHandlerComponent&);
108 :
109 : /** the reader object for data decoding */
110 : AliHLTUInt32_t fSpecification; //!transient
111 :
112 : Bool_t fNoiseHistograms; //!transient
113 : Bool_t fKryptonHistograms; //!transient
114 : Bool_t fUseGeneral; //!transient
115 : Bool_t fIgnoreSpecification; //!transient
116 :
117 : Int_t fSlice; //!transient
118 :
119 : TH1 *fHistTH1Tmp; //!transient
120 : TH1 *fTotalClusterChargeIROCAll; //!transient
121 : TH1 *fTotalClusterChargeOROCAll; //!transient
122 : TH1 *fQMaxPartitionAll; //!transient
123 : TH1 *fPlotQmaxROCAll; //!transient
124 : TH1 *fNumberOfClusters; //!transient
125 :
126 : TH2 *fHistTH2Tmp; //!transient
127 : TH2 *fHistTPCSideAmax; //!transient
128 : TH2 *fHistTPCSideCmax; //!transient
129 : TH2 *fHistTPCSideAtot; //!transient
130 : TH2 *fHistTPCSideCtot; //!transient
131 : TH2 *fHistTPCSideArms; //!transient
132 : TH2 *fHistTPCSideCrms; //!transient
133 :
134 : vector<AliHLTHistogramData> fHistogramData;
135 :
136 :
137 6 : ClassDef(AliHLTTPCHistogramHandlerComponent, 0)
138 : };
139 :
140 : #endif
|