18 #include <HepPDT/HeavyIonUnknownID.hh>
22 #include <boost/algorithm/string/case_conv.hpp>
23 #include <boost/tokenizer.hpp>
31 error() <<
"Could not initialize main svc" <<
endmsg;
37 typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
38 boost::char_separator<char> sep(
", " );
39 boost::char_separator<char> sep_eq(
"=" );
41 tokenizer tokens(
key, sep );
42 for (
auto it = tokens.begin(); it != tokens.end(); ++it ) {
44 tokenizer tok2( *it, sep_eq );
47 auto it2 = tok2.begin();
51 info() <<
"No table format type specified for \"" << fname <<
"\". Assuming PDG" <<
endmsg;
60 if ( rfile.
empty() ) {
61 error() <<
"Could not find PDT file: \"" << fname <<
"\" in $DATAPATH" <<
endmsg;
68 error() <<
"Could not open PDT file: \"" << rfile <<
"\"" <<
endmsg;
78 error() <<
"Could not determine Particle Property table type: \"" << FMT <<
"\" for file \"" << fname <<
"\""
83 debug() <<
"Adding PDT file \"" << rfile <<
"\" type " << FMT <<
endmsg;
106 if ( status.
isSuccess() ) { debug() <<
"Service finalised successfully" <<
endmsg; }
114 static const auto table = {
121 error() <<
"Unknown Particle Data file type: \"" << typ <<
"\"" <<
endmsg;
139 HepPDT::TableBuilder tb( *
m_pdt );
141 for (
const auto& itr :
m_inputs ) {
142 const auto& f = itr.first;
143 const auto& pF = itr.second;
145 debug() <<
"Reading PDT file \"" << f <<
"\"" <<
endmsg;
149 if ( !pF( pdfile, tb ) ) {
150 error() <<
"Error reading PDT file: \"" << f <<
"\"" <<
endmsg;
163 debug() <<
"creating ParticleDataTable" <<
endmsg;
165 fatal() <<
"Could not create ParticleDataTable" <<
endmsg;
177 error() <<
"not setting Unknown Particle Handler \"" <<
n <<
"\" as ParticleDataTable already instantiated"
182 debug() <<
"setting Unknown Particle Handler \"" <<
n <<
"\" at " << puid <<
endmsg;
185 warning() <<
"overriding previously selected Unknown Particle Handler \"" <<
m_upid_name <<
"\" with \"" <<
n