]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliRunTag.h
Coverity fix.
[u/mrichter/AliRoot.git] / STEER / AliRunTag.h
1 #ifndef ALIRUNTAG_H
2 #define ALIRUNTAG_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6
7 /* $Id$ */
8
9 //-------------------------------------------------------------------------
10 //                          Class AliRunTag
11 //   This is the class to deal with the tags for the run level
12 //
13 //    Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
14 //-------------------------------------------------------------------------
15
16 #include <TObject.h>
17 #include <TString.h>
18 #include <TClonesArray.h>
19 #include "AliLHCTag.h"
20 #include "AliDetectorTag.h"
21 #include "AliFileTag.h"
22 #include "AliQA.h"
23
24 class AliEventTag;
25 //class AliDetectorTag;
26
27
28 //___________________________________________________________________________
29 class AliRunTag : public TObject {
30  public:
31   AliRunTag();
32   virtual ~AliRunTag();
33   AliRunTag(const AliRunTag& qa) ;   
34   AliRunTag& operator = (const AliRunTag& tag) ;
35   //____________________________________________________//
36   void SetRunId(Int_t Pid) {fAliceRunId = Pid;}
37   void SetMagneticField(Float_t Pmag) {fAliceMagneticField = Pmag;}
38   void SetDipoleField(Float_t Pmag) {fAliceDipoleField = Pmag;}
39   void SetRunStartTime(Int_t Pt0) {fAliceRunStartTime = Pt0;}
40   void SetRunStopTime(Int_t Pt1) {fAliceRunStopTime = Pt1;}
41   void SetAlirootVersion(TString v) {fAlirootVersion = v;}
42   void SetRootVersion(TString v) {fRootVersion = v;}
43   void SetGeant3Version(TString v) {fGeant3Version = v;}
44   void SetLHCPeriod(TString v) {fLHCPeriod = v; }
45   void SetReconstructionPass(TString v) {fRecPass = v; }
46   void SetProductionName(TString v) {fProductionName = v; }
47   void SetRunValidation(Bool_t val) {fAliceRunValidated = val; }
48   void SetRunQuality(Int_t Pn) {fAliceRunGlobalQuality = Pn;}
49   void SetBeamEnergy(Float_t PE) {fAliceBeamEnergy = PE;}
50   void SetBeamType(TString Ptype) {fAliceBeamType = Ptype;}
51   void SetCalibVersion(Int_t Pn) {fAliceCalibrationVersion = Pn;}
52   void SetDataType(Int_t i) {fAliceDataType = i;}
53 /*   void SetNEvents(Int_t Pn) { fNumEvents = Pn; } */
54   void SetBeamTriggers(ULong_t bt) { fBeamTriggers = bt; }
55   void SetCollisionTriggers(ULong_t ct) { fCollisionTriggers = ct; }
56   void SetEmptyTriggers(ULong_t et) {fEmptyTriggers = et; }
57   void SetASideTriggers(ULong_t at) {fASideTriggers = at; }
58   void SetCSideTriggers(ULong_t ct) {fCSideTriggers = ct; }
59   void SetHMTriggers(ULong_t ht) {fHMTriggers = ht; }
60   void SetMuonTriggers(ULong_t mt) {fMuonTriggers = mt; }
61   void SetCollisionRate(Float_t rate) {fCollisionRate = rate; }
62   void SetMeanVertex(Float_t mv) {fMeanVertex = mv; }
63   void SetVertexQuality(Float_t vq) {fVertexQuality = vq; }
64   void SetLHCTag(Float_t Plumin, TString type);
65   void SetDetectorTag(UInt_t mask, UInt_t maskReco=0);
66   void SetQA(const AliQA &qa) { fQA=qa; }       
67   void SetQAArray(ULong_t * qa, Int_t qalength) ; 
68   void SetEventSpecies(Bool_t * es, Int_t eslength) ;
69   void AddEventTag(const AliEventTag &t);
70   void Clear(const char * opt = "");
71   void AddFileTag(AliFileTag *t);
72
73   void SetActiveTriggerClasses(TString str) { fActiveTriggerClasses = str; }
74
75   void CopyStandardContent(AliRunTag *oldtag);
76   void UpdateFromRunTable(AliRunTag *tabtag);
77
78   //____________________________________________________//
79   Int_t       GetRunId() const {return fAliceRunId;}
80   Float_t     GetMagneticField() const {return fAliceMagneticField;}
81   Float_t     GetDipoleField() const {return fAliceDipoleField;}
82   Int_t       GetRunStartTime() const {return fAliceRunStartTime;}
83   Int_t       GetRunStopTime() const {return fAliceRunStopTime;}
84   const char* GetAlirootVersion() const {return fAlirootVersion.Data();}
85   const char* GetRootVersion() const {return fRootVersion.Data();}
86   const char* GetGeant3Version() const {return fGeant3Version.Data();}
87   const char* GetLHCPeriod() const {return fLHCPeriod.Data();}
88   const char* GetReconstructionPass() const {return fRecPass.Data();}
89   const char* GetProductionName() const {return fProductionName.Data();}
90   Bool_t      GetRunValidation() const {return fAliceRunValidated;}
91   Int_t       GetRunQuality() const {return fAliceRunGlobalQuality;}
92   Float_t     GetBeamEnergy() const {return fAliceBeamEnergy;}
93   const char *GetBeamType() const {return fAliceBeamType.Data();}
94   Int_t       GetCalibVersion() const {return fAliceCalibrationVersion;}
95   Int_t       GetDataType() const {return fAliceDataType;}
96   Int_t       GetNEvents() const;
97   ULong_t     GetBeamTriggers() const {return fBeamTriggers;}
98   ULong_t     GetCollisionTriggers() const {return fCollisionTriggers;}
99   ULong_t     GetEmptyTriggers() const {return fEmptyTriggers;}
100   ULong_t     GetASideTriggers() const {return fASideTriggers;}
101   ULong_t     GetCSideTriggers() const {return fCSideTriggers;}
102   ULong_t     GetHMTriggers() const {return fHMTriggers;}
103   ULong_t     GetMuonTriggers() const {return fMuonTriggers;}
104   Float_t     GetCollisionRate() const {return fCollisionRate;}
105   Float_t     GetMeanVertex() const {return fMeanVertex;}
106   Float_t     GetVertexQuality() const {return fVertexQuality;}
107   AliLHCTag  *GetLHCTag() {return &fLHCTag; } 
108   AliDetectorTag *GetDetectorTags() {return &fDetectorTag;}
109   //  const TClonesArray *GetEventTags() const {return &fEventTag;}
110   const AliEventTag* GetEventTag(int evt) const;
111   AliFileTag *GetFileTagForEvent(int evt);
112   Int_t       GetNFiles() const { return fFileTags.GetEntries(); }
113   AliFileTag *GetFileTag(Int_t ifile) const {return (AliFileTag *) fFileTags.At(ifile);}
114   const AliQA *GetQA() const {return &fQA;}
115   ULong_t *  GetQAArray() const {return fQAArray;}      
116   Int_t      GetQALength() const { return fQALength ; }
117   Bool_t *   GetEventSpecies() const {return fEventSpecies;}    
118   Int_t      GetESLength() const { return fESLength ; }
119   Int_t      GetFileId(const char *guid);
120   
121   TString    GetActiveTriggerClasses() const {return fActiveTriggerClasses; }
122
123   //____________________________________________________//
124  private:
125   Int_t        fAliceRunId;              //the run id
126   Float_t      fAliceMagneticField;      //value of the magnetic field
127   Float_t      fAliceDipoleField;        //value of the magnetic field in dipole
128   Int_t        fAliceRunStartTime;       //run start date
129   Int_t        fAliceRunStopTime;        //run stop date
130   TString      fAlirootVersion;          //aliroot version
131   TString      fRootVersion;             //root version
132   TString      fGeant3Version;           //geant3 version
133   TString      fLHCPeriod;               //datataking period
134   TString      fRecPass;                 //Reconstruction pass number
135   TString      fProductionName;          //production name
136   Bool_t       fAliceRunValidated;       //validation script
137   Int_t        fAliceRunGlobalQuality;   //validation script
138   Float_t      fAliceBeamEnergy;         //beam energy cm
139   TString      fAliceBeamType;           //run type (pp, AA, pA)
140   Int_t        fAliceCalibrationVersion; //calibration version  
141   Int_t        fAliceDataType;           //0: simulation -- 1: data  
142 /*   Int_t        fNumEvents;               //number of events per file */
143   Int_t        fNumFiles;                //number of files in the run
144   ULong_t      fBeamTriggers;            //number of beam triggers in run (CBEAMB)
145   ULong_t      fCollisionTriggers;       //number of collision triggers in run (CINT1-B)
146   ULong_t      fEmptyTriggers;           //number of empty triggers in run (CINT1-E)
147   ULong_t      fASideTriggers;           //number of A-side triggers in run (CINT1-A)
148   ULong_t      fCSideTriggers;           //number of C-side triggers in run (CINT1-C)
149   ULong_t      fHMTriggers;              //number of High-Mult triggers
150   ULong_t      fMuonTriggers;            //number of Muon Triggers
151   Float_t      fCollisionRate;           //Average collision rate
152   Float_t      fMeanVertex;              //mean vertex position
153   Float_t      fVertexQuality;           //vertex quality
154   Int_t        fNumDetectors;            //number of detector configs per file
155   //  TClonesArray fEventTag;                //array with all event tags
156   //  TClonesArray fFileTags;                //array of file tags
157   //  AliFileTag **fFileTags;                //array of file tags
158   TObjArray    fFileTags;                //array of file tags
159   AliDetectorTag fDetectorTag;           //array with all the detector tags
160   AliLHCTag    fLHCTag;                  //LHC tag object
161   TString      fActiveTriggerClasses;    //Active trigger classes for run
162   AliQA        fQA;                      //needed for backward compaibility
163   Int_t        fQALength;                // Length of the fQA array  
164   ULong_t *    fQAArray ;                //[fQALength] QA objects's data        
165   Int_t        fESLength;                // Length of the Event Specie Length
166   Bool_t *     fEventSpecies;            //[fESLength] EventSpecies in this run 
167   
168
169   ClassDef(AliRunTag,9)  //(ClassName, ClassVersion)
170 };
171 //___________________________________________________________________________
172
173 #endif