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>
51 :
SubsysReco(
"PHG4InttDeadMapLoader_" + detector)
52 , m_detector(detector)
62 std::cout <<
Name() <<
"::" <<
m_detector <<
"::" << __PRETTY_FUNCTION__
63 <<
"Run Node missing, doing nothing." << std::endl;
64 throw std::runtime_error(
"Failed to find Run node in RawTowerCalibration::CreateNodes");
78 InttDeadMap *deadmap = findNode::getClass<InttDeadMapv1>(DetNode, deadMapName);
83 DetNode->addNode(towerNode);
90 const unsigned int ilayer = pathiter.first;
100 for (
auto iter = in_par_ranges.first; iter != in_par_ranges.second; ++iter)
106 std::cout <<
"HG4InttDeadMapLoader::InitRun - deadMapParam[" << deadChanName <<
"] = " << iter->second <<
": ";
109 boost::char_separator<char> sep(
"_");
110 boost::tokenizer<boost::char_separator<char> > tok(deadChanName, sep);
111 boost::tokenizer<boost::char_separator<char> >::const_iterator tokeniter;
113 for (tokeniter = tok.begin(); tokeniter != tok.end(); ++tokeniter)
115 if (*tokeniter ==
"INTT")
120 assert(tokeniter != tok.end());
121 int ladder_phi = boost::lexical_cast<
int>(*tokeniter);
124 assert(tokeniter != tok.end());
125 int ladder_z = boost::lexical_cast<
int>(*tokeniter);
128 assert(tokeniter != tok.end());
129 int strip_z = boost::lexical_cast<
int>(*tokeniter);
132 assert(tokeniter != tok.end());
133 int strip_phi = boost::lexical_cast<
int>(*tokeniter);
140 std::cout <<
"add Intt dead channel ladder_phi" << ladder_phi <<
" ladder_z" << ladder_z
141 <<
" strip_z" << strip_z <<
" strip_phi" << strip_phi;
148 std::cout <<
"skip " << deadChanName;
156 std::cout << std::endl;
161 std::cout <<
"PHG4InttDeadMapLoader::" <<
m_detector <<
"::InitRun - loading " << counter <<
" dead channel for layer "
162 << ilayer <<
" from " << deadMapPath <<
". Total dead chan = " << deadmap->
size() << std::endl;
167 std::cout <<
"PHG4InttDeadMapLoader::" <<
m_detector <<
"::InitRun - loading dead map completed : ";