]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSBaselineAnalyzerComponent.h
Updated DA for mapping - MON
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSBaselineAnalyzerComponent.h
1 /**************************************************************************
2  * This file is property of and copyright by the ALICE HLT Project        * 
3  * All rights reserved.                                                   *
4  *                                                                        *
5  * Primary Authors: Oystein Djuvsland                                                      *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          * 
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 #ifndef ALIHLTPHOSBASELINEANALYZERCOMPONENT_H
16 #define ALIHLTPHOSBASELINEANALYZERCOMPONENT_H
17
18
19 /** 
20  * Class does baseline analysis
21  * 
22  * @file   AliHLTPHOSBaselineAnalyzerComponent.h
23  * @author Oystein Djuvsland
24  * @date   
25  * @brief  A baseline analyzer for PHOS HLT
26 */
27
28 // see below for class documentation
29 // or
30 // refer to README to build package
31 // or
32 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
33
34 #include "AliHLTPHOSProcessor.h"
35
36 class AliHLTPHOSBaselineAnalyzer;
37 class TTree;
38
39
40 /**
41  * @class AliHLTPHOSBaselineAnalyzerComponent
42  * 
43  * Class for running baseline analysis for PHOS in HLT. Takes raw data as input and creates 
44  * objects of class AliHLTPHOSBaseline. Also it fills histograms of baselines as well as RMS
45  * of the channels
46  */ 
47
48 class AliHLTPHOSBaselineAnalyzerComponent : public AliHLTPHOSProcessor
49 {
50 public:
51
52   /** Constructor */ 
53   AliHLTPHOSBaselineAnalyzerComponent();
54
55   /** Destructor */ 
56   virtual ~AliHLTPHOSBaselineAnalyzerComponent();
57
58   /** Copy constructor */
59   AliHLTPHOSBaselineAnalyzerComponent(const AliHLTPHOSBaselineAnalyzerComponent &) : 
60     AliHLTPHOSProcessor(),
61     fBaselineAnalyzerPtr(0),
62     fTreePtr(0),
63     fBaselineArrayPtr(0),
64     fEvCnt(0),
65     fWriteInterval(100),
66     fFillInterval(100),
67     fFilename(0),
68     fDirectory(0),
69     fHistPath(0),
70     fRunNb(0),
71     fCalculateAll(false)
72   {
73     //Copy constructor not implemented
74   }
75   
76   /** Assignment */
77   AliHLTPHOSBaselineAnalyzerComponent & operator = (const AliHLTPHOSBaselineAnalyzerComponent)
78     {
79       //Assignment
80       return *this; 
81     }
82   
83   /** interface function, see @ref AliHLTComponent for description */
84   const char* GetComponentID();
85
86   /** interface function, see @ref AliHLTComponent for description */
87   void GetInputDataTypes(std::vector<AliHLTComponentDataType>& list);
88
89   /** interface function, see @ref AliHLTComponent for description */
90   AliHLTComponentDataType GetOutputDataType();
91
92   /** interface function, see @ref AliHLTComponent for description */
93   void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
94
95   /** interface function, see @ref AliHLTComponent for description */
96   int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
97               AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
98               std::vector<AliHLTComponentBlockData>& outputBlocks);
99   
100   /** interface function, see @ref AliHLTComponent for description */
101   AliHLTComponent* Spawn();
102   
103 protected:
104
105   /** interface function, see @ref AliHLTComponent for description */
106   using AliHLTPHOSProcessor::DoEvent;
107
108   int DoInit(int argc, const char** argv);
109
110   /** interface function, see @ref AliHLTComponent for description */
111   virtual int Deinit(); ////////// PTH WARNING you should Define a class AliHLTPHOSModuleProcessor
112   
113 private:
114   
115   /** Calculate all values baselines, RMS etc. */
116   void CalculateAll();
117
118   /** Pointer to a baseline analyzer */ 
119   AliHLTPHOSBaselineAnalyzer *fBaselineAnalyzerPtr; //! transient
120
121   /** Pointer the a tree containing the TClonesArrays of AliHLTPHOSBaseline objects */ 
122   TTree *fTreePtr;                                  //! transient
123
124   /** TClonesArray of AliHLTPHOSBaseline objects */ 
125   TClonesArray *fBaselineArrayPtr;                  //! transient
126
127   /** Event count */
128   UInt_t fEvCnt;                                    //COMMENT
129
130   /** Number of events between each writing of files */
131   UInt_t fWriteInterval;                            //COMMENT
132
133   /** Number of events between each filling of the tree */ 
134   UInt_t fFillInterval;                             //COMMENT
135
136   /** The filename base */
137   char *fFilename;                                  //! transient
138
139   /** The directory to write the files */
140   char* fDirectory;                                 //! transient
141
142   /** The path for the histograms */
143   char* fHistPath;                                  //! transient
144
145   /** The run number */
146   Int_t fRunNb;                                     //COMMENT
147
148   /** If every value should be calculated, not only RMS */ 
149   Bool_t fCalculateAll;                             //COMMMENT
150
151   /** Interface variable */
152   static const AliHLTComponentDataType fgkInputDataTypes[];     //COMMENT
153
154 };
155 #endif