12 for (
size_t i = 0;
i < filterNames.size();
i++) {
13 p->setCode(filterNames[
i].c_str(),
i);
27 <<
" Warning, trying to store at bit " << bitNr <<
" but max nr bits is " <<
maxNrBits_;
45 char const*
const end = descript + strlen(descript);
46 char const* codeKey = descript;
47 char const*
token =
nullptr;
52 if (0 ==
c.first.compare(0, std::string::npos, codeKey,
token - codeKey)) {
58 }
while (
token != end);
62 bool TrigCodes::keyComp(
const std::pair<std::string, TrigBitSet>& lhs,
const std::pair<std::string, TrigBitSet>& rhs) {
63 return lhs.first < rhs.first;
69 if ((code & codeDef.second) == codeDef.second) {
78 std::ostringstream
msg;
79 msg <<
" trig bits defined: " << std::endl;
81 msg <<
" key : " << codeDef.first <<
" bit " << codeDef.second << std::endl;
void setCode(const char *descript, TrigBitSet code)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static TrigCodes * makeCodes(std::vector< std::string > &filterNames)
std::vector< std::pair< std::string, TrigBitSet > > codeDefs_
Log< level::Info, false > LogInfo
static const int maxNrBits_
void getCodeName(TrigBitSet code, std::string &id) const
TrigBitSet getCode(const char *descript) const
Log< level::Warning, false > LogWarning
std::bitset< maxNrBits_ > TrigBitSet
static bool keyComp(const std::pair< std::string, TrigBitSet > &lhs, const std::pair< std::string, TrigBitSet > &rhs)