12 edm::LogWarning(
"TrigCodes") <<
" Warning trigBitSetMap already filled ";
26 edm::LogWarning(
"TrigCodes::TrigBitSetMap") <<
" Warning, trying to store at bit "<<bitNr<<
" but max nr bits is "<<
maxNrBits();
33 for(
size_t i=0;
i<codeDefs_.size() && !
found;
i++){
34 if(codeDefs_[
i].
first.compare(descript)==0) found=
true;
36 if(!found) codeDefs_.push_back(std::pair<std::string,TrigBitSet>(descript,code));
45 char localDescript[512];
46 strcpy(localDescript,descript);
49 char* codeKey = strtok(localDescript,
":");
54 for(
size_t i=0;
i<codeDefs_.size() && !
found;
i++){
55 if(codeDefs_[
i].
first.compare(codeKey)==0){
57 code |= codeDefs_[
i].second;
63 codeKey = strtok(
NULL,
":");
71 return lhs.first < rhs.first;
77 for(
size_t i=0;
i<codeDefs_.size();
i++){
78 if((code&codeDefs_[
i].
second)==codeDefs_[
i].second){
79 if(!
id.
empty())
id+=
":";
80 id+=codeDefs_[
i].first;
89 std::ostringstream
msg;
90 msg <<
" trig bits defined: "<<std::endl;
91 for(
size_t i=0;
i<codeDefs_.size();
i++) msg <<
" key : "<<codeDefs_[
i].
first<<
" bit "<<codeDefs_[
i].
second<<std::endl;
static bool keyComp(const std::pair< std::string, TrigBitSet > &lhs, const std::pair< std::string, TrigBitSet > &rhs)
void getCodeName(TrigBitSet code, std::string &id) const
U second(std::pair< T, U > const &p)
void setCode(const char *descript, TrigBitSet code)
static TrigBitSetMap trigBitSetMap_
static void setCodes(std::vector< std::string > &filterNames)
TrigBitSet getCode(const char *descript) const
std::bitset< maxNrBits_ > TrigBitSet