Bug fix. Removed delete statement
[u/mrichter/AliRoot.git] / STEER / AliRunInfo.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 //////////////////////////////////////////////////////////////////////////////
17 //                          Class AliRunInfo                                //
18 //   Container class for all the information related to LHCstate, run type, //
19 //   active detectors, beam energy etc.                                     //
20 //   It is used together with the AliEventInfo in order to provide          //
21 //   the AliRecoParam object with                                           //
22 //   the necessary information so that it can decide which instance of      //
23 //   AliDetectorRecoParam objects to use in reconstruction one particular   //
24 //   event.                                                                 //
25 //                                                                          //
26 //   cvetan.cheshkov@cern.ch 12/06/2008                                     //
27 //////////////////////////////////////////////////////////////////////////////
28
29 #include "AliRunInfo.h"
30
31 ClassImp(AliRunInfo)
32
33 //______________________________________________________________________________
34 AliRunInfo::AliRunInfo():
35   TObject(),
36   fLHCState("UNKNOWN"),
37   fBeamType("UNKNOWN"),
38   fBeamEnergy(0),
39   fRunType("UNKNOWN"),
40   fActiveDetectors(0)
41 {
42   // default constructor
43   // ...
44 }
45
46 //______________________________________________________________________________
47 AliRunInfo::AliRunInfo(const char *lhcState,
48                        const char *beamType,
49                        Float_t beamEnergy,
50                        const char *runType,
51                        UInt_t activeDetectors):
52   TObject(),
53   fLHCState(lhcState),
54   fBeamType(beamType),
55   fBeamEnergy(beamEnergy),
56   fRunType(runType),
57   fActiveDetectors(activeDetectors)
58 {
59   // constructor
60   // ...
61 }
62
63 //______________________________________________________________________________
64 AliRunInfo::AliRunInfo(const AliRunInfo &evInfo):
65   TObject(evInfo),
66   fLHCState(evInfo.fLHCState),
67   fBeamType(evInfo.fBeamType),
68   fBeamEnergy(evInfo.fBeamEnergy),
69   fRunType(evInfo.fRunType),
70   fActiveDetectors(evInfo.fActiveDetectors)
71 {
72   // Copy constructor
73   // ...
74 }
75
76 //_____________________________________________________________________________
77 AliRunInfo &AliRunInfo::operator =(const AliRunInfo& evInfo)
78 {
79   // assignment operator
80   // ...
81   if(this==&evInfo) return *this;
82   ((TObject *)this)->operator=(evInfo);
83
84   fLHCState = evInfo.fLHCState;
85   fBeamType = evInfo.fBeamType;
86   fBeamEnergy = evInfo.fBeamEnergy;
87   fRunType = evInfo.fRunType;
88   fActiveDetectors = evInfo.fActiveDetectors;
89
90   return *this;
91 }