]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/STEER/AliGRPPreprocessor.h
Fixing various dependecies
[u/mrichter/AliRoot.git] / STEER / STEER / AliGRPPreprocessor.h
CommitLineData
3dedb44a 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
e7a6790f 11// Modified: Ernesto.Lopez.Torres@cern.ch CEADEN-CERN
3dedb44a 12//-------------------------------------------------------------------------
13
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// AliGRPPreprocessor //
19// //
20// Implementation of the GRP preprocessor //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "AliPreprocessor.h"
25
17984b61 26class TList;
27class TString;
c5340e82 28class TObjArray;
17984b61 29class AliDCSSensorArray;
44e45fac 30class AliGRPObject;
31class AliSplineFit;
8c1f1006 32class AliLHCClockPhase;
17984b61 33
3dedb44a 34class AliGRPPreprocessor: public AliPreprocessor {
35 public:
44e45fac 36
0254e751 37 enum DP {kL3Polarity = 0, kDipolePolarity,
44e45fac 38 kL3Current, kDipoleCurrent,
39e3007b 39 kL3bsf17H1, kL3bsf17H2, kL3bsf17H3, kL3bsf17Temperature,
40 kL3bsf4H1, kL3bsf4H2, kL3bsf4H3, kL3bsf4Temperature,
41 kL3bkf17H1, kL3bkf17H2, kL3bkf17H3, kL3bkf17Temperature,
42 kL3bkf4H1, kL3bkf4H2, kL3bkf4H3, kL3bkf4Temperature,
43 kL3bsf13H1, kL3bsf13H2, kL3bsf13H3, kL3bsf13Temperature,
44 kL3bsf8H1, kL3bsf8H2, kL3bsf8H3, kL3bsf8Temperature,
45 kL3bkf13H1, kL3bkf13H2, kL3bkf13H3, kL3bkf13Temperature,
46 kL3bkf8H1, kL3bkf8H2, kL3bkf8H3, kL3bkf8Temperature,
47 kDipoleInsideH1, kDipoleInsideH2, kDipoleInsideH3, kDipoleInsideTemperature,
48 kDipoleOutsideH1, kDipoleOutsideH2, kDipoleOutsideH3, kDipoleOutsideTemperature,
ce996d13 49 kCavernTemperature, kCavernAtmosPressure, kSurfaceAtmosPressure,
50 kCavernAtmosPressure2};
44e45fac 51
39e3007b 52 enum DPHallProbes {
4bb7c769 53 khpL3bsf17H1=0, khpL3bsf17H2, khpL3bsf17H3, khpL3bsf17Temperature,
39e3007b 54 khpL3bsf4H1, khpL3bsf4H2, khpL3bsf4H3, khpL3bsf4Temperature,
55 khpL3bkf17H1, khpL3bkf17H2, khpL3bkf17H3, khpL3bkf17Temperature,
56 khpL3bkf4H1, khpL3bkf4H2, khpL3bkf4H3, khpL3bkf4Temperature,
57 khpL3bsf13H1, khpL3bsf13H2, khpL3bsf13H3, khpL3bsf13Temperature,
58 khpL3bsf8H1, khpL3bsf8H2, khpL3bsf8H3, khpL3bsf8Temperature,
59 khpL3bkf13H1, khpL3bkf13H2, khpL3bkf13H3, khpL3bkf13Temperature,
60 khpL3bkf8H1, khpL3bkf8H2, khpL3bkf8H3, khpL3bkf8Temperature,
61 khpDipoleInsideH1, khpDipoleInsideH2, khpDipoleInsideH3, khpDipoleInsideTemperature,
62 khpDipoleOutsideH1, khpDipoleOutsideH2, khpDipoleOutsideH3, khpDipoleOutsideTemperature};
44e45fac 63
e7a6790f 64 AliGRPPreprocessor(AliShuttleInterface* shuttle);
65 virtual ~AliGRPPreprocessor();
3dedb44a 66
e7a6790f 67 static Int_t ReceivePromptRecoParameters(
68 UInt_t run,
69 const char* dbHost,
70 Int_t dbPort,
71 const char* dbName,
72 const char* user,
73 const char* password,
03e5ee4f 74 const char *cdbRoot,
75 TString &gdc
e7a6790f 76 );
bd89e52d 77 static THashList* ProcessAliases(const char* aliasesFile);
1e27bb6b 78
3dedb44a 79 protected:
80
e7a6790f 81 virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime);
3dedb44a 82
e7a6790f 83 virtual UInt_t Process(TMap* valueSet);
17984b61 84
e75e6e01 85 Int_t ProcessDaqLB(AliGRPObject* grpobj);
e7a6790f 86 UInt_t ProcessDaqFxs();
efec19bd 87 UInt_t ProcessDqmFxs();
6a150f83 88 UInt_t ProcessSPDMeanVertex();
0254e751 89 UInt_t ProcessLHCData(AliGRPObject* grpobj);
e75e6e01 90 UInt_t ProcessDcsFxs(TString partition="", TString detector="");
44e45fac 91 Int_t ProcessDcsDPs(TMap* valueSet, AliGRPObject* grpobj);
39e3007b 92 Int_t ProcessL3DPs(const TMap* valueSet, AliGRPObject* grpobj);
93 Int_t ProcessDipoleDPs(const TMap* valueSet, AliGRPObject* grpobj);
44e45fac 94 Int_t ProcessEnvDPs(TMap* valueSet, AliGRPObject* grpobj);
39e3007b 95 Int_t ProcessHPDPs(const TMap* valueSet, AliGRPObject* grpobj);
44e45fac 96 // Int_t ProcessDcsDPs(TMap* valueSet, TMap* grpmap);
3ba92a38 97 AliDCSSensorArray* GetPressureMap(TMap *dcsAliasMap);
39e3007b 98 AliSplineFit* GetSplineFit(const TObjArray *array, const TString& stringID);
44e45fac 99 //AliSplineFit* GetSplineFit(TMap* mapDCS, const TString& stringID);
39e3007b 100 TString ProcessChar(const TObjArray *array);
fe726709 101 Char_t ProcessBool(const TObjArray *array, Bool_t &change);
39e3007b 102 Float_t ProcessInt(const TObjArray *array);
103 Float_t ProcessUInt(const TObjArray *array);
104 Float_t* ProcessFloatAll(const TObjArray* array);
fe726709 105 Float_t* ProcessFloatAllMagnet(const TObjArray* array, Int_t indexDP, Bool_t &isZero);
5fbf7677 106 Bool_t GetDAQStartEndTimeOk() const {return fdaqStartEndTimeOk;}
107 void SetDAQStartEndTimeOk(Bool_t daqStartEndTimeOk) {fdaqStartEndTimeOk = daqStartEndTimeOk;}
44e45fac 108
f66d3f72 109 Float_t ProcessEnergy(TObjArray* array, Double_t timeStart);
8c1f1006 110 AliLHCClockPhase* ProcessLHCClockPhase(TObjArray *beam1phase,TObjArray *beam2phase,
17fd2848 111 Double_t timeEnd);
81a1addb 112 TString ParseBeamTypeString(TString beamType, Int_t iBeamType);
f880d5b9 113 Bool_t CheckFileRecords (const char* fileName) const;
81a1addb 114
17984b61 115 private:
e7a6790f 116
e75e6e01 117 static const Int_t fgknDAQLbPar; //! number of DAQ lb parameters for PHYSICS runs
e7a6790f 118 static const Int_t fgknDCSDP; //! number of dcs dps
119 static const char* fgkDCSDataPoints[]; //! names of dcs dps
39e3007b 120 static const char* fgkDCSDataPointsHallProbes[]; //! names of dcs dps for Hall Probes
4bb7c769 121 static const Int_t fgknDCSDPHallProbes; //! number of Hall Probes
982f17c2 122
e7a6790f 123 AliDCSSensorArray* fPressure; //pressure array
17984b61 124
fe726709 125 AliGRPPreprocessor(const AliGRPPreprocessor&); // Not implemented
126 AliGRPPreprocessor& operator=(const AliGRPPreprocessor&); // Not implemented
127
128 Float_t fmaxFloat; // maximum float accepted
129 Float_t fminFloat; // minimum float accepted
130 Double_t fmaxDouble; // maximum double accepted
131 Double_t fminDouble; // minimum double accepted
132 Int_t fmaxInt; // maximum int accepted
133 Int_t fminInt; // minimum int accepted
134 UInt_t fmaxUInt; // maximum uint accepted
135 UInt_t fminUInt; // minimum uint accepted
5fbf7677 136 Bool_t fdaqStartEndTimeOk; // flag to set whether the DAQ_time_start/end fields are set
2972d4eb 137
c5340e82 138 TObjArray* ffailedDPs; //TObjArray of failed DPs names
139
0254e751 140 static const Int_t fgknLHCDP; //! number of lhc dps
141 static const char* fgkLHCDataPoints[]; //! names of lhc dps
4bb7c769 142 static const Int_t fgkDCSDPHallTopShift; //! shift from the top to the Hall Probes from the list of DCS DPs names
9fae6417 143 static const Int_t fgkDCSDPNonWorking; //! Number of non working DCS DPs
0254e751 144
08a446c2 145 ClassDef(AliGRPPreprocessor, 0);
3dedb44a 146};
147
148#endif