class def increased.
[u/mrichter/AliRoot.git] / STEER / AliGRPObject.h
CommitLineData
44e45fac 1#ifndef AliGRPOBJECT_H
2#define AliGRPOBJECT_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9#include <TMap.h>
10
11#include "AliDCSSensor.h"
12#include "AliSplineFit.h"
13#include "AliLog.h"
14
15class AliGRPObject : public TObject {
16 public:
17
951a6a05 18 enum Stats {kMean = 0, kTruncMean = 1, kMedian = 2, kSDMean = 3, kSDMedian = 4};
44e45fac 19
20 enum DP_HallProbes {
21 k_HP_L3_BSF17_H1= 0 , k_HP_L3_BSF17_H2, k_HP_L3_BSF17_H3, k_HP_L3_BSF17_Temperature,
22 k_HP_L3_BSF4_H1, k_HP_L3_BSF4_H2, k_HP_L3_BSF4_H3, k_HP_L3_BSF4_Temperature,
23 k_HP_L3_BKF17_H1, k_HP_L3_BKF17_H2, k_HP_L3_BKF17_H3, k_HP_L3_BKF17_Temperature,
24 k_HP_L3_BKF4_H1, k_HP_L3_BKF4_H2, k_HP_L3_BKF4_H3, k_HP_L3_BKF4_Temperature,
25 k_HP_L3_BSF13_H1, k_HP_L3_BSF13_H2, k_HP_L3_BSF13_H3, k_HP_L3_BSF13_Temperature,
26 k_HP_L3_BSF8_H1, k_HP_L3_BSF8_H2, k_HP_L3_BSF8_H3, k_HP_L3_BSF8_Temperature,
27 k_HP_L3_BKF13_H1, k_HP_L3_BKF13_H2, k_HP_L3_BKF13_H3, k_HP_L3_BKF13_Temperature,
28 k_HP_L3_BKF8_H1, k_HP_L3_BKF8_H2, k_HP_L3_BKF8_H3, k_HP_L3_BKF8_Temperature,
29 k_HP_Dipole_Inside_H1, k_HP_Dipole_Inside_H2, k_HP_Dipole_Inside_H3, k_HP_Dipole_Inside_Temperature,
30 k_HP_Dipole_Outside_H1, k_HP_Dipole_Outside_H2, k_HP_Dipole_Outside_H3, k_HP_Dipole_Outside_Temperature};
31
32
33 AliGRPObject();
34 AliGRPObject(const AliGRPObject & obj);
35 AliGRPObject& operator=(const AliGRPObject & obj);
36 ~AliGRPObject();
37
38 // getters
39
40 time_t GetTimeStart() const {return fTimeStart;}
41 time_t GetTimeEnd() const {return fTimeEnd;}
42 Float_t GetBeamEnergy() const {return fBeamEnergy;}
43 TString GetBeamType() const {return fBeamType;}
44 Char_t GetNumberOfDetectors() const {return fNumberOfDetectors;}
45 UInt_t GetDetectorMask() const {return fDetectorMask;}
46 TString GetLHCPeriod() const {return fLHCPeriod;}
47 TString GetRunType() const {return fRunType;}
48 TString GetLHCState() const {return fLHCState;}
49 Float_t* GetLHCLuminosity() {return fLHCLuminosity;}
50 Float_t GetLHCLuminosity(Stats stat) const {return fLHCLuminosity[stat];}
51 AliSplineFit* GetLHCLuminositySplineFit() const {return fLHCLuminositySplineFit;}
52 Float_t* GetBeamIntensity() {return fBeamIntensity;}
53 Float_t GetBeamIntensity(Stats stat) const {return fBeamIntensity[stat];}
54 AliSplineFit* GetBeamIntensitySplineFit() const {return fBeamIntensitySplineFit;}
55 Char_t GetL3Polarity() const {return fL3Polarity;}
56 Char_t GetDipolePolarity() const {return fDipolePolarity;}
57 Float_t* GetL3Current() {return fL3Current;}
58 Float_t GetL3Current(Stats stat) const {return fL3Current[stat];}
59 Float_t* GetDipoleCurrent() {return fDipoleCurrent;}
60 Float_t GetDipoleCurrent(Stats stat) const {return fDipoleCurrent[stat];}
61 Float_t* GetCavernTemperature() {return fCavernTemperature;}
62 Float_t GetCavernTemperature(Stats stat) const {return fCavernTemperature[stat];}
63 // Float_t* GetCavernAtmosPressure() {return fCavernAtmosPressure;}
64 //Float_t GetCavernAtmosPressure(Stats stat) const {return fCavernAtmosPressure[stat];}
65 AliDCSSensor* GetCavernAtmosPressure() const {return fCavernAtmosPressure;}
66 AliDCSSensor* GetSurfaceAtmosPressure() const {return fSurfaceAtmosPressure;}
67
68 Float_t* GetHallProbes(DP_HallProbes hp);
69 Float_t GetHallProbes(Int_t hp) const {return fHallProbes[hp];}
70 Float_t GetHallProbes(DP_HallProbes hp, Stats stat) const {return fHallProbes[hp*fPoints+stat];}
71
72 Int_t GetPoints() const {return fPoints;}
73 Int_t GetDimension() const {return fDimension;}
74
75 // setters
76
77 void SetTimeStart(time_t timeStart) {fTimeStart = timeStart;}
78 void SetTimeEnd(time_t timeEnd) {fTimeEnd = timeEnd;}
79 void SetBeamEnergy(Float_t beamEnergy) {fBeamEnergy = beamEnergy;}
80 void SetBeamType(TString beamType) {fBeamType = beamType;}
81 void SetNumberOfDetectors(Char_t numberOfDetectors) {fNumberOfDetectors = numberOfDetectors;}
82 void SetDetectorMask(UInt_t detectorMask) {fDetectorMask = detectorMask;}
83 void SetLHCPeriod(TString lhcPeriod) {fLHCPeriod = lhcPeriod;}
84 void SetRunType(TString runType) {fRunType = runType;}
85 void SetLHCState(TString lhcState) {fLHCState = lhcState;}
86 void SetLHCLuminosity(Float_t* lhcLuminosity) {
87 for (Int_t i = 0;i<fPoints;i++) fLHCLuminosity[i] = lhcLuminosity[i];
88 }
89 void SetLHCLuminosity(Float_t lhcLuminosity, Stats stat) {fLHCLuminosity[stat] = lhcLuminosity;}
90 void SetLHCLuminositySplineFit(AliSplineFit* lhcLuminositySplineFit) {fLHCLuminositySplineFit = lhcLuminositySplineFit;}
91 void SetBeamIntensity(Float_t* beamIntensity) {
92 for (Int_t i = 0;i<fPoints;i++) fBeamIntensity[i] = beamIntensity[i];
93 }
94 void SetBeamIntensity(Float_t beamIntensity, Stats stat) {fBeamIntensity[stat] = beamIntensity;}
95 void SetBeamIntensitySplineFit(AliSplineFit* beamIntensitySplineFit) {fBeamIntensitySplineFit = beamIntensitySplineFit;}
96 void SetL3Polarity(Char_t l3Polarity) {fL3Polarity = l3Polarity;}
97 void SetDipolePolarity(Char_t dipolePolarity) {fDipolePolarity = dipolePolarity;}
98 void SetL3Current(Float_t* l3Current) {
99 for (Int_t i = 0;i<fPoints;i++) fL3Current[i] = l3Current[i];
100 }
101 void SetL3Current(Float_t l3Current, Stats stat) {fL3Current[stat] = l3Current;}
102 void SetDipoleCurrent(Float_t* dipoleCurrent) {
103 for (Int_t i = 0;i<fPoints;i++) fDipoleCurrent[i] = dipoleCurrent[i];
104 }
105 void SetDipoleCurrent(Float_t dipoleCurrent, Stats stat) {fDipoleCurrent[stat] = dipoleCurrent;}
106 void SetCavernTemperature(Float_t* cavernTemperature) {
107 for (Int_t i = 0;i<fPoints;i++) fCavernTemperature[i] = cavernTemperature[i];
108 }
109 void SetCavernTemperature(Float_t cavernTemperature, Stats stat) {fCavernTemperature[stat] = cavernTemperature;}
110 // void SetCavernAtmosPressure(Float_t* cavernAtmosPressure) {
111 // for (Int_t i = 0;i<fPoints;i++) fCavernAtmosPressure[i] = cavernAtmosPressure[i];
112 //}
113// void SetCavernAtmosPressure(Float_t cavernAtmosPressure, Stats stat) {fCavernAtmosPressure[stat] = cavernAtmosPressure;}
114 void SetCavernAtmosPressure(AliDCSSensor* cavernAtmosPressure) {fCavernAtmosPressure = cavernAtmosPressure;}
115 void SetSurfaceAtmosPressure(AliDCSSensor* surfacePressure) {fSurfaceAtmosPressure = surfacePressure;}
116
117 void SetHallProbes(DP_HallProbes hp, Float_t hall_probe, Stats stat) {fHallProbes[hp*fPoints+stat] = hall_probe;}
118 void SetHallProbes(Float_t *hall_probe){
119 for (Int_t i = 0; i< fDimension; i++) fHallProbes[i] = hall_probe[i];}
120
121 void SetHallProbes(DP_HallProbes hp, Float_t* hall_probe);
122 void SetPoints(Int_t points) {fPoints = points;}
123 void SetDimension(Int_t dimension) {fDimension = dimension;}
124
125 // getters for "invalid" flags
126
127 static Float_t GetInvalidFloat() {return fgkInvalidFloat;}
128 static TString GetInvalidString() {return fgkInvalidString;}
129 static Int_t GetInvalidInt() {return fgkInvalidInt;}
130 static Int_t GetInvalidUInt() {return fgkInvalidUInt;}
131 static Char_t GetInvalidChar() {return fgkInvalidChar;}
132 static Int_t GetNumberOfHP() {return fgknDCSDP_HallProbes;}
133 static const char* GetHPDP(Int_t indexHP) {return fgkDCSDataPoints_HallProbes[indexHP];}
134
135 // to read old GRP object in TMap format
136
137 void ReadValuesFromMap(TMap* map);
138
139 private:
140
141 static const Float_t fgkInvalidFloat; // value to identify invalid data - float
142 static const TString fgkInvalidString; // value to identify invalid data - string
143 static const Char_t fgkInvalidChar; // value to identify invalid data - char
144 static const Int_t fgkInvalidInt; // value to identify invalid data - int
145 static const Int_t fgkInvalidUInt; // value to identify invalid data - uint
146 static const Int_t fgknDCSDP_HallProbes; //! number of dcs dps
147 static const char* fgkDCSDataPoints_HallProbes[]; //! names of dcs dps
148
149 Int_t fPoints; // number of statistical quantities to be stored
150 Int_t fDimension; // dimension of Hall Probes array
151
152 time_t fTimeStart; // DAQ_time_start entry from DAQ logbook
153 time_t fTimeEnd; // DAQ_time_end entry from DAQ logbook
154 Float_t fBeamEnergy; // beamEnergy entry from DAQ logbook
155 TString fBeamType; // beamType entry from DAQ logbook
156 Char_t fNumberOfDetectors; // numberOfDetectors entry from DAQ logbook
157 UInt_t fDetectorMask; // detectorMask entry from DAQ logbook
158 TString fLHCPeriod; // LHCperiod entry from DAQ logbook
159 TString fRunType; // RunType entry from DAQ logbook
160 TString fLHCState; // LHCState entry from DCS DB
161 Float_t* fLHCLuminosity; // [fPoints]
162 // LHCLuminosity entry from DCS DB
163 AliSplineFit* fLHCLuminositySplineFit; // LHCLuminosity SplineFit from DCS DB
164 Float_t* fBeamIntensity ; // [fPoints]
165 // BeamIntensity entry from DCS DB
166 AliSplineFit* fBeamIntensitySplineFit; // BeamIntensity SplineFit from DCS DB
26c1dff2 167 Char_t fL3Polarity; // L3Polarity entry from DCS DB
168 Char_t fDipolePolarity; // DipolePolarity entry from DCS DB
44e45fac 169 Float_t* fL3Current; // [fPoints]
170 // L3Current entry from DCS DB
171 Float_t* fDipoleCurrent; // [fPoints]
172 // DipoleCurrent entry from DCS DB
173 Float_t* fCavernTemperature; // [fPoints]
174 // CavernTemperature entry from DCS DB
175 // Float_t* fCavernAtmosPressure; // [fPoints]
176 // CavernAtmosPressure entry from DCS DB
177 AliDCSSensor* fCavernAtmosPressure; // CavernAtmosPressure entry from DCS DB
178 AliDCSSensor* fSurfaceAtmosPressure; // SurfaceAtmosPressure entry from DCS DB
179
180 // Hall Probes
181
182 Float_t* fHallProbes; //[fDimension]
183 // array containg the values for the Hall Probes
184
db21dfe2 185 ClassDef(AliGRPObject,2)
44e45fac 186
187};
188
189#endif