6 : prescaleValues_(), triggerResults_(edm::
RefProd<edm::TriggerResults>(handle).refCore()), triggerNames_(nullptr) {
13 return prescaleValues_[
index];
17 if (triggerNames_ ==
nullptr)
18 throw cms::Exception(
"LogicError",
"getPrescaleForName called without having called setTriggerNames first");
20 const std::vector<std::string> &
names = triggerNames_->triggerNames();
21 size_t siz = name.length() - 1;
22 while (siz > 0 && (name[siz] ==
'*' || name[siz] ==
'\0'))
24 for (
unsigned int i = 0,
n = names.size();
i <
n; ++
i) {
25 if (strncmp(name.c_str(), names[
i].c_str(), siz) == 0) {
26 return getPrescaleForIndex(
i);
31 int index = triggerNames_->triggerIndex(name);
32 return getPrescaleForIndex(index);
39 prescaleValues_[
index] = prescale;
int getPrescaleForName(const std::string &name, bool prefixOnly=false) const
std::vector< int > prescaleValues_
const std::string names[nVars_]
void addPrescaledTrigger(int index, int prescale)
static std::string const triggerResults
edm::RefProd< Container > RefProd
int getPrescaleForIndex(int index) const
tuple size
Write out results.