Definition at line 7 of file RPCLBLinkNameParser.cc.
References conv, Exception, spr::find(), mergeVDriftHistosByStation::name, GetRecoTauVFromDQM_MC_cff::next, RPCLBLink::reset(), RPCLBLink::setFibre(), RPCLBLink::setLinkBoard(), RPCLBLink::setRadial(), RPCLBLink::setRegion(), RPCLBLink::setSector(), RPCLBLink::setSide(), RPCLBLink::setWheelOrDisk(), RPCLBLink::setYoke(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, and createJobs::tmp.
Referenced by RPCAMCLinkMapHandler::getNewObjects(), RPCDCCLinkMapHandler::getNewObjects(), RPCLBLinkMapHandler::getNewObjects(), and parse().
13 std::istringstream
conv;
16 pos =
name.find(
"_R", pos);
17 if (pos == std::string::npos || (pos += 2) >= size)
19 switch (
name.at(pos)) {
27 throw cms::Exception(
"InvalidLinkBoardName") <<
"Expected Region B or E, got " <<
name.at(pos) <<
" in " <<
name;
34 next =
name.find_first_not_of(
"+-0123456789", pos);
36 conv.str(
name.substr(pos,
next - pos));
42 pos =
name.find(
"_S", pos);
43 if (pos == std::string::npos || (pos += 2) >= size)
45 next =
name.find_first_not_of(
"+-0123456789", pos);
47 conv.str(
name.substr(pos,
next - pos));
53 pos =
name.find(
'_', pos);
54 if (pos == std::string::npos || (pos += 2) >= size)
56 switch (
name.at(pos)) {
67 throw cms::Exception(
"InvalidLinkBoardName") <<
"Expected Side N, M or P, got " <<
name.at(pos) <<
" in " <<
name;
75 conv.str(
name.substr(pos, 1));
84 char const* tmpchar =
std::find(&(fibre[0]), &(fibre[0]) + 8,
name.at(pos));
85 lb_link.
setFibre(tmpchar - &(fibre[0]));
92 if (
next == std::string::npos)
94 if (
next - pos == 2) {
98 else if (radial ==
"cd")
110 next =
name.find_first_not_of(
"+-0123456789", pos);
112 conv.str(
name.substr(pos,
next - pos));
RPCLBLink & setSide(int side=wildcard_)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
RPCLBLink & setFibre(int fibre=wildcard_)
RPCLBLink & setWheelOrDisk(int wheelordisk=wildcard_)
RPCLBLink & setRadial(int radial=wildcard_)
RPCLBLink & setRegion(int region=wildcard_)
RPCLBLink & setYoke(int yoke=wildcard_)
RPCLBLink & setSector(int sector=wildcard_)
RPCLBLink & setLinkBoard(int linkboard=wildcard_)
tuple size
Write out results.