X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=STEER%2FAliRunTag.cxx;h=bf1ee72e78730092722095c2d2f7802d9b23779d;hb=07d955deedabdc3187198fc7fc09e02b1f1f7064;hp=3d889f14c438e9642109f535a3567a89c291ef82;hpb=cb1645b735de2294aecccbf89b647c3a1a3ec9cc;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliRunTag.cxx b/STEER/AliRunTag.cxx index 3d889f14c43..bf1ee72e787 100644 --- a/STEER/AliRunTag.cxx +++ b/STEER/AliRunTag.cxx @@ -21,68 +21,65 @@ // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch //----------------------------------------------------------------- -#include -#include - #include "AliRunTag.h" -#include "AliLHCTag.h" #include "AliDetectorTag.h" #include "AliEventTag.h" ClassImp(AliRunTag) -TClonesArray *AliRunTag::fgEvents = 0; -TClonesArray *AliRunTag::fgDetectors = 0; - -//______________________________________________________________________________ -AliRunTag::AliRunTag() +//___________________________________________________________________________ + AliRunTag::AliRunTag() : + TObject(), + fAliceRunId(-1), + fAliceMagneticField(0.0), + fAliceRunStartTime(0), + fAliceRunStopTime(0), + fAlirootVersion(0), + fRootVersion(0), + fGeant3Version(0), + fAliceRunQuality(0), + fAliceBeamEnergy(0.0), + fAliceBeamType(0), + fAliceCalibrationVersion(0), + fAliceDataType(0), + fNumEvents(0), + fNumDetectors(0), + fEventTag("AliEventTag", 1000), + fDetectorTag(), + fLHCTag() { - if (!fgEvents) fgEvents = new TClonesArray("AliEventTag", 1000); - fEventTag = fgEvents; - fNumEvents = 0; - - if (!fgDetectors) fgDetectors = new TClonesArray("AliDetectorTag", 1000); - fDetectorTag = fgDetectors; - fNumDetectors = 0; - - fAliceMagneticField = 0.0; - fAliceRunStartTime = 0; - fAliceRunStopTime = 0; - fAliceReconstructionVersion = 0; - fAliceRunQuality = 0; - fAliceBeamEnergy = 0.0; - fAliceCalibrationVersion = 0; - fAliceDataType = 0; + //Default constructor } -//______________________________________________________________________________ -AliRunTag::~AliRunTag() -{ +//___________________________________________________________________________ +AliRunTag::~AliRunTag() { + //Destructor + fEventTag.Delete(); } -//______________________________________________________________________________ -void AliRunTag::SetLHCTag(Float_t lumin, char *type) -{ +//___________________________________________________________________________ +void AliRunTag::SetLHCTag(Float_t lumin, TString type) { + //Setter for the LHC tags fLHCTag.SetLHCTag(lumin,type); } -//______________________________________________________________________________ -void AliRunTag::SetDetectorTag(AliDetectorTag *DetTag) -{ - TClonesArray &detectors = *fDetectorTag; - new(detectors[fNumDetectors++]) AliDetectorTag(DetTag); +//___________________________________________________________________________ +void AliRunTag::SetDetectorTag(UInt_t mask) { + //Setter for the detector tags + fDetectorTag.SetDetectorMask(mask); } -//______________________________________________________________________________ -void AliRunTag::AddEventTag(const AliEventTag & EvTag) -{ - TClonesArray &events = *fEventTag; - new(events[fNumEvents++]) AliEventTag(EvTag); +//___________________________________________________________________________ +void AliRunTag::AddEventTag(const AliEventTag & EvTag) { + //Adds an entry to the event tag TClonesArray + new(fEventTag[fNumEvents++]) AliEventTag(EvTag); } -//______________________________________________________________________________ -void AliRunTag::Clear(const char *) -{ +//___________________________________________________________________________ +void AliRunTag::Clear(const char *) { + //Resets the number of events and detectors + fEventTag.Clear(); fNumEvents = 0; + fDetectorTag.Clear(); fNumDetectors = 0; }