]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliGRPPreprocessor.h
Added some extra CF plots and changed binning for a few histograms (kathrin) anddded...
[u/mrichter/AliRoot.git] / STEER / AliGRPPreprocessor.h
1 #ifndef ALIGRPPREPROCESSOR_H
2 #define ALIGRPPREPROCESSOR_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //-------------------------------------------------------------------------
7 //                          Class AliGRPPreprocessor
8 //                  Global Run Parameters (GRP) preprocessor
9 //
10 //    Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
11 //    Modified: Ernesto.Lopez.Torres@cern.ch  CEADEN-CERN
12 //-------------------------------------------------------------------------
13
14
15
16 //////////////////////////////////////////////////////////////////////////
17 //                                                                      //
18 //                        AliGRPPreprocessor                            //
19 //                                                                      //
20 //           Implementation of the GRP preprocessor                     //
21 //                                                                      //
22 //////////////////////////////////////////////////////////////////////////
23
24 #include "AliPreprocessor.h"
25
26 class TList;
27 class TString;
28 class TObjArray;
29 class AliDCSSensorArray;
30 class AliGRPObject;
31 class AliSplineFit;
32
33 class AliGRPPreprocessor: public AliPreprocessor {
34  public:
35
36         enum DP {kL3Polarity = 0, kDipolePolarity,  
37                  kL3Current, kDipoleCurrent, 
38                  kL3bsf17H1, kL3bsf17H2, kL3bsf17H3, kL3bsf17Temperature, 
39                  kL3bsf4H1, kL3bsf4H2, kL3bsf4H3, kL3bsf4Temperature, 
40                  kL3bkf17H1, kL3bkf17H2, kL3bkf17H3, kL3bkf17Temperature, 
41                  kL3bkf4H1, kL3bkf4H2, kL3bkf4H3, kL3bkf4Temperature, 
42                  kL3bsf13H1, kL3bsf13H2, kL3bsf13H3, kL3bsf13Temperature,
43                  kL3bsf8H1, kL3bsf8H2, kL3bsf8H3, kL3bsf8Temperature,
44                  kL3bkf13H1, kL3bkf13H2, kL3bkf13H3, kL3bkf13Temperature,
45                  kL3bkf8H1, kL3bkf8H2, kL3bkf8H3, kL3bkf8Temperature,
46                  kDipoleInsideH1, kDipoleInsideH2, kDipoleInsideH3, kDipoleInsideTemperature,
47                  kDipoleOutsideH1, kDipoleOutsideH2, kDipoleOutsideH3, kDipoleOutsideTemperature,
48                  kCavernTemperature, kCavernAtmosPressure, kSurfaceAtmosPressure, 
49                  kCavernAtmosPressure2};
50
51         enum DPHallProbes { 
52                  khpL3bsf17H1= 0 , khpL3bsf17H2, khpL3bsf17H3, khpL3bsf17Temperature, 
53                  khpL3bsf4H1, khpL3bsf4H2, khpL3bsf4H3, khpL3bsf4Temperature, 
54                  khpL3bkf17H1, khpL3bkf17H2, khpL3bkf17H3, khpL3bkf17Temperature, 
55                  khpL3bkf4H1, khpL3bkf4H2, khpL3bkf4H3, khpL3bkf4Temperature, 
56                  khpL3bsf13H1, khpL3bsf13H2, khpL3bsf13H3, khpL3bsf13Temperature,
57                  khpL3bsf8H1, khpL3bsf8H2, khpL3bsf8H3, khpL3bsf8Temperature,
58                  khpL3bkf13H1, khpL3bkf13H2, khpL3bkf13H3, khpL3bkf13Temperature,
59                  khpL3bkf8H1, khpL3bkf8H2, khpL3bkf8H3, khpL3bkf8Temperature,
60                  khpDipoleInsideH1, khpDipoleInsideH2, khpDipoleInsideH3, khpDipoleInsideTemperature,
61                  khpDipoleOutsideH1, khpDipoleOutsideH2, khpDipoleOutsideH3, khpDipoleOutsideTemperature};
62
63                       AliGRPPreprocessor(AliShuttleInterface* shuttle);
64   virtual            ~AliGRPPreprocessor();
65   
66   static      Int_t   ReceivePromptRecoParameters(
67                                   UInt_t run,
68                                   const char* dbHost,
69                                   Int_t dbPort,
70                                   const char* dbName,
71                                   const char* user,
72                                   const char* password,
73                                   const char *cdbRoot,
74                                   TString &gdc
75                                  );
76
77  protected:
78
79   virtual      void   Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
80   
81   virtual     UInt_t   Process(TMap* valueSet);
82
83                Int_t   ProcessDaqLB(AliGRPObject* grpobj);
84               UInt_t   ProcessDaqFxs();
85               UInt_t   ProcessSPDMeanVertex();
86               UInt_t   ProcessLHCData(AliGRPObject* grpobj);
87               UInt_t   ProcessDcsFxs(TString partition="", TString detector="");
88                Int_t   ProcessDcsDPs(TMap* valueSet, AliGRPObject* grpobj);
89                Int_t   ProcessL3DPs(const TMap* valueSet, AliGRPObject* grpobj);
90                Int_t   ProcessDipoleDPs(const TMap* valueSet, AliGRPObject* grpobj);
91                Int_t   ProcessEnvDPs(TMap* valueSet, AliGRPObject* grpobj);
92                Int_t   ProcessHPDPs(const TMap* valueSet, AliGRPObject* grpobj);
93                //               Int_t   ProcessDcsDPs(TMap* valueSet, TMap* grpmap);
94    AliDCSSensorArray*  GetPressureMap(TMap *dcsAliasMap);
95    AliSplineFit* GetSplineFit(const TObjArray *array, const TString& stringID);
96    //AliSplineFit* GetSplineFit(TMap* mapDCS, const TString& stringID);
97    TString ProcessChar(const TObjArray *array);
98    Char_t ProcessBool(const TObjArray *array, Bool_t &change);
99    Float_t ProcessInt(const TObjArray *array);
100    Float_t ProcessUInt(const TObjArray *array);
101    Float_t* ProcessFloatAll(const TObjArray* array);
102    Float_t* ProcessFloatAllMagnet(const TObjArray* array, Int_t indexDP, Bool_t &isZero);
103    Bool_t GetDAQStartEndTimeOk() const {return fdaqStartEndTimeOk;}
104    void SetDAQStartEndTimeOk(Bool_t daqStartEndTimeOk) {fdaqStartEndTimeOk = daqStartEndTimeOk;}
105
106    Double_t CalculateMean(TObjArray* lhcObjArray);
107    Float_t ProcessEnergy(TObjArray* array, Double_t timeStart, Double_t timeEnd);
108
109  private:
110  
111   static const Int_t   fgknDAQLbPar;            //! number of DAQ lb parameters for PHYSICS runs
112   static const Int_t   fgknDAQLbParReduced;     //! number of DAQ lb parameters for non PHYSICS runs
113   static const Int_t   fgknDCSDP;               //! number of dcs dps
114   static const char*   fgkDCSDataPoints[];      //! names of dcs dps
115   static const char*   fgkDCSDataPointsHallProbes[];      //! names of dcs dps for Hall Probes
116   static const Int_t   fgknDCSDPHallProbes;           //! names of LHC States for Hall Probes
117
118   AliDCSSensorArray*   fPressure; //pressure array
119
120   AliGRPPreprocessor(const AliGRPPreprocessor&); // Not implemented
121   AliGRPPreprocessor& operator=(const AliGRPPreprocessor&); // Not implemented
122
123   Float_t fmaxFloat; // maximum float accepted
124   Float_t fminFloat; // minimum float accepted
125   Double_t fmaxDouble; // maximum double accepted
126   Double_t fminDouble; // minimum double accepted
127   Int_t fmaxInt; // maximum int accepted
128   Int_t fminInt; // minimum int accepted
129   UInt_t fmaxUInt; // maximum uint accepted
130   UInt_t fminUInt; // minimum uint accepted
131   Bool_t fdaqStartEndTimeOk; // flag to set whether the DAQ_time_start/end fields are set
132
133   TObjArray* ffailedDPs; //TObjArray of failed DPs names
134
135   static const Int_t   fgknLHCDP;               //! number of lhc dps
136   static const char*   fgkLHCDataPoints[];      //! names of lhc dps
137
138   ClassDef(AliGRPPreprocessor, 0);
139 };
140
141 #endif