24 using namespace genie;
60 if(this->
CheckPDGCode(pdg_code)) vector<int>::push_back(pdg_code);
67 vector<int>::insert(pos,n,pdg_code);
78 <<
"Can't add non-existent particle [pdgc = " << pdg_code <<
"]";
86 <<
"Particle [pdgc = " << pdg_code <<
"] was already added";
98 TParticlePDG * particle = pdglib->
Find(pdg_code);
99 if(!particle)
return false;
107 PDGCodeList::const_iterator bci = this->begin();
108 PDGCodeList::const_iterator eci = this->end();
110 if(find(bci,eci,pdg_code) != eci)
return true;
122 stream <<
"\n[-]" << endl;
126 PDGCodeList::const_iterator iter;
127 size_t nc = this->size();
129 for(iter = this->begin(); iter != this->end(); ++iter) {
130 int pdg_code = *iter;
131 TParticlePDG * p = pdglib->
Find(pdg_code);
134 stream <<
" |---o ** ERR: no particle with PDG code: " << pdg_code;
136 string name = p->GetName();
138 << setfill(
' ') << setw(15) << name
139 <<
" (PDG code = " << pdg_code <<
")";
141 if( (--nc) > 0) stream << endl;
149 PDGCodeList::const_iterator iter;
150 for(iter = list.begin(); iter != list.end(); ++iter) {
PDGCodeList & operator=(const PDGCodeList &list)
overloaded operators
bool ExistsInPDGCodeList(int pdg_code) const
PDGCodeList(bool allowdup=false)
bool fAllowDuplicateEntries
allow duplicate entries in the list?
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
static PDGLibrary * Instance(void)
Singleton class to load & serve a TDatabasePDG.
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
bool ExistsInPDGLibrary(int pdg_code) const
bool CheckPDGCode(int pdg_code) const
PDG code checks used by PDGCodeList.
vector< vector< double > > clear
TParticlePDG * Find(int pdgc, bool must_exist=true)
void Print(ostream &stream) const
void insert(iterator pos, size_type n, const int &x)
void Copy(const PDGCodeList &list)
copy / print
void push_back(int pdg_code)