GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TSourceList.cxx
Go to the documentation of this file.
1#include "TSourceList.h"
2#include "TCalPoint.h"
3
4#include <iostream>
5
10
11TSourceList::TSourceList(const char* name, const char* title) : TCalList(name, title)
12{
13 Clear();
14 SetNucleus(TNucleus(name));
15}
16
17TSourceList::TSourceList(const TNucleus& nuc, const char* name, const char* title) : TCalList(name, title)
18{
19 Clear();
20 SetNucleus(nuc);
21}
22
24{
25 copy.Copy(*this);
26}
27
29{
30 Clear();
31 SetNucleus(nuc);
32}
33
34void TSourceList::Copy(TObject& obj) const
35{
36 TCalList::Copy(obj);
37}
38
39void TSourceList::Print(Option_t*) const
40{
41 std::cout << "Nucleus: " << fNucleusName << std::endl;
43}
44
45void TSourceList::Clear(Option_t*)
46{
48 fNucleusName.clear();
49}
50
52{
53 fNucleusName = nuc.GetName();
54
55 Int_t good_counter = 0;
56 const TList* transition_list = nuc.GetTransitionList();
57 TIter next(transition_list);
58 TObject* transition = nullptr;
59 std::cout << "Adding Transitions..." << std::endl;
60 while((transition = next()) != nullptr) {
61 transition->Print();
62 if(AddTransition(static_cast<TTransition*>(transition))) {
63 good_counter++;
64 }
65 }
66 return good_counter;
67}
68
70{
71 if(tran == nullptr) {
72 std::cout << "Trying to add a bad transition" << std::endl;
73 return false;
74 }
75
78
79 return true;
80}
void Copy(TObject &obj) const override
Definition TCalList.cxx:21
void AddPoint(const TCalPoint &point)
Definition TCalList.cxx:30
void Print(Option_t *opt="") const override
Definition TCalList.cxx:56
void Clear(Option_t *opt="") override
Definition TCalList.cxx:66
const TSortedList * GetTransitionList() const
Definition TNucleus.h:84
Int_t SetNucleus(const TNucleus &nuc)
void Copy(TObject &obj) const override
std::string fNucleusName
Definition TSourceList.h:37
bool AddTransition(TTransition *tran)
void Clear(Option_t *opt="") override
void Print(Option_t *opt="") const override
double GetIntensityUncertainty() const
Definition TTransition.h:49
double GetIntensity() const
Definition TTransition.h:48
double GetEnergyUncertainty() const
Definition TTransition.h:47
double GetEnergy() const
Definition TTransition.h:46