2 #include <boost/tokenizer.hpp>
20 std::ostringstream errors;
21 boost::char_separator<char> sep(
" \t",
";");
22 typedef boost::tokenizer<boost::char_separator<char> > myTokType;
26 myTokType tok(totaline, sep);
27 int ieta1 = 0, ieta2 = 0, iphi1 = -1, iphi2 = -1, depth1 = 1, depth2 = 4;
31 for (myTokType::iterator beg = tok.begin(); beg != tok.end() && phase >= 0; ++beg) {
32 std::cout << phase <<
" : <" << *beg <<
">\n";
36 if (phase != 1 && phase != 5 && phase != 7) {
37 errors <<
"Expect 1, 5, or 7 arguments, got " <<
phase;
43 target_.
exclude(subdet, ieta1, ieta2, iphi1, iphi2, depth1, depth2);
53 ieta1 = atoi(beg->c_str());
56 ieta2 = atoi(beg->c_str());
59 iphi1 = atoi(beg->c_str());
62 iphi2 = atoi(beg->c_str());
67 depth1 = atoi(beg->c_str());
70 depth2 = atoi(beg->c_str());
void excludeSubdetector(HcalSubdetector subdet)
std::string parse(const std::string &line)
static HcalSubdetector determineSubdet(const std::string &item)
void exclude(const HcalDetId &id)
HcalTopologyRestrictionParser(HcalTopology &target)