GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NDB.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (c) IPNL, IN2P3, CNRS *
3  * Contibutor(s) : *
4  * Jeremie Dudouet dudouet(AT)ipnl.in2p3.fr [2014] *
5  * Olivier Stezowski stezow(AT)ipnl.in2p3.fr [2014] *
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ***************************************************************************/
22 
25 #include "TString.h"
26 
27 #include "Env.h"
28 #include "BashColor.h"
29 
30 #include "NDB.h"
31 
32 using namespace Gw;
33 using namespace std;
34 
36  TNamed(),
37  Emmiter(""),
38  Daughter(""),
39  DecayMode(""),
40  RadSubType(""),
41  LifeTime(0x0),
42  Energy(0x0),
43  Intensity(0x0)
44 {
45 
46 }
47 
48 GammaSourceRay::GammaSourceRay(const char * name, const char * title) :
49  TNamed(name, title),
50  Emmiter(""),
51  Daughter(""),
52  DecayMode(""),
53  RadSubType(""),
54  LifeTime(0x0),
55  Energy(0x0),
56  Intensity(0x0)
57 {
58 
59 }
60 
62  TNamed(g),
63  Emmiter(g.Emmiter),
64  Daughter(g.Daughter),
65  DecayMode(g.DecayMode),
66  RadSubType(g.RadSubType),
67  LifeTime(new Measure<Double_t>(*g.LifeTime)),
68  Energy(new Measure<Double_t>(*g.Energy)),
69  Intensity(new Measure<Double_t>(*g.Intensity))
70 {
71 
72 }
73 
74 
76 {
77  if(LifeTime) delete LifeTime;
78  if(Energy) delete Energy;
79  if(Intensity) delete Intensity;
80 }
81 
83  VirtualNDB(),
84  TNamed("ConcreteNDB","ConcreteNDB"),
85  fBashColor(new BashColor()),
86  fDataBasePath(Gw::Env::GetPath("NdbPath"))
87 {
88 }
89 
90 ConcreteNDB::ConcreteNDB(const char * name, const char * title) :
91  VirtualNDB(),
92  TNamed(name,title),
93  fBashColor(new BashColor()),
94  fDataBasePath(Gw::Env::GetPath("NdbPath"))
95 {
96 }
97 
98 void ConcreteNDB::SetDataBasePath(TString path)
99 {
100  fDataBasePath = path;
101  Init();
102 }
103 
ClassImp(GammaSourceRay)
Definition: Env.h:49
Measure< Double_t > * LifeTime
Definition: NDB.h:51
virtual void Init()
Definition: NDB.h:93
virtual ~GammaSourceRay()
Definition: NDB.cpp:75
Measure< Double_t > * Energy
Definition: NDB.h:52
to get information about the gammaware configuration
Measure< Double_t > * Intensity
Definition: NDB.h:53
A general measure with an associated error.
Definition: Measure.h:54
TString fDataBasePath
Definition: NDB.h:86
void SetDataBasePath(TString path)
Definition: NDB.cpp:98