]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliRunTag.cxx
New event tag classes (P.Christakoglou)
[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
24#include <stdlib.h>
25#include <Riostream.h>
26
27#include "AliRunTag.h"
28#include "AliLHCTag.h"
29#include "AliDetectorTag.h"
30#include "AliEventTag.h"
31
32ClassImp(AliRunTag)
33
34TClonesArray *AliRunTag::fgEvents = 0;
35TClonesArray *AliRunTag::fgDetectors = 0;
36
37//______________________________________________________________________________
38AliRunTag::AliRunTag()
39{
40 if (!fgEvents) fgEvents = new TClonesArray("AliEventTag", 1000);
41 fEventTag = fgEvents;
42 fNumEvents = 0;
43
44 if (!fgDetectors) fgDetectors = new TClonesArray("AliDetectorTag", 1000);
45 fDetectorTag = fgDetectors;
46 fNumDetectors = 0;
47
48 fAliceMagneticField = 0.0;
49 fAliceRunStartTime = 0;
50 fAliceRunStopTime = 0;
51 fAliceReconstructionVersion = 0;
52 fAliceRunQuality = 0;
53 fAliceBeamEnergy = 0.0;
54 fAliceCalibrationVersion = 0;
55 fAliceDataType = 0;
56}
57
58//______________________________________________________________________________
59AliRunTag::~AliRunTag()
60{
61}
62
63//______________________________________________________________________________
64void AliRunTag::SetLHCTag(Float_t lumin, char *type)
65{
66 fLHCTag.SetLHCTag(lumin,type);
67}
68
69//______________________________________________________________________________
70void AliRunTag::SetDetectorTag(AliDetectorTag *DetTag)
71{
72 TClonesArray &detectors = *fDetectorTag;
73 new(detectors[fNumDetectors++]) AliDetectorTag(DetTag);
74}
75
76//______________________________________________________________________________
77void AliRunTag::AddEventTag(AliEventTag *EvTag)
78{
79 TClonesArray &events = *fEventTag;
80 new(events[fNumEvents++]) AliEventTag(EvTag);
81}
82
83//______________________________________________________________________________
84void AliRunTag::Clear(const char *)
85{
86 fNumEvents = 0;
87 fNumDetectors = 0;
88}