13 if(!found)
_codeDefs.emplace_back(descript,code);
23 char const *
const end = descript+strlen(descript);
24 char const * codeKey = descript;
25 char const * token =
nullptr;
31 if(0==
c.first.compare(0,std::string::npos,codeKey, token-codeKey)){
37 if(!found)
edm::LogWarning(
"EgHLTComCodes") <<
"ComCodes::getCode : Error, Key "<<
std::string(codeKey,token-codeKey)<<
" not found (likely mistyped, practical upshot is the selection is not what you think it is)";
39 }
while(token != end);
43 bool ComCodes::keyComp(
const std::pair<std::string,int>& lhs,
const std::pair<std::string,int>& rhs)
45 return lhs.first < rhs.first;
52 if((code&_codeDef.second)==_codeDef.second){
53 if(!
id.
empty())
id+=
":";
void setCode(const char *descript, int code)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
int getCode(const char *descript) const
std::vector< std::pair< std::string, int > > _codeDefs
static bool keyComp(const std::pair< std::string, int > &lhs, const std::pair< std::string, int > &rhs)
void getCodeName(int code, std::string &id) const