13 if(!found)
_codeDefs.emplace_back(descript,code);
23 char localDescript[256];
24 strcpy(localDescript,descript);
27 char* codeKey = strtok(localDescript,
":");
29 while(codeKey!=
nullptr){
40 if(!found)
edm::LogWarning(
"EgHLTComCodes") <<
"ComCodes::getCode : Error, Key "<<codeKey<<
" not found (likely mistyped, practical upshot is the selection is not what you think it is)";
41 codeKey = strtok(
nullptr,
":");
47 bool ComCodes::keyComp(
const std::pair<std::string,int>& lhs,
const std::pair<std::string,int>& rhs)
49 return lhs.first < rhs.first;
56 if((code&_codeDef.second)==_codeDef.second){
57 if(!
id.
empty())
id+=
":";
void setCode(const char *descript, int code)
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