33 using namespace genie;
76 vector<int>::insert(pos,n,pdg_code);
87 <<
"Can't add non-existent particle [pdgc = " << pdg_code <<
"]";
95 <<
"Particle [pdgc = " << pdg_code <<
"] was already added";
107 TParticlePDG * particle = pdglib->
Find(pdg_code);
108 if(!particle)
return false;
116 PDGCodeList::const_iterator bci = this->begin();
117 PDGCodeList::const_iterator eci = this->
end();
119 if(find(bci,eci,pdg_code) != eci)
return true;
131 stream <<
"\n[-]" <<
endl;
135 PDGCodeList::const_iterator iter;
138 for(iter = this->begin(); iter != this->
end(); ++iter) {
139 int pdg_code = *iter;
140 TParticlePDG *
p = pdglib->
Find(pdg_code);
143 stream <<
" |---o ** ERR: no particle with PDG code: " << pdg_code;
145 string name = p->GetName();
147 << setfill(
' ') << setw(15) << name
148 <<
" (PDG code = " << pdg_code <<
")";
150 if( (--nc) > 0) stream <<
endl;
158 PDGCodeList::const_iterator iter;
159 for(iter = list.begin(); iter != list.end(); ++iter) {
THE MAIN GENIE PROJECT NAMESPACE
PDGCodeList & operator=(const PDGCodeList &list)
overloaded operators
vector< vector< double > > clear
bool ExistsInPDGCodeList(int pdg_code) const
PDGCodeList(bool allowdup=false)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic >::Index size_type
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...
base_types push_back(int_type())
static PDGLibrary * Instance(void)
Singleton class to load & serve a TDatabasePDG.
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
TParticlePDG * Find(int pdgc)
bool ExistsInPDGLibrary(int pdg_code) const
bool CheckPDGCode(int pdg_code) const
PDG code checks used by PDGCodeList.
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)