14 std::istringstream
conv;
17 pos = name.find(
"_R",
pos);
18 if (
pos == std::string::npos || (
pos += 2) >= size)
20 switch (name.at(
pos)) {
24 throw cms::Exception(
"InvalidLinkBoardName") <<
"Expected Region B or E, got " << name.at(
pos) <<
" in " <<
name;
31 next = name.find_first_not_of(
"+-0123456789",
pos);
33 conv.str(name.substr(
pos, next -
pos));
39 pos = name.find(
"_S",
pos);
40 if (
pos == std::string::npos || (
pos += 2) >= size)
42 next = name.find_first_not_of(
"+-0123456789",
pos);
44 conv.str(name.substr(
pos, next -
pos));
51 if (
pos == std::string::npos || (
pos += 2) >= size)
53 switch (name.at(
pos)) {
54 case 'N': lb_link.
setSide(0);
break;
55 case 'M': lb_link.
setSide(1);
break;
56 case 'P': lb_link.
setSide(2);
break;
58 throw cms::Exception(
"InvalidLinkBoardName") <<
"Expected Side N, M or P, got " << name.at(
pos) <<
" in " <<
name;
66 conv.str(name.substr(
pos, 1));
75 char const * tmpchar =
std::find(&(fibre[0]), &(fibre[0]) + 8, name.at(
pos));
76 lb_link.
setFibre(tmpchar - &(fibre[0]));
82 next = name.find(
"_CH",
pos);
83 if (next == std::string::npos)
85 if (next -
pos == 2) {
89 else if (radial ==
"cd")
101 next = name.find_first_not_of(
"+-0123456789",
pos);
103 conv.str(name.substr(
pos, next -
pos));
112 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_)
std::vector< std::vector< double > > tmp
RPCLBLink & setLinkBoard(int linkboard=wildcard_)
static void parse(std::string const &name, RPCLBLink &lb_link)