Update master to aliroot
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliLHCTag.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 LHCTag class
20 //   This is the class to deal with the tags in the LHC level
21 //   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
22 //-----------------------------------------------------------------
23
24 #include "AliLHCTag.h"
25
26 ClassImp(AliLHCTag)
27
28 //___________________________________________________________________________
29   AliLHCTag::AliLHCTag() : 
30     TObject(),  
31     fLHCState(0),
32     fLHCLuminosity(-10.),
33     fNBunches(0),
34     fFillingScheme(),
35     fFillNo(-1),
36     fBeamEnergy(-1.0),
37     fBunchIntensity(0.0)
38 {
39   // AliLHCTag default constructor
40 }
41
42 AliLHCTag::AliLHCTag(const AliLHCTag &tag):
43   TObject(tag),
44   fLHCState(tag.fLHCState),
45   fLHCLuminosity(tag.fLHCLuminosity),
46   fNBunches(tag.fNBunches),
47   fFillingScheme(tag.fFillingScheme),
48   fFillNo(tag.fFillNo),
49   fBeamEnergy(tag.fBeamEnergy),
50   fBunchIntensity(tag.fBunchIntensity)
51 {
52 }
53
54 AliLHCTag &AliLHCTag::operator=(const AliLHCTag &tag)
55 {
56   if (this != &tag) {
57     TObject::operator=(tag);
58
59     TString state(tag.GetLHCState());
60     SetLHCState(state);
61     SetLuminosity(tag.GetLuminosity());
62     SetNBunches(tag.GetNBunches());
63     SetFillingScheme(tag.GetFillingScheme());
64     SetFillNo(tag.GetFillNo());
65     SetBeamEnergy(tag.GetBeamEnergy());
66     SetBunchIntensity(tag.GetBunchIntensity());
67   }
68
69   return *this;
70 }
71
72 void AliLHCTag::UpdateFromRunTable(AliLHCTag &tag)
73 {
74   SetNBunches(tag.GetNBunches());
75   SetFillingScheme(tag.GetFillingScheme());
76   SetFillNo(tag.GetFillNo());
77   SetBeamEnergy(tag.GetBeamEnergy());
78   SetBunchIntensity(tag.GetBunchIntensity());  
79 }
80
81 //___________________________________________________________________________
82 AliLHCTag::~AliLHCTag() {
83   // AliEventTag destructor
84 }