]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCNoiseMapComponent.h
correcting memory leaks on error conditions
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCNoiseMapComponent.h
CommitLineData
6d17f6d5 1// -*- Mode: C++ -*-
2// $Id$
3
c12197a2 4#ifndef ALIHLTTPCNOISEMAPCOMPONENT_H
5#define ALIHLTTPCNOISEMAPCOMPONENT_H
6
6d17f6d5 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 *
c12197a2 10
11/** @file AliHLTTPCNoiseMapComponent.h
12 @author Kalliopi Kanaki
13 @date
21f63108 14 @brief Component for plotting TPC data and applying noise map
c12197a2 15*/
16
c12197a2 17#include "AliHLTProcessor.h"
c12197a2 18
6d17f6d5 19//forward declarations
c12197a2 20class AliHLTTPCDigitReader;
3a3550fa 21class TH1;
6d17f6d5 22class TH2;
21f63108 23class AliTPCCalPad;
3a3550fa 24
c12197a2 25/**
26 * @class AliHLTTPCNoiseMapComponent
3a3550fa 27 *
b69ccd54 28 * Implementation of a component to fill histograms with TPC raw output
29 * and read the noise map from HCDB by request.
3a3550fa 30 *
c12197a2 31 * The component implements the interface methods of the @ref AliHLTProcessor.
b69ccd54 32 * It reads the raw data pad by pad and fills histograms per partition
c12197a2 33 *
34 * The component has the following component arguments:
b69ccd54 35 * <h2>General properties:</h2>
36 *
37 * Component ID: \b TPCNoiseMap <br>
38 * Library: \b libAliHLTTPC.so <br>
39 * Input Data Types: @ref kAliHLTDataTypeDDLRaw <br>
40 * Output Data Types: @ref kAliHLTDataTypeHistogram <br>
41 *
42 * <h2>Mandatory arguments:</h2>
43 *
44 * <h2>Optional arguments:</h2>
45 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
46 * \li -read-noisemap <i> teststring </i> <br>
47 * Reads the noise map from the HCDB (and plots it in a histogram)
48 *
49 * \li -reset-histograms <br>
50 * Resets histograms
21f63108 51 *
b69ccd54 52 * <h2>Configuration:</h2>
53 * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
54 * \li -config1 <i> teststring </i> <br>
55 * a configuration argument with one parameter
56 * \li -config2 <br>
57 * a configuration argument without parameters
3a3550fa 58 *
b69ccd54 59 * <h2>Default CDB entries:</h2>
60 * The component has two CDB entries in
61 * <tt>HLT/ConfigTPC/TPCNoiseMapComponent</tt>.
62 * It does not load any configuration from the global <tt>ConfigHLT</tt>
63 * folder.
64 * \li -TObjString object holding a string with the configuration parameters
65 * explained above
3a3550fa 66 *
b69ccd54 67 * <h2>Performance:</h2>
68 * No clue
c12197a2 69 *
b69ccd54 70 * <h2>Memory consumption:</h2>
71 * No clue
72 *
73 * <h2>Output size:</h2>
74 * Much data
75 *
76 * More detailed description.
77 *
78 * @ingroup alihlt_tpc_components
79 */
80
c12197a2 81class AliHLTTPCNoiseMapComponent : public AliHLTProcessor {
82
83 public:
6d17f6d5 84
85 /** standard constructor */
86 AliHLTTPCNoiseMapComponent();
87 /** destructor */
88 virtual ~AliHLTTPCNoiseMapComponent();
c12197a2 89
c12197a2 90 // Public functions to implement AliHLTComponent's interface.
91 // These functions are required for the registration process
92
9783a5cf 93 /** interface function, see AliHLTComponent for description */
6d17f6d5 94 const char* GetComponentID();
9783a5cf 95 /** interface function, see AliHLTComponent for description */
6d17f6d5 96 void GetInputDataTypes( vector<AliHLTComponentDataType>& list);
9783a5cf 97 /** interface function, see AliHLTComponent for description */
6d17f6d5 98 AliHLTComponentDataType GetOutputDataType();
9783a5cf 99 /** interface function, see AliHLTComponent for description */
6d17f6d5 100 int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);
9783a5cf 101 /** interface function, see AliHLTComponent for description */
6d17f6d5 102 virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier );
9783a5cf 103 /** interface function, see AliHLTComponent for description */
6d17f6d5 104 AliHLTComponent* Spawn();
105 /** function for acting on the saving and cleaning histograms, after they are filled */
deeb9f12 106 void MakeHistosPublic();
c12197a2 107
108 protected:
109
110 // Protected functions to implement AliHLTComponent's interface.
111 // These functions provide initialization as well as the actual processing capabilities of the component.
112
113 int DoInit( int argc, const char** argv );
114 int DoDeinit();
deeb9f12 115 int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
c12197a2 116 int Reconfigure(const char* cdbEntry, const char* chainId);
117
118 using AliHLTProcessor::DoEvent;
119
120 private:
121
122 int Configure(const char* arguments);
6d17f6d5 123
c12197a2 124 /** copy constructor prohibited */
125 AliHLTTPCNoiseMapComponent(const AliHLTTPCNoiseMapComponent&);
126
127 /** assignment operator prohibited */
128 AliHLTTPCNoiseMapComponent& operator=(const AliHLTTPCNoiseMapComponent&);
3f0fd8f1 129
130 void InitializeHistograms(UInt_t minSlice, UInt_t maxSlice, UInt_t minPartition, UInt_t maxPartition);
21f63108 131 void ResetHistograms();
3a3550fa 132
6d17f6d5 133 AliHLTUInt32_t fSpecification; //!transient
6d17f6d5 134
3f0fd8f1 135 Bool_t fReadNoiseMap; //!transient
136 Bool_t fResetHistograms; //!transient
137 Bool_t fInitHist; //!transient
138
139 Int_t fCurrentRow; //!transient
deeb9f12 140
3a3550fa 141 TH1 *fHistSignal; //!transient
3f0fd8f1 142
143 TH2 *fHistSideAMaxSignal; //!transient
144 TH2 *fHistSideATotSignal; //!transient
145 TH2 *fHistSideAPadRMS; //!transient
146
147 TH2 *fHistSideCMaxSignal; //!transient
148 TH2 *fHistSideCTotSignal; //!transient
149 TH2 *fHistSideCPadRMS; //!transient
150
3a3550fa 151 TH2 *fHistCDBMap; //!transient
3a3550fa 152
22240104 153 ClassDef(AliHLTTPCNoiseMapComponent, 0) // HLT component for reading the TPC noise map from HCDB.
c12197a2 154 };
155
156#endif