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));
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]));
91 next = name.find(
"_CH",
pos);
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));
119 parse(name, lb_link);
RPCLBLink & setSide(int side=wildcard_)
static HepMC::IO_HEPEVT conv
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_)
static void parse(std::string const &name, RPCLBLink &lb_link)