-#ifndef ALILHCDATA_H
-#define ALILHCDATA_H
-
-/////////////////////////////////////////////////////////////////////////////////
-// //
-// AliLHCData: summary of the lumnosity related information from LHC DIP. //
-// The time dependent values are averaged over the fPeriod (default: 10 min) //
-// Created from the TMap provided by the AliLHCReader with optional beginning //
-// and end time stamps to account. //
-// //
-// The data are (wrapped in the AliLHCDipValT): //
-// Total beam intensities ( eg GetIntensityTotal(beam) for beam=0,1 //
-// Total beam luminosities ( eg GetLuminTotal(side) for side=0,1 (left/right)//
-// Bunched intensities and luminosities and crossing angle: //
-// GetIntensityBunch(beam),GetLuminBunch(side),GetCrossAngle(side) //
-// Bunches configuration: GetBunchConfig(beam) //
-// //
-// Collimators information (initial position + changes > 100 microns) //
-// GetCollimator(collID,jawID) with collID={kTCTVB4L2, kTCTVB4R2, kTCLIA4R2} //
-// and jawID={kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp} //
-// //
-// Author: ruben.shahoyan@cern.ch //
-// //
-/////////////////////////////////////////////////////////////////////////////////
-#include "TObject.h"
-#include "AliLHCDipValT.h"
-
-class TMap;
-
-class AliLHCData : public TObject
-{
- public:
- enum BeamID_t {kBeam1,kBeam2};
- enum Proj_t {kX,kY};
- enum Side_t {kLeft,kRight};
- enum Collim_t {kTCTVB4L2, kTCTVB4R2, kTCLIA4R2, kNCollimators};
- enum ColJaw_t {kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp,kNJaws};
- enum {kRecTotInt,kRecTotIntBunch,kRecBunchInt,kRecTotLum,kRecBunchLum,kRecCrossAngle,kRecBunchConf,kRecFillNum,
- kRecPrfPrID,kRecPrfAmp,kRecPrfPos,kRecPrfSig};
- //
- public:
- //
- AliLHCData() : fPeriod(600),fTMin(0),fTMax(1e20) {}
- AliLHCData(const TMap* dcsMap, double tmin=0, double tmax=1.e20,int avPeriod=600);
- virtual ~AliLHCData() {}
- //
- Bool_t FillData(const TMap* dcsMap, double tmin=0, double tmax=1.e20);
- //
- const TObjArray& GetIntensityTotal(BeamID_t b) const {return fIntTot[b];}
- const TObjArray& GetIntensityTotalBunch(BeamID_t b) const {return fIntTotBunch[b];}
- const TObjArray& GetIntensityBunch(BeamID_t b) const {return fIntBunch[b];}
- const TObjArray& GetBeamPos(BeamID_t b,Proj_t p) const {return fBeamPos[b][p];}
- const TObjArray& GetLuminTotal(Side_t s) const {return fLuminTot[s];}
- const TObjArray& GetLuminBunch(Side_t s) const {return fLuminBunch[s];}
- const TObjArray& GetCrossAngle(Side_t s) const {return fCrossAngle[s];}
- const AliLHCDipValI& GetBunchConfig(BeamID_t b) const {return fBunchConfig[b];}
- const TObjArray& GetCollimator(Collim_t c,ColJaw_t jaw) const {return fCollimators[c][jaw];}
- //
- Double_t GetTMin() const {return fTMin;}
- Double_t GetTMax() const {return fTMax;}
- Int_t GetPeriod() const {return fPeriod;}
- Int_t GetNBunches(BeamID_t b) const {return GetBunchConfig(b).GetSize();}
- Int_t GetBunchRFBeam1(BeamID_t b,Int_t bunch) const {return GetBunchConfig(b).GetValue(bunch);}
- Int_t GetFillNumber() const {return GetUniqueID();}
- void SetFillNumber(Int_t fill) {SetUniqueID(fill);}
- void SetPeriod(Int_t nsec=600) {fPeriod = nsec;}
- void SetTMin(Double_t t) {fTMin = t;}
- void SetTMax(Double_t t) {fTMax = t;}
- virtual void Print(const Option_t *opt="") const;
- //
- protected:
- TObjArray* GetDCSEntry(const TMap* dcsMap,const char* key,int &entry,double tmin,double tmax) const;
-
- AliLHCData(const AliLHCData& src) : TObject(src),fPeriod(src.fPeriod),fTMin(src.fTMin),fTMax(src.fTMax) { /*dummy*/ }
- AliLHCData& operator=(const AliLHCData& ) { /*dummy*/ return *this;}
-
- protected:
- //
- Int_t fPeriod; // averaging period in seconds
- Double_t fTMin; // selection timeMin
- Double_t fTMax; // selection timeMax
- AliLHCDipValI fBunchConfig[2]; // bunches configuration for beam1 and beam2
- //
- TObjArray fIntTot[2]; // total intensity (DC BCT) for beam1 and beam2 (AliLHCDipValD)
- TObjArray fIntTotBunch[2]; // total intensity (BCTFR) for beam1 and beam2 (AliLHCDipValD)
- TObjArray fIntBunch[2]; // bunch by bunch intensity for beam1 and beam2 (AliLHCDipValD)
- //
- TObjArray fBeamPos[2][2]; // horizontal and vertical projection gaussian fit params for beam1 and beam2 (AliLHCDipValD: amp,pos,sigma)
- //
- TObjArray fLuminTot[2]; // total luminosity from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD)
- TObjArray fLuminBunch[2]; // bunch by bunch luminosity from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD)
- TObjArray fCrossAngle[2]; // beams crossing angle from BRANB_4L2 and BRANB_4R2 (AliLHCDipValD)
- //
- TObjArray fCollimators[kNCollimators][kNJaws];// collimators data (AliLHCDipValD: kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp)
- //
- static const Char_t *fgkDCSNames[]; // beam related DCS names to extract
- static const Char_t *fgkDCSColNames[]; // collimators to extract
- static const Char_t *fgkDCSColJaws[]; // names of collimator pieces
-
- ClassDef(AliLHCData,2)
-};
-
-#endif
+#ifndef ALILHCDATA_H\r
+#define ALILHCDATA_H\r
+\r
+/********************************************************************************\r
+* *\r
+* AliLHCData: summary of the LHC related information from LHC DIP. *\r
+* Created from the TMap provided by the AliLHCReader with optional beginning *\r
+* *\r
+* The data are (wrapped in the AliLHCDipValT): *\r
+* made of TimeStamp (double) and array of values *\r
+* *\r
+* Multiple entries for each type of data are possible. To obtaine number of *\r
+* records (with distinct timestamp) for give type od records use: *\r
+* int GetNBunchConfigMeasured(int beam) (with beam=0,1) etc. *\r
+* *\r
+* To get i-th entry, use brec= AliLHCDipValI* GetBunchConfigMeasured(bm,i); *\r
+* Note: exact type of templated AliLHCDipValT pointer depends on the record *\r
+* type, concult getters to know it. *\r
+* *\r
+* Then, once the pointer is obtained, details can be accessed: *\r
+* int nBunches = brec->GetSize(); *\r
+* for (int i=0;i<nBunches;i++) printf("Bunch#%d: %d\n",i,(*brec)[i]); *\r
+* *\r
+* ATTENTION: Bunch RFBucked is NEGATIVE for bunches interacting at IR2 *\r
+* *\r
+* *\r
+* *\r
+* Author: ruben.shahoyan@cern.ch *\r
+* *\r
+********************************************************************************/\r
+\r
+#include "AliLHCDipValT.h"\r
+#include "TObject.h"\r
+class TObjArray;\r
+//class AliLHCDipValT;\r
+\r
+class AliDCSArray;\r
+class TString;\r
+class TMap;\r
+class AliLHCReader;\r
+\r
+\r
+class AliLHCData : public TObject\r
+{\r
+ public:\r
+ enum {kStart,kNStor};\r
+ enum BeamID_t {kBeam1,kBeam2};\r
+ enum Proj_t {kX,kY};\r
+ enum Side_t {kLeft,kRight};\r
+ enum Collim_t {kTCTVB4L2, kTCTVB4R2, kTCLIA4R2, kNCollimators};\r
+ enum ColJaw_t {kGapDn,kGapUp,kLeftDn,kLeftUp,kRightDn,kRightUp,kNJaws};\r
+ enum {kMaxBSlots = 3564};\r
+ enum {kMarginSOR = 60*60*24*30, // use margin of 30 days for SOR, when looking for the 1st record\r
+ kMarginEOR = 60*15}; // use margin of 15 min for EOR, when looking for the last record\r
+ //\r
+ enum {kIntTot,kIntTotAv,kIntBunchAv,\r
+ kLumAcqMode,kLumTot,kLumTotErr,kLumBunch,kLumBunchErr,kLumCrossAng,kLumCrossAngErr,\r
+ kBunchConf,kFillNum,kBunchLgtNB,kBunchLgt,kBunchLgtFillB,\r
+ kRCInjSch,kRCBeta,kRCCrossAng,kRCVang,\r
+ kBeamSzAcqMode,kBeamSzSigH,kBeamSzSigV,kBeamSzEmittH,kBeamSzEmittV,kBeamSzSigHErr,kBeamSzSigVErr,\r
+ kCollPos};\r
+ //\r
+ //le\r
+ public:\r
+ //\r
+ AliLHCData() : fTMin(0),fTMax(1e10),fFillNumber(0),fData(0),fFile2Process(0),fMap2Process(0) {Clear();}\r
+ AliLHCData(const TMap* dcsMap, double tmin=0, double tmax=1.e10);\r
+ AliLHCData(const Char_t* dcsFile, double tmin=0, double tmax=1.e10);\r
+ virtual ~AliLHCData() {}\r
+ //\r
+ Bool_t FillData(const TMap* dcsMap, double tmin=0, double tmax=1.e20);\r
+ Bool_t FillData(const Char_t* dcsFile, double tmin=0, double tmax=1.e20);\r
+ Double_t GetTMin() const {return fTMin;}\r
+ Double_t GetTMax() const {return fTMax;}\r
+ Int_t GetFillNumber() const {return fFillNumber;}\r
+ void SetFillNumber(Int_t fill) {fFillNumber = fill;}\r
+ void SetTMin(Double_t t) {fTMin = t<0?0:(t>1e10?1e10:t);}\r
+ void SetTMax(Double_t t) {fTMax = t<0?0:(t>1e10?1e10:t);}\r
+ //\r
+ virtual void Print(const Option_t *opt="") const;\r
+ //\r
+ Int_t GetNBunchConfigMeasured(int bm) const {return GoodPairID(bm)?fBunchConfMeas[bm][kNStor]:-1;}\r
+ Int_t GetNBunchConfigDeclared(int bm) const {return GoodPairID(bm)?fBunchConfDecl[bm][kNStor]:-1;}\r
+ Int_t GetNBunchLengths(int bm) const {return GoodPairID(bm)?fBunchLengths[bm][kNStor]:-1;}\r
+ Int_t GetNTotalIntensity(int bm) const {return GoodPairID(bm)?fIntensTotal[bm][kNStor]:-1;}\r
+ Int_t GetNTotalIntensityAv(int bm) const {return GoodPairID(bm)?fIntensTotalAv[bm][kNStor]:-1;}\r
+ Int_t GetNIntensityPerBunch(int bm) const {return GoodPairID(bm)?fIntensPerBunch[bm][kNStor]:-1;}\r
+ Int_t GetNEmittanceH(int bm) const {return GoodPairID(bm)?fEmittanceH[bm][kNStor]:-1;}\r
+ Int_t GetNEmittanceV(int bm) const {return GoodPairID(bm)?fEmittanceV[bm][kNStor]:-1;}\r
+ Int_t GetNBeamSigmaH(int bm) const {return GoodPairID(bm)?fBeamSigmaH[bm][kNStor]:-1;}\r
+ Int_t GetNBeamSigmaV(int bm) const {return GoodPairID(bm)?fBeamSigmaV[bm][kNStor]:-1;}\r
+ //\r
+ Int_t GetNLuminosityTotal(int lr) const {return GoodPairID(lr)?fLuminTotal[lr][kNStor]:-1;}\r
+ Int_t GetNLuminosityPerBunch(int lr) const {return GoodPairID(lr)?fLuminPerBC[lr][kNStor]:-1;}\r
+ Int_t GetNLuminosityAcqMode(int lr) const {return GoodPairID(lr)?fLuminAcqMode[lr][kNStor]:-1;}\r
+ Int_t GetNCrossingAngle(int lr) const {return GoodPairID(lr)?fCrossAngle[lr][kNStor]:-1;}\r
+ //\r
+ Int_t GetNInjectionScheme() const {return fRCInjScheme[kNStor];}\r
+ Int_t GetNRCBetaStar() const {return fRCBeta[kNStor];}\r
+ Int_t GetNRCAngleH() const {return fRCAngH[kNStor];}\r
+ Int_t GetNRCAngleV() const {return fRCAngV[kNStor];}\r
+ //\r
+ Int_t GetNCollimatorJawPos(int coll,int jaw) const;\r
+ //\r
+ AliLHCDipValI* GetBunchConfigMeasured(int bm, int i=0) const;\r
+ AliLHCDipValF* GetBunchLengths(int bm, int i=0) const;\r
+ AliLHCDipValI* GetBunchConfigDeclared(int bm, int i=0) const;\r
+ AliLHCDipValF* GetTotalIntensity(int bm, int i=0) const;\r
+ AliLHCDipValF* GetTotalIntensityAv(int bm, int i=0) const;\r
+ AliLHCDipValF* GetIntensityPerBunch(int bm, int i=0) const;\r
+ AliLHCDipValF* GetEmittanceH(int bm, int i=0) const;\r
+ AliLHCDipValF* GetEmittanceV(int bm, int i=0) const;\r
+ AliLHCDipValF* GetBeamSigmaH(int bm, int i=0) const;\r
+ AliLHCDipValF* GetBeamSigmaV(int bm, int i=0) const;\r
+ AliLHCDipValF* GetLuminosityTotal(int lr, int i=0) const;\r
+ AliLHCDipValF* GetLuminosityPerBunch(int lr, int i=0) const;\r
+ AliLHCDipValI* GetLuminosityAcqMode(int lr, int i=0) const;\r
+ AliLHCDipValF* GetCrossAngle(int lr, int i=0) const;\r
+ AliLHCDipValC* GetInjectionScheme(int i=0) const;\r
+ AliLHCDipValF* GetRCBetaStar(int i=0) const;\r
+ AliLHCDipValF* GetRCAngleH(int i=0) const; \r
+ AliLHCDipValF* GetRCAngleV(int i=0) const; \r
+ AliLHCDipValF* GetCollimJawPos(int coll, int jaw, int i=0) const;\r
+ //\r
+ void FlagInteractingBunches(const Int_t beam1[2],const Int_t beam2[2]);\r
+ TObject* FindRecValidFor(int start,int nrec, double tstamp) const;\r
+ AliLHCDipValI* GetBunchConfigMeasured(int beam,double tstamp) const;\r
+ AliLHCDipValI* GetBunchConfigDeclared(int beam,double tstamp) const;\r
+ Int_t GetNInteractingBunchesMeasured(int i=0) const;\r
+ Int_t GetNInteractingBunchesDeclared(int i=0) const;\r
+ Int_t IsPilotPresent(int i=0) const;\r
+ //\r
+ // return array with beginning [0] and number of records for corresponding info (in the fData)\r
+ const Int_t* GetOffsBunchConfigMeasured(int bm) const {return GoodPairID(bm)?fBunchConfMeas[bm]:0;}\r
+ const Int_t* GetOffsBunchConfigDeclared(int bm) const {return GoodPairID(bm)?fBunchConfDecl[bm]:0;}\r
+ const Int_t* GetOffsBunchLengths(int bm) const {return GoodPairID(bm)?fBunchLengths[bm]:0;}\r
+ const Int_t* GetOffsTotalIntensity(int bm) const {return GoodPairID(bm)?fIntensTotal[bm]:0;}\r
+ const Int_t* GetOffsTotalIntensityAv(int bm) const {return GoodPairID(bm)?fIntensTotalAv[bm]:0;}\r
+ const Int_t* GetOffsIntensityPerBunch(int bm) const {return GoodPairID(bm)?fIntensPerBunch[bm]:0;}\r
+ const Int_t* GetOffsEmittanceH(int bm) const {return GoodPairID(bm)?fEmittanceH[bm]:0;}\r
+ const Int_t* GetOffsEmittanceV(int bm) const {return GoodPairID(bm)?fEmittanceV[bm]:0;}\r
+ const Int_t* GetOffsBeamSigmaH(int bm) const {return GoodPairID(bm)?fBeamSigmaH[bm]:0;}\r
+ const Int_t* GetOffsBeamSigmaV(int bm) const {return GoodPairID(bm)?fBeamSigmaV[bm]:0;}\r
+ //\r
+ const Int_t* GetOffsLuminosityTotal(int lr) const {return GoodPairID(lr)?fLuminTotal[lr]:0;}\r
+ const Int_t* GetOffsLuminosityPerBunch(int lr) const {return GoodPairID(lr)?fLuminPerBC[lr]:0;}\r
+ const Int_t* GetOffsLuminosityAcqMode(int lr) const {return GoodPairID(lr)?fLuminAcqMode[lr]:0;}\r
+ const Int_t* GetOffsCrossingAngle(int lr) const {return GoodPairID(lr)?fCrossAngle[lr]:0;}\r
+ //\r
+ const Int_t* GetOffsInjectionScheme() const {return fRCInjScheme;}\r
+ const Int_t* GetOffsRCBetaStar() const {return fRCBeta;}\r
+ const Int_t* GetOffsRCAngleH() const {return fRCAngH;}\r
+ const Int_t* GetOffsRCAngleV() const {return fRCAngV;}\r
+ //\r
+ const Int_t* GetOffsCollimatorJawPos(int coll,int jaw) const;\r
+ //\r
+ const TObjArray& GetData() const {return fData;}\r
+ //\r
+ // analysis methods\r
+ Int_t GetMeanIntensity(int beamID, Double_t &colliding, Double_t &noncolliding) const;\r
+ //\r
+ protected:\r
+ //\r
+ Bool_t FillData(double tmin=0, double tmax=1.e20);\r
+ virtual void Clear(const Option_t *opt="");\r
+ void PrintAux(Bool_t full,const Int_t refs[2],const Option_t *opt="") const;\r
+ TObjArray* GetDCSEntry(const char* key,int &entry,int &last,double tmin,double tmax) const;\r
+ Int_t FillScalarRecord( int refs[2], const char* rec, const char* recErr=0);\r
+ Int_t FillBunchConfig( int refs[2], const char* rec);\r
+ Int_t FillStringRecord( int refs[2], const char* rec);\r
+ Int_t FillAcqMode( int refs[2], const char* rec);\r
+ Int_t FillBunchInfo( int refs[2], const char* rec,int ibm, Bool_t inRealSlots);\r
+ Int_t FillBCLuminosities(int refs[2], const char* rec, const char* recErr, Int_t useBeam);\r
+ //\r
+ Int_t ExtractInt(AliDCSArray* dcsArray,Int_t el) const;\r
+ Double_t ExtractDouble(AliDCSArray* dcsArray,Int_t el) const;\r
+ TString& ExtractString(AliDCSArray* dcsArray) const;\r
+ AliLHCData(const AliLHCData& src) : TObject(src),fTMin(0),fTMax(0),fFillNumber(0),fData(0),fFile2Process(0),fMap2Process(0) { /*dummy*/ }\r
+ AliLHCData& operator=(const AliLHCData& ) { /*dummy*/ return *this;}\r
+ Int_t TimeDifference(double v1,double v2,double tol=0.9) const;\r
+ Bool_t IzZero(double val, double tol=1e-16) const {return TMath::Abs(val)<tol;}\r
+ Bool_t GoodPairID(int beam) const;\r
+ //\r
+ protected:\r
+ //\r
+ Double_t fTMin; // selection timeMin\r
+ Double_t fTMax; // selection timeMax\r
+ Int_t fFillNumber; // fill number : kFillNum\r
+ //\r
+ //---------------- Last index gives: 0 - beginning of the records in fData, 1 - number of records\r
+ //\r
+ // infrormation from RunControl\r
+ Int_t fRCInjScheme[2]; // active injection scheme : String |kRCInjScheme\r
+ Int_t fRCBeta[2]; // target beta : Float |kRCBeta\r
+ Int_t fRCAngH[2]; // horisontal angle : Float |kRCCrossAng\r
+ Int_t fRCAngV[2]; // vertical angle : Float |kRCVang\r
+ Int_t fBunchConfDecl[2][2]; // declared beam configuration : Float |kBunchConf \r
+ //\r
+ // measured information\r
+ Int_t fBunchConfMeas[2][2]; // measured beam configuration : Int |kBunchLgtFillB\r
+ Int_t fBunchLengths[2][2]; // measured beam lenghts : Float |kBunchLgt\r
+ Int_t fIntensTotal[2][2]; // total beam intensities : Float |kIntTot\r
+ Int_t fIntensTotalAv[2][2]; // total beam intensities from bunch averages : Float |kIntTotAv\r
+ Int_t fIntensPerBunch[2][2]; // bunch-by-bunch intensities : Float |kIntBunchAv\r
+ //\r
+ Int_t fCrossAngle[2][2]; // crossing angle at IP2 and its error : Float |kLimCrossAng, kLumCrossAngErr\r
+ Int_t fEmittanceH[2][2]; // beam H emittances : Float |kBeamSzEmittH\r
+ Int_t fEmittanceV[2][2]; // beam V emittances : Float |kBeamSzEmittV\r
+ Int_t fBeamSigmaH[2][2]; // beam H sigma and error : Float |kBeamSzSigH,kBeamSzSigHErr\r
+ Int_t fBeamSigmaV[2][2]; // beam V sigma and error : Float |kBeamSzSigV,kBeamSzSigVErr\r
+ //\r
+ Int_t fLuminTotal[2][2]; // total luminosity at IP2 and its error : Float |kLumTot, kLumTotErr\r
+ Int_t fLuminPerBC[2][2]; // luminosity at IP2 for each BC and its error : Float |kLumBunch,kLumBunchErr\r
+ Int_t fLuminAcqMode[2][2]; // luminosity acquisition mode : Int | kLumAcqMode\r
+ //\r
+ Int_t fCollimators[kNCollimators][kNJaws][2];// collimator jaws positions : Float |kCollPos\r
+ //\r
+ TObjArray fData; // single storage for various records\r
+ //\r
+ static const Char_t *fgkDCSNames[]; // beam related DCS names to extract\r
+ static const Char_t *fgkDCSColNames[]; // collimators to extract\r
+ static const Char_t *fgkDCSColJaws[]; // names of collimator pieces\r
+ //\r
+ private:\r
+ // non-persistent objects used at the filling time\r
+ const Char_t* fFile2Process; //! name of DCS file\r
+ const TMap* fMap2Process; //! DCS map to process \r
+\r
+ ClassDef(AliLHCData,1)\r
+};\r
+\r
+\r
+//_____________________________________________________________________________\r
+inline Int_t AliLHCData::GetNCollimatorJawPos(int coll,int jaw) const {// get n records\r
+ return (coll>=0&&coll<kNCollimators&&jaw>=0&&jaw<kNJaws)? fCollimators[coll][jaw][kNStor]:0;\r
+}\r
+\r
+inline const Int_t* AliLHCData::GetOffsCollimatorJawPos(int coll,int jaw) const { // offset array\r
+ return (coll>=0&&coll<kNCollimators&&jaw>=0&&jaw<kNJaws)? fCollimators[coll][jaw]:0;\r
+}\r
+\r
+inline AliLHCDipValI* AliLHCData::GetBunchConfigMeasured(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fBunchConfMeas[bm][kNStor]) ? (AliLHCDipValI*)fData[fBunchConfMeas[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetBunchLengths(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fBunchLengths[bm][kNStor]) ? (AliLHCDipValF*)fData[fBunchLengths[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValI* AliLHCData::GetBunchConfigDeclared(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fBunchConfDecl[bm][kNStor]) ? (AliLHCDipValI*)fData[fBunchConfDecl[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetTotalIntensity(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fIntensTotal[bm][kNStor]) ? (AliLHCDipValF*)fData[fIntensTotal[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetTotalIntensityAv(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fIntensTotalAv[bm][kNStor]) ? (AliLHCDipValF*)fData[fIntensTotalAv[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetIntensityPerBunch(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fIntensPerBunch[bm][kNStor]) ? (AliLHCDipValF*)fData[fIntensPerBunch[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetEmittanceH(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fEmittanceH[bm][kNStor]) ? (AliLHCDipValF*)fData[fEmittanceH[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetEmittanceV(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fEmittanceV[bm][kNStor]) ? (AliLHCDipValF*)fData[fEmittanceV[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetBeamSigmaH(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fBeamSigmaH[bm][kNStor]) ? (AliLHCDipValF*)fData[fBeamSigmaH[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetBeamSigmaV(int bm, int i) const { // get record\r
+ return (GoodPairID(bm) && i>=0 && i<fBeamSigmaV[bm][kNStor]) ? (AliLHCDipValF*)fData[fBeamSigmaV[bm][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetLuminosityTotal(int lr, int i) const { // get record\r
+ return (GoodPairID(lr) && i>=0 && i<fLuminTotal[lr][kNStor]) ? (AliLHCDipValF*)fData[fLuminTotal[lr][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetLuminosityPerBunch(int lr, int i) const { // get record\r
+ return (GoodPairID(lr) && i>=0 && i<fLuminPerBC[lr][kNStor]) ? (AliLHCDipValF*)fData[fLuminPerBC[lr][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValI* AliLHCData::GetLuminosityAcqMode(int lr, int i) const { // get record\r
+ return (GoodPairID(lr) && i>=0 && i<fLuminAcqMode[lr][kNStor]) ? (AliLHCDipValI*)fData[fLuminAcqMode[lr][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetCrossAngle(int lr, int i) const { // get record\r
+ return (GoodPairID(lr) && i>=0 && i<fCrossAngle[lr][kNStor]) ? (AliLHCDipValF*)fData[fCrossAngle[lr][kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValC* AliLHCData::GetInjectionScheme(int i) const { // get record\r
+ return (i>=0 && i<fRCInjScheme[kNStor]) ? (AliLHCDipValC*)fData[fRCInjScheme[kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetRCBetaStar(int i) const { // get record\r
+ return (i>=0 && i<fRCBeta[kNStor]) ? (AliLHCDipValF*)fData[fRCBeta[kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetRCAngleH(int i) const { // get record\r
+ return (i>=0 && i<fRCAngH[kNStor]) ? (AliLHCDipValF*)fData[fRCAngH[kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetRCAngleV(int i) const { // get record\r
+ return (i>=0 && i<fRCAngV[kNStor]) ? (AliLHCDipValF*)fData[fRCAngV[kStart]+i]:0;\r
+}\r
+\r
+inline AliLHCDipValF* AliLHCData::GetCollimJawPos(int coll, int jaw, int i) const { // get record\r
+ return (coll>=0 && coll<kNCollimators && jaw>=0 && jaw<kNJaws && \r
+ i>=0 && i<fCollimators[coll][jaw][kNStor]) ? (AliLHCDipValF*)fData[fCollimators[coll][jaw][kStart]+i]:0;\r
+}\r
+\r
+\r
+#endif\r