]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCNoiseMapComponent.h
added new helper components to libAliHLTUtil (EsdCollector and AliHLTOUTPublisher...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCNoiseMapComponent.h
1 // -*- Mode: C++ -*-
2 // $Id$
3
4 #ifndef ALIHLTTPCNOISEMAPCOMPONENT_H
5 #define ALIHLTTPCNOISEMAPCOMPONENT_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   AliHLTTPCNoiseMapComponent.h
12     @author Kalliopi Kanaki
13     @date   
14     @brief  Component for plotting TPC data and applying noise map
15 */
16
17 #include "AliHLTProcessor.h"
18
19 //forward declarations
20 class AliHLTTPCDigitReader;
21 class TH2;
22 class AliTPCCalPad;
23 /**
24  * @class AliHLTTPCNoiseMapComponent
25  * Implementation of the component to fill histograms with TPC noise and read
26  * the noise map from OCDB by request.
27  * The component implements the interface methods of the @ref AliHLTProcessor.
28  * It reads the data pad by pad and fills histograms. The output is unpacked and 
29  * sent to the clulsterfinder.
30  * 
31  * The component has the following component arguments:
32  * 
33  * The histograms are filled on partition level and no argument is foreseen for this.
34  * 
35  * -plot-side-a   Histograms the TPC side A
36  *          
37  * -plot-side-c   Histograms the TPC side C
38  *
39  * -apply-noisemap  Reads a noise map from a file and subtracts the value contained in every pad from the data
40  * The above option is going to be removed, it makes no sense to read the noise map as 
41  * many times as the partitions.
42  *
43  * -resetHistograms Resets histograms
44  * 
45  *
46  * @ingroup alihlt_tpc
47  */
48  
49 class AliHLTTPCNoiseMapComponent : public AliHLTProcessor {
50     
51    public:
52    
53    /** standard constructor */    
54    AliHLTTPCNoiseMapComponent();           
55    /** destructor */
56    virtual ~AliHLTTPCNoiseMapComponent();
57
58       // Public functions to implement AliHLTComponent's interface.
59       // These functions are required for the registration process
60       
61       /** interface function, see @ref AliHLTComponent for description */
62       const char* GetComponentID();                                                          
63       /** interface function, see @ref AliHLTComponent for description */
64       void GetInputDataTypes( vector<AliHLTComponentDataType>& list);                        
65       /** interface function, see @ref AliHLTComponent for description */
66       AliHLTComponentDataType GetOutputDataType();                                           
67       /** interface function, see @ref AliHLTComponent for description */
68       int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);                        
69       /** interface function, see @ref AliHLTComponent for description */
70       virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); 
71       /** interface function, see @ref AliHLTComponent for description */
72       AliHLTComponent* Spawn();                                                            
73       /** function for acting on the saving and cleaning histograms, after they are filled */
74       void MakeHistosPublic();
75   
76    protected:
77         
78       // Protected functions to implement AliHLTComponent's interface.
79       // These functions provide initialization as well as the actual processing capabilities of the component. 
80
81       int DoInit( int argc, const char** argv );
82       int DoDeinit();
83       int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
84       int Reconfigure(const char* cdbEntry, const char* chainId);
85
86       using AliHLTProcessor::DoEvent;
87
88    private:
89    
90       int Configure(const char* arguments);
91           
92       /** copy constructor prohibited */
93       AliHLTTPCNoiseMapComponent(const AliHLTTPCNoiseMapComponent&);
94
95       /** assignment operator prohibited */
96       AliHLTTPCNoiseMapComponent& operator=(const AliHLTTPCNoiseMapComponent&);
97
98       void ResetHistograms();
99
100       /** the reader object for data decoding */
101       AliHLTUInt32_t fSpecification;  //!transient
102       AliTPCCalPad *noisePad;         //!transient
103       //AliHLTTPCDigitReader *pDigitReader;
104
105       Bool_t fPlotSideA;      //!transient
106       Bool_t fPlotSideC;      //!transient
107       Bool_t fApplyNoiseMap;  //!transient
108       Bool_t fResetHistograms;//!transient
109       Bool_t fIsPacked;       //!transient   
110       Bool_t fIsUnpacked;     //!transient
111             
112       Int_t fCurrentSlice;     //!transient
113       Int_t fCurrentPartition; //!transient
114       Int_t fCurrentRow;       //!transient
115       
116       TH2 *fHistPartition;  //!transient 
117       TH2 *fHistSideA;      //!transient    
118       TH2 *fHistSideC;      //!transient  
119       TH2 *fHistCDBMap;     //!transient 
120             
121       ClassDef(AliHLTTPCNoiseMapComponent, 2)
122     };
123
124 #endif