14 # pragma warning( disable : 1572 )
24 #include "HepPDT/HeavyIonUnknownID.hh"
28 #include <boost/algorithm/string/case_conv.hpp>
29 #include <boost/tokenizer.hpp>
37 error() <<
"Could not initialize main svc" <<
endmsg;
43 typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
44 boost::char_separator<char> sep(
", " );
45 boost::char_separator<char> sep_eq(
"=" );
47 tokenizer tokens(
key, sep );
48 for (
auto it = tokens.begin(); it != tokens.end(); ++it ) {
50 tokenizer tok2( *it, sep_eq );
53 auto it2 = tok2.begin();
57 info() <<
"No table format type specified for \"" << fname <<
"\". Assuming PDG" <<
endmsg;
66 if ( rfile.
empty() ) {
67 error() <<
"Could not find PDT file: \"" << fname <<
"\" in $DATAPATH" <<
endmsg;
74 error() <<
"Could not open PDT file: \"" << rfile <<
"\"" <<
endmsg;
84 error() <<
"Could not determine Particle Property table type: \"" << FMT <<
"\" for file \"" << fname <<
"\""
89 debug() <<
"Adding PDT file \"" << rfile <<
"\" type " << FMT <<
endmsg;
112 if ( status.
isSuccess() ) { debug() <<
"Service finalised successfully" <<
endmsg; }
120 static const auto table = {
127 error() <<
"Unknown Particle Data file type: \"" << typ <<
"\"" <<
endmsg;
145 HepPDT::TableBuilder tb( *
m_pdt );
147 for (
const auto& itr :
m_inputs ) {
148 const auto& f = itr.first;
149 const auto& pF = itr.second;
151 debug() <<
"Reading PDT file \"" << f <<
"\"" <<
endmsg;
155 if ( !pF( pdfile, tb ) ) {
156 error() <<
"Error reading PDT file: \"" << f <<
"\"" <<
endmsg;
169 debug() <<
"creating ParticleDataTable" <<
endmsg;
171 fatal() <<
"Could not create ParticleDataTable" <<
endmsg;
183 error() <<
"not setting Unknown Particle Handler \"" <<
n <<
"\" as ParticleDataTable already instantiated"
188 debug() <<
"setting Unknown Particle Handler \"" <<
n <<
"\" at " << puid <<
endmsg;
191 warning() <<
"overriding previously selected Unknown Particle Handler \"" <<
m_upid_name <<
"\" with \"" <<
n