]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliRunTag.cxx
Callback function for additional information about the stamp (Marian)
[u/mrichter/AliRoot.git] / STEER / AliRunTag.cxx
CommitLineData
f3a97c86 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
f3a97c86 24#include "AliRunTag.h"
f3a97c86 25#include "AliDetectorTag.h"
26#include "AliEventTag.h"
27
28ClassImp(AliRunTag)
29
bec9a2e7 30//___________________________________________________________________________
17a9d008 31 AliRunTag::AliRunTag() :
32 TObject(),
33 fAliceRunId(-1),
34 fAliceMagneticField(0.0),
35 fAliceRunStartTime(0),
36 fAliceRunStopTime(0),
bec9a2e7 37 fAlirootVersion(0),
38 fRootVersion(0),
39 fGeant3Version(0),
17a9d008 40 fAliceRunQuality(0),
41 fAliceBeamEnergy(0.0),
bec9a2e7 42 fAliceBeamType(0),
17a9d008 43 fAliceCalibrationVersion(0),
44 fAliceDataType(0),
45 fNumEvents(0),
46 fNumDetectors(0),
47 fEventTag("AliEventTag", 1000),
c5caed45 48 fDetectorTag(),
17a9d008 49 fLHCTag()
f3a97c86 50{
e16601cf 51 //Default constructor
f3a97c86 52}
53
bec9a2e7 54//___________________________________________________________________________
55AliRunTag::~AliRunTag() {
17a9d008 56 //Destructor
57 fEventTag.Delete();
f3a97c86 58}
59
4c117ffd 60//___________________________________________________________________________
61void AliRunTag::CopyStandardContent(AliRunTag *oldtag) {
62 //function that copies the run, lhc and detector levels
63 SetRunId(oldtag->GetRunId());
64 SetMagneticField(oldtag->GetMagneticField());
65 SetRunStartTime(oldtag->GetRunStartTime());
66 SetRunStopTime(oldtag->GetRunStopTime());
67 SetAlirootVersion(oldtag->GetAlirootVersion());
68 SetRootVersion(oldtag->GetRootVersion());
69 SetGeant3Version(oldtag->GetGeant3Version());
70 SetRunQuality(oldtag->GetRunQuality());
71 SetBeamEnergy(oldtag->GetBeamEnergy());
72 SetBeamType(oldtag->GetBeamType());
73 SetCalibVersion(oldtag->GetCalibVersion());
74 SetDataType(oldtag->GetDataType());
75 SetLHCTag(oldtag->GetLHCTag()->GetLuminosity(),oldtag->GetLHCTag()->GetLHCState());
52314abc 76 SetDetectorTag(oldtag->GetDetectorTags()->GetIntDetectorMask());
4c117ffd 77}
78
bec9a2e7 79//___________________________________________________________________________
c5caed45 80void AliRunTag::SetLHCTag(Float_t lumin, TString type) {
e16601cf 81 //Setter for the LHC tags
f3a97c86 82 fLHCTag.SetLHCTag(lumin,type);
83}
84
bec9a2e7 85//___________________________________________________________________________
c5caed45 86void AliRunTag::SetDetectorTag(UInt_t mask) {
e16601cf 87 //Setter for the detector tags
c5caed45 88 fDetectorTag.SetDetectorMask(mask);
f3a97c86 89}
90
bec9a2e7 91//___________________________________________________________________________
92void AliRunTag::AddEventTag(const AliEventTag & EvTag) {
e16601cf 93 //Adds an entry to the event tag TClonesArray
17a9d008 94 new(fEventTag[fNumEvents++]) AliEventTag(EvTag);
f3a97c86 95}
96
bec9a2e7 97//___________________________________________________________________________
98void AliRunTag::Clear(const char *) {
e16601cf 99 //Resets the number of events and detectors
bec9a2e7 100 fEventTag.Clear();
f3a97c86 101 fNumEvents = 0;
bec9a2e7 102 fDetectorTag.Clear();
f3a97c86 103 fNumDetectors = 0;
104}