- adjusting binning of pad histograms to make single pad cluster contribution and...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCHistogramHandlerComponent.h
CommitLineData
cdfe3c01 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 *
3789100d 8 //* ALICE Experiment at CERN, All rights reserved. *
9 //* See cxx source for full Copyright notice *
cdfe3c01 10
3789100d 11 /** @file AliHLTTPCHistogramHandlerComponent.h
3f0fd8f1 12 @author Kalliopi Kanaki, Kenneth Aamodt
3789100d 13 @date
14 @brief Component for acting upon histograms
15 */
cdfe3c01 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"
3789100d 24#include <vector>
cdfe3c01 25
26class TH1;
27class 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 *
3f0fd8f1 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.
cdfe3c01 48 *
cdfe3c01 49 * @ingroup alihlt_tpc
50 */
51class AliHLTTPCHistogramHandlerComponent : public AliHLTProcessor {
52
3789100d 53public:
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
cdfe3c01 71
9783a5cf 72 /** interface function, see AliHLTComponent for description */
3789100d 73 const char* GetComponentID();
9783a5cf 74 /** interface function, see AliHLTComponent for description */
3789100d 75 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
9783a5cf 76 /** interface function, see AliHLTComponent for description */
3789100d 77 AliHLTComponentDataType GetOutputDataType();
9783a5cf 78 /** interface function, see AliHLTComponent for description */
3789100d 79 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
9783a5cf 80 /** interface function, see AliHLTComponent for description */
3789100d 81 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
9783a5cf 82 /** interface function, see AliHLTComponent for description */
3789100d 83 AliHLTComponent* Spawn();
84 /** function for acting on the saving and cleaning histograms, after they are filled */
85 void MakeHistosPublic();
86
87protected:
cdfe3c01 88
3789100d 89 // Protected functions to implement AliHLTComponent's interface.
90 // These functions provide initialization as well as the actual processing capabilities of the component.
cdfe3c01 91
3789100d 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);
cdfe3c01 96
3789100d 97 using AliHLTProcessor::DoEvent;
cdfe3c01 98
3789100d 99private:
cdfe3c01 100
3789100d 101 int Configure(const char* arguments);
cdfe3c01 102
3789100d 103 /** copy constructor prohibited */
104 AliHLTTPCHistogramHandlerComponent(const AliHLTTPCHistogramHandlerComponent&);
cdfe3c01 105
3789100d 106 /** assignment operator prohibited */
107 AliHLTTPCHistogramHandlerComponent& operator=(const AliHLTTPCHistogramHandlerComponent&);
cdfe3c01 108
3789100d 109 /** the reader object for data decoding */
110 AliHLTUInt32_t fSpecification; //!transient
3f0fd8f1 111
112 Bool_t fNoiseHistograms; //!transient
113 Bool_t fKryptonHistograms; //!transient
114 Bool_t fUseGeneral; //!transient
115 Bool_t fIgnoreSpecification; //!transient
cdfe3c01 116
3789100d 117 Int_t fSlice; //!transient
cdfe3c01 118
3789100d 119 TH1 *fHistTH1Tmp; //!transient
120 TH1 *fTotalClusterChargeIROCAll; //!transient
121 TH1 *fTotalClusterChargeOROCAll; //!transient
122 TH1 *fQMaxPartitionAll; //!transient
123 TH1 *fPlotQmaxROCAll; //!transient
124 TH1 *fNumberOfClusters; //!transient
cdfe3c01 125
3f0fd8f1 126 TH2 *fHistTH2Tmp; //!transient
127 TH2 *fHistTPCSideAmax; //!transient
3789100d 128 TH2 *fHistTPCSideCmax; //!transient
3f0fd8f1 129 TH2 *fHistTPCSideAtot; //!transient
3789100d 130 TH2 *fHistTPCSideCtot; //!transient
3f0fd8f1 131 TH2 *fHistTPCSideArms; //!transient
3789100d 132 TH2 *fHistTPCSideCrms; //!transient
133
134 vector<AliHLTHistogramData> fHistogramData;
fec96a66 135
3789100d 136
22240104 137 ClassDef(AliHLTTPCHistogramHandlerComponent, 0)
3789100d 138};
cdfe3c01 139
140#endif