]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliRunTag.cxx
Completely Updated (Mario Sitta)
[u/mrichter/AliRoot.git] / STEER / AliRunTag.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 //-----------------------------------------------------------------
19 //           Implementation of the RunTag class
20 //   This is the class to deal with the tags in the run level
21 //   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
22 //-----------------------------------------------------------------
23
24 #include "AliRunTag.h"
25 #include "AliDetectorTag.h"
26 #include "AliEventTag.h"
27
28 ClassImp(AliRunTag)
29
30 //___________________________________________________________________________
31   AliRunTag::AliRunTag() :
32     TObject(),
33     fAliceRunId(-1),
34     fAliceMagneticField(0.0),
35     fAliceRunStartTime(0),
36     fAliceRunStopTime(0),
37     fAlirootVersion(0),
38     fRootVersion(0),
39     fGeant3Version(0),
40     fAliceRunQuality(0),
41     fAliceBeamEnergy(0.0),
42     fAliceBeamType(0),
43     fAliceCalibrationVersion(0),
44     fAliceDataType(0),
45     fNumEvents(0),
46     fNumDetectors(0),
47     fEventTag("AliEventTag", 1000),
48     fDetectorTag(),
49     fLHCTag(), 
50     fQA()
51 {
52   //Default constructor
53 }
54
55 //___________________________________________________________________________
56 AliRunTag::~AliRunTag() {
57   //Destructor
58   fEventTag.Delete();
59 }
60
61 //___________________________________________________________________________
62 void AliRunTag::CopyStandardContent(AliRunTag *oldtag) {
63   //function that copies the run, lhc and detector levels
64   SetRunId(oldtag->GetRunId());
65   SetMagneticField(oldtag->GetMagneticField());
66   SetRunStartTime(oldtag->GetRunStartTime());
67   SetRunStopTime(oldtag->GetRunStopTime());
68   SetAlirootVersion(oldtag->GetAlirootVersion());
69   SetRootVersion(oldtag->GetRootVersion());
70   SetGeant3Version(oldtag->GetGeant3Version());
71   SetRunQuality(oldtag->GetRunQuality());
72   SetBeamEnergy(oldtag->GetBeamEnergy());
73   SetBeamType(oldtag->GetBeamType());
74   SetCalibVersion(oldtag->GetCalibVersion());
75   SetDataType(oldtag->GetDataType());
76   SetLHCTag(oldtag->GetLHCTag()->GetLuminosity(),oldtag->GetLHCTag()->GetLHCState());
77   SetDetectorTag(oldtag->GetDetectorTags()->GetIntDetectorMask());
78   SetQA(*(oldtag->GetQA())) ;   
79 }
80
81 //___________________________________________________________________________
82 void AliRunTag::SetLHCTag(Float_t lumin, TString type) {
83   //Setter for the LHC tags
84   fLHCTag.SetLHCTag(lumin,type);
85 }
86
87 //___________________________________________________________________________
88 void AliRunTag::SetDetectorTag(UInt_t mask) {
89   //Setter for the detector tags
90   fDetectorTag.SetDetectorMask(mask);
91 }
92
93 //___________________________________________________________________________
94 void AliRunTag::AddEventTag(const AliEventTag & EvTag) {
95   //Adds an entry to the event tag TClonesArray
96   new(fEventTag[fNumEvents++]) AliEventTag(EvTag);
97 }
98
99 //___________________________________________________________________________
100 void AliRunTag::Clear(const char *) {
101   //Resets the number of events and detectors
102   fEventTag.Clear();
103   fNumEvents = 0;
104   fDetectorTag.Clear();
105   fNumDetectors = 0;
106 }