]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliRunTag.h
Coding conventions
[u/mrichter/AliRoot.git] / STEER / AliRunTag.h
index 12f036ac7a1821f75cd4e870a469fd02eff5b1a9..d1a4ce86790c2667503d63f92f0eb917beff9cc3 100644 (file)
 //    Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
 //-------------------------------------------------------------------------
 
-#include <stdlib.h>
-#include <Riostream.h>
-
 #include "TObject.h"
-#include "TClonesArray.h"
 
-#include "AliEventTag.h"
 #include "AliLHCTag.h"
-#include "AliDetectorTag.h"
+
+class AliEventTag;
+class AliDetectorTag;
 
 
 //______________________________________________________________________________
 class AliRunTag : public TObject
 {
- private:
-  Int_t    fAliceRunId;                   //the run id
-  Float_t  fAliceMagneticField;           //value of the magnetic field
-  Int_t    fAliceRunStartTime;            //run start date
-  Int_t    fAliceRunStopTime;             //run stop date
-  Int_t    fAliceReconstructionVersion;   //reco version
-  Bool_t   fAliceRunQuality;              //validation script
-  Float_t  fAliceBeamEnergy;              //beam energy cm
-  Char_t   fAliceBeamType[5];             //run type (pp, AA, pA)
-  Int_t    fAliceCalibrationVersion;      //calibration version
-  
-  Int_t  fAliceDataType;              //0: simulation -- 1: data
-  
-  Int_t    fNumEvents;                    //number of events per file
-  Int_t    fNumDetectors;                 //number of detector configs per file
-  TClonesArray  *fEventTag;               //array with all event tags
-  TClonesArray  *fDetectorTag;            //array with all the detector tags
-  
-  AliLHCTag   fLHCTag;
-  
-  static TClonesArray *fgEvents;
-  static TClonesArray *fgDetectors;
-  
  public:
   AliRunTag();
   virtual ~AliRunTag();
@@ -61,7 +35,7 @@ class AliRunTag : public TObject
   void          SetRecoVersion(Int_t Pn) {fAliceReconstructionVersion = Pn;}
   void          SetRunQuality(Int_t Pn) {fAliceRunQuality = Pn;}
   void          SetBeamEnergy(Float_t PE) {fAliceBeamEnergy = PE;}
-  void          SetBeamType(char *Ptype) {strcpy(fAliceBeamType,Ptype);}
+  void          SetBeamType(const char *Ptype) {fAliceBeamType = Ptype;}
   void          SetCalibVersion(Int_t Pn) {fAliceCalibrationVersion = Pn;}
   
   void          SetDataType(Int_t i) {fAliceDataType = i;}
@@ -69,28 +43,52 @@ class AliRunTag : public TObject
   void          SetNEvents(Int_t Pn) { fNumEvents = Pn; }
   
   void          SetLHCTag(Float_t Plumin, char *type);
-  void          SetDetectorTag(AliDetectorTag *t);
+  void          SetDetectorTag(const AliDetectorTag &t);
   void          AddEventTag(const AliEventTag &t);
   void          Clear(const char * opt = "");
   
   
-  Int_t         GetRunId() {return fAliceRunId;}
-  Float_t       GetMagneticField() {return fAliceMagneticField;}
-  Int_t         GetRunStartTime() {return fAliceRunStartTime;}
-  Int_t         GetRunStopTime() {return fAliceRunStopTime;}
-  Int_t         GetRecoVersion() {return fAliceReconstructionVersion;}
-  Int_t         GetRunQuality() {return fAliceRunQuality;}
-  Float_t       GetBeamEnergy() {return fAliceBeamEnergy;}
-  char         *GetBeamType() {return fAliceBeamType;}
-  Int_t         GetCalibVersion() {return fAliceCalibrationVersion;}
+  Int_t         GetRunId() const {return fAliceRunId;}
+  Float_t       GetMagneticField() const {return fAliceMagneticField;}
+  Int_t         GetRunStartTime() const {return fAliceRunStartTime;}
+  Int_t         GetRunStopTime() const {return fAliceRunStopTime;}
+  Int_t         GetRecoVersion() const {return fAliceReconstructionVersion;}
+  Int_t         GetRunQuality() const {return fAliceRunQuality;}
+  Float_t       GetBeamEnergy() const {return fAliceBeamEnergy;}
+  const char   *GetBeamType() const {return fAliceBeamType;}
+  Int_t         GetCalibVersion() const {return fAliceCalibrationVersion;}
   
-  Int_t GetDataType() {return fAliceDataType;}
+  Int_t GetDataType() const {return fAliceDataType;}
 
   Int_t         GetNEvents() const {return fNumEvents;}
   
-  AliLHCTag    *GetLHCTag() { return &fLHCTag; } 
+  AliLHCTag    *GetLHCTag() {return &fLHCTag; } 
   TClonesArray *GetEventTags() const {return fEventTag;}
 
+ private:
+  Int_t    fAliceRunId;                   //the run id
+  Float_t  fAliceMagneticField;           //value of the magnetic field
+  Int_t    fAliceRunStartTime;            //run start date
+  Int_t    fAliceRunStopTime;             //run stop date
+  Int_t    fAliceReconstructionVersion;   //reco version
+  Bool_t   fAliceRunQuality;              //validation script
+  Float_t  fAliceBeamEnergy;              //beam energy cm
+  const char *fAliceBeamType;             //run type (pp, AA, pA)
+  Int_t    fAliceCalibrationVersion;      //calibration version
+  
+  Int_t  fAliceDataType;                  //0: simulation -- 1: data
+  
+  Int_t    fNumEvents;                    //number of events per file
+  Int_t    fNumDetectors;                 //number of detector configs per file
+  TClonesArray  *fEventTag;               //array with all event tags
+  TClonesArray  *fDetectorTag;            //array with all the detector tags
+  
+  AliLHCTag   fLHCTag;                    //LHC tag object
+  
+  static TClonesArray *fgEvents;          //static Event tag TClonesArray
+  static TClonesArray *fgDetectors;       //static Detector tag TClonesArray
+  
+
   ClassDef(AliRunTag,1)  //(ClassName, ClassVersion)
 };
 //______________________________________________________________________________