4 #pragma warning(disable:1572)
8 #include "GaudiKernel/ISvcLocator.h"
9 #include "GaudiKernel/MsgStream.h"
10 #include "GaudiKernel/PathResolver.h"
11 #include "GaudiKernel/Tokenizer.h"
16 #include "HepPDT/HeavyIonUnknownID.hh"
26 std::transform(s.begin(), s.end(), s.begin(),
33 :
base_class( name, svc ), m_upid(0), m_pdt(0), m_log(msgSvc(), name),
63 tok.
analyse( key,
" ",
"",
"",
"=",
"",
"");
65 for ( Tokenizer::Items::iterator
i = tok.
items().begin();
67 const std::string& fname = (*i).tag();
73 <<
"\" in $DATAPATH" <<
endmsg;
79 std::ifstream pdfile( rfile.c_str() );
93 m_log <<
MSG::INFO <<
"No table format type specified for \"" << fname
94 <<
"\". Assuming PDG" <<
endmsg;
98 bool (*pF) (std::istream &,
99 HepPDT::TableBuilder &);
104 <<
"Could not determine Particle Property table type: \""
105 << val <<
"\" for file \"" << fname <<
"\"" <<
endmsg;
112 m_inputs.push_back( make_pair( rfile, pF ) );
159 HepPDT::TableBuilder&) {
161 bool (*pF) (std::istream &,
162 HepPDT::TableBuilder &);
165 pF = &HepPDT::addPDGParticles;
166 }
else if (typ ==
"PYTHIA") {
167 pF = &HepPDT::addPythiaParticles;
168 }
else if (typ ==
"EVTGEN") {
169 pF = &HepPDT::addEvtGenParticles;
170 }
else if (typ ==
"HERWIG") {
171 pF = &HepPDT::addHerwigParticles;
172 }
else if (typ ==
"ISAJET") {
173 pF = &HepPDT::addIsajetParticles;
174 }
else if (typ ==
"QQ") {
175 pF = &HepPDT::addQQParticles;
177 m_log <<
MSG::ERROR <<
"Unknown Particle Data file type: \""
179 throw( std::runtime_error(
"error parsing particle table type") );
194 "Default Heavy Ion Handler");
200 HepPDT::TableBuilder tb( *
m_pdt );
203 bool(*) (std::istream&,HepPDT::TableBuilder&)> >::const_iterator itr;
205 string f = itr->first;
206 bool (*pF) (std::istream&,HepPDT::TableBuilder&) = itr->second;
211 std::ifstream pdfile( f.c_str() );
213 if ( ! pF(pdfile,tb) ) {
227 HepPDT::ParticleDataTable*
245 const std::string&
n) {
248 <<
"\" as ParticleDataTable already instantiated" <<
endmsg;
253 <<
"\" at " << puid <<
endmsg;
257 <<
"overriding previously selected Unknown Particle Handler \""