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