]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCNoiseMapComponent.h
code documantation and minor cleanup
[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 Noise Map
15 */
16
17 #include "AliHLTProcessor.h"
18
19 //forward declarations
20 class AliHLTTPCDigitReader;
21 class TH2;
22
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  * - apply-noise-map  Read the noise map from OCDB and apply it on the online data
33  *
34  * -plot-side-a   Histograms the TPC side A
35  *          
36  * -plot-side-c   Histograms the TPC side C
37  *
38  * -apply-noisemap  Reads a noise map from a file and subtracts the value contained in every pad from the data
39  *
40  * @ingroup alihlt_tpc
41  */
42 class AliHLTTPCNoiseMapComponent : public AliHLTProcessor {
43     
44    public:
45    
46    /** standard constructor */    
47    AliHLTTPCNoiseMapComponent();           
48    /** destructor */
49    virtual ~AliHLTTPCNoiseMapComponent();
50
51       // Public functions to implement AliHLTComponent's interface.
52       // These functions are required for the registration process
53       
54       /** interface function, see @ref AliHLTComponent for description */
55       const char* GetComponentID();                                                          
56       /** interface function, see @ref AliHLTComponent for description */
57       void GetInputDataTypes( vector<AliHLTComponentDataType>& list);                        
58       /** interface function, see @ref AliHLTComponent for description */
59       AliHLTComponentDataType GetOutputDataType();                                           
60       /** interface function, see @ref AliHLTComponent for description */
61       int GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList);                        
62       /** interface function, see @ref AliHLTComponent for description */
63       virtual void GetOutputDataSize( unsigned long& constBase, double& inputMultiplier ); 
64       /** interface function, see @ref AliHLTComponent for description */
65       AliHLTComponent* Spawn();                                                            
66       /** function for acting on the saving and cleaning histograms, after they are filled */
67       void MakeHistosPublic();
68   
69    protected:
70         
71       // Protected functions to implement AliHLTComponent's interface.
72       // These functions provide initialization as well as the actual processing capabilities of the component. 
73
74       int DoInit( int argc, const char** argv );
75       int DoDeinit();
76 //       int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
77 //                 AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
78 //                 AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
79       int DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData );
80       int Reconfigure(const char* cdbEntry, const char* chainId);
81
82       using AliHLTProcessor::DoEvent;
83
84    private:
85    
86       int Configure(const char* arguments);
87           
88       /** copy constructor prohibited */
89       AliHLTTPCNoiseMapComponent(const AliHLTTPCNoiseMapComponent&);
90
91       /** assignment operator prohibited */
92       AliHLTTPCNoiseMapComponent& operator=(const AliHLTTPCNoiseMapComponent&);
93
94       /** the reader object for data decoding */
95       AliHLTUInt32_t fSpecification;  //!transient
96       //AliHLTUInt8_t fMinPartition;    //!transient
97       //AliHLTUInt8_t fMaxPartition;    //!transient
98       
99       //AliHLTTPCDigitReader *pDigitReader;
100
101       Bool_t fPlotSideA;      //!transient
102       Bool_t fPlotSideC;      //!transient
103       Bool_t fApplyNoiseMap;  //!transient
104       Bool_t fIsPacked;       //!transient   
105       Bool_t fIsUnpacked;     //!transient
106       
107       Int_t fSlice;  //!transient
108       
109       Int_t  fCurrentPartition; //!transient
110       Int_t  fCurrentRow;       //!transient
111       
112       TH2 *fHistSideA;     //!transient    
113       TH2 *fHistSideC;     //!transient  
114       TH2 *fHistCDBMap;    //!transient 
115             
116       ClassDef(AliHLTTPCNoiseMapComponent, 1)
117     };
118
119 #endif