16 #include <phparameter/PHParameters.h>
29 #include <boost/tokenizer.hpp>
33 #include <boost/version.hpp>
34 #if (__GNUC__ == 4 && __GNUC_MINOR__ == 4 && BOOST_VERSION == 105700)
35 #pragma GCC diagnostic ignored "-Wuninitialized"
36 #pragma message "ignoring bogus gcc warning in boost header lexical_cast.hpp"
37 #include <boost/lexical_cast.hpp>
38 #pragma GCC diagnostic warning "-Wuninitialized"
40 #include <boost/lexical_cast.hpp>
53 :
SubsysReco(
"PHG4InttDeadMapLoader_" + detector)
54 , m_detector(detector)
68 std::cerr <<
Name() <<
"::" <<
m_detector <<
"::" << __PRETTY_FUNCTION__
69 <<
"Run Node missing, doing nothing." << std::endl;
70 throw std::runtime_error(
"Failed to find Run node in RawTowerCalibration::CreateNodes");
84 InttDeadMap *deadmap = findNode::getClass<InttDeadMapv1>(DetNode, deadMapName);
89 DetNode->addNode(towerNode);
96 const unsigned int ilayer = pathiter.first;
106 for (
auto iter = in_par_ranges.first; iter != in_par_ranges.second; ++iter)
108 const string &deadChanName = iter->first;
112 cout <<
"HG4InttDeadMapLoader::InitRun - deadMapParam[" << deadChanName <<
"] = " << iter->second <<
": ";
115 boost::char_separator<char> sep(
"_");
116 boost::tokenizer<boost::char_separator<char> > tok(deadChanName, sep);
117 boost::tokenizer<boost::char_separator<char> >::const_iterator tokeniter;
119 for (tokeniter = tok.begin(); tokeniter != tok.end(); ++tokeniter)
121 if (*tokeniter ==
"INTT")
126 assert(tokeniter != tok.end());
127 int ladder_phi = boost::lexical_cast<
int>(*tokeniter);
130 assert(tokeniter != tok.end());
131 int ladder_z = boost::lexical_cast<
int>(*tokeniter);
134 assert(tokeniter != tok.end());
135 int strip_z = boost::lexical_cast<
int>(*tokeniter);
138 assert(tokeniter != tok.end());
139 int strip_phi = boost::lexical_cast<
int>(*tokeniter);
146 cout <<
"add Intt dead channel ladder_phi" << ladder_phi <<
" ladder_z" << ladder_z
147 <<
" strip_z" << strip_z <<
" strip_phi" << strip_phi;
154 cout <<
"skip " << deadChanName;
167 cout <<
"PHG4InttDeadMapLoader::" <<
m_detector <<
"::InitRun - loading " << counter <<
" dead channel for layer "
168 << ilayer <<
" from " << deadMapPath <<
". Total dead chan = " << deadmap->
size() << endl;
173 cout <<
"PHG4InttDeadMapLoader::" <<
m_detector <<
"::InitRun - loading dead map completed : ";