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