#include <TriggerResultsByName.h>
Public Member Functions | |
bool | accept () const |
bool | accept (std::string const &pathName) const |
bool | accept (unsigned i) const |
HLTPathStatus const & | at (unsigned i) const |
HLTPathStatus const & | at (std::string const &pathName) const |
bool | error (unsigned i) const |
bool | error () const |
bool | error (std::string const &pathName) const |
unsigned | index (std::string const &pathName) const |
unsigned | index (unsigned i) const |
bool | isValid () const |
HLTPathStatus const & | operator[] (std::string const &pathName) const |
HLTPathStatus const & | operator[] (unsigned i) const |
ParameterSetID const & | parameterSetID () const |
std::vector< std::string > ::size_type | size () const |
hlt::HLTState | state (std::string const &pathName) const |
hlt::HLTState | state (unsigned i) const |
unsigned | triggerIndex (std::string const &pathName) const |
std::string const & | triggerName (unsigned i) const |
std::vector< std::string > const & | triggerNames () const |
TriggerResultsByName (TriggerResults const *triggerResults, TriggerNames const *triggerNames) | |
bool | wasrun (std::string const &pathName) const |
bool | wasrun (unsigned i) const |
bool | wasrun () const |
Private Member Functions | |
unsigned | getAndCheckIndex (std::string const &pathName) const |
void | throwTriggerNamesMissing () const |
void | throwTriggerResultsMissing () const |
Private Attributes | |
TriggerNames const * | triggerNames_ |
TriggerResults const * | triggerResults_ |
Definition at line 48 of file TriggerResultsByName.h.
TriggerResultsByName::TriggerResultsByName | ( | TriggerResults const * | triggerResults, |
TriggerNames const * | triggerNames | ||
) |
Definition at line 10 of file TriggerResultsByName.cc.
References Exception, edm::TriggerResults::parameterSetID(), edm::TriggerNames::parameterSetID(), edm::HLTGlobalStatus::size(), edm::TriggerNames::size(), triggerNames_, triggerResults_, and edm::errors::Unknown.
: triggerResults_(triggerResults), triggerNames_(triggerNames) { // If either of these is true the object is in an invalid state if (triggerResults_ == 0 || triggerNames_ == 0) { return; } if (triggerResults_->parameterSetID() != triggerNames_->parameterSetID()) { throw edm::Exception(edm::errors::Unknown) << "TriggerResultsByName::TriggerResultsByName, Trigger names vector and TriggerResults\n" "have different ParameterSetID's. This should be impossible when the object is obtained\n" "from the function named triggerResultsByName in the Event class, which is the way\n" "TriggerResultsByName should always be created. If this is the case, please send\n" "information to reproduce this problem to the edm developers. Otherwise, you are\n" "using this class incorrectly and in a way that is not supported.\n"; } if (triggerResults_->size() != triggerNames_->size()) { throw edm::Exception(edm::errors::Unknown) << "TriggerResultsByName::TriggerResultsByName, Trigger names vector\n" "and TriggerResults have different sizes. This should be impossible,\n" "please send information to reproduce this problem to the edm developers.\n"; } }
bool TriggerResultsByName::accept | ( | ) | const |
Definition at line 61 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::accept(), throwTriggerResultsMissing(), and triggerResults_.
Referenced by HSCPHLTFilter::filter().
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->accept(); }
bool TriggerResultsByName::accept | ( | std::string const & | pathName | ) | const |
Definition at line 120 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::accept(), getAndCheckIndex(), i, throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); unsigned i = getAndCheckIndex(pathName); return triggerResults_->accept(i); }
bool TriggerResultsByName::accept | ( | unsigned | i | ) | const |
Definition at line 128 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::accept(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->accept(i); }
HLTPathStatus const & TriggerResultsByName::at | ( | std::string const & | pathName | ) | const |
Definition at line 75 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::at(), getAndCheckIndex(), i, throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); unsigned i = getAndCheckIndex(pathName); return triggerResults_->at(i); }
HLTPathStatus const & TriggerResultsByName::at | ( | unsigned | i | ) | const |
Definition at line 83 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::at(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->at(i); }
bool TriggerResultsByName::error | ( | ) | const |
Definition at line 68 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::error(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->error(); }
bool TriggerResultsByName::error | ( | std::string const & | pathName | ) | const |
Definition at line 135 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::error(), getAndCheckIndex(), i, throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); unsigned i = getAndCheckIndex(pathName); return triggerResults_->error(i); }
bool TriggerResultsByName::error | ( | unsigned | i | ) | const |
Definition at line 143 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::error(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->error(i); }
unsigned TriggerResultsByName::getAndCheckIndex | ( | std::string const & | pathName | ) | const [private] |
Definition at line 211 of file TriggerResultsByName.cc.
References Exception, i, edm::errors::LogicError, edm::TriggerNames::size(), throwTriggerNamesMissing(), edm::TriggerNames::triggerIndex(), and triggerNames_.
Referenced by accept(), at(), error(), index(), operator[](), state(), and wasrun().
{ if (triggerNames_ == 0) throwTriggerNamesMissing(); unsigned i = triggerNames_->triggerIndex(pathName); if (i == triggerNames_->size()) { throw edm::Exception(edm::errors::LogicError) << "TriggerResultsByName::getAndCheckIndex\n" << "Requested trigger name \"" << pathName << "\" does not match any known trigger.\n"; } return i; }
unsigned TriggerResultsByName::index | ( | std::string const & | pathName | ) | const |
Definition at line 165 of file TriggerResultsByName.cc.
References getAndCheckIndex(), i, edm::HLTGlobalStatus::index(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); unsigned i = getAndCheckIndex(pathName); return triggerResults_->index(i); }
unsigned TriggerResultsByName::index | ( | unsigned | i | ) | const |
Definition at line 173 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::index(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->index(i); }
bool TriggerResultsByName::isValid | ( | void | ) | const |
Definition at line 40 of file TriggerResultsByName.cc.
References triggerNames_, and triggerResults_.
Referenced by HSCPHLTFilter::filter().
{ if (triggerResults_ == 0 || triggerNames_ == 0) return false; return true; }
HLTPathStatus const & TriggerResultsByName::operator[] | ( | unsigned | i | ) | const |
Definition at line 98 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::at(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->at(i); }
HLTPathStatus const & TriggerResultsByName::operator[] | ( | std::string const & | pathName | ) | const |
Definition at line 90 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::at(), getAndCheckIndex(), i, throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); unsigned i = getAndCheckIndex(pathName); return triggerResults_->at(i); }
ParameterSetID const & TriggerResultsByName::parameterSetID | ( | ) | const |
Definition at line 47 of file TriggerResultsByName.cc.
References edm::TriggerResults::parameterSetID(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->parameterSetID(); }
std::vector< std::string >::size_type TriggerResultsByName::size | ( | void | ) | const |
Definition at line 204 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::size(), throwTriggerResultsMissing(), and triggerResults_.
Referenced by HSCPHLTFilter::filter().
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->size(); }
hlt::HLTState TriggerResultsByName::state | ( | std::string const & | pathName | ) | const |
Definition at line 150 of file TriggerResultsByName.cc.
References getAndCheckIndex(), i, edm::HLTGlobalStatus::state(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); unsigned i = getAndCheckIndex(pathName); return triggerResults_->state(i); }
hlt::HLTState TriggerResultsByName::state | ( | unsigned | i | ) | const |
Definition at line 158 of file TriggerResultsByName.cc.
References edm::HLTGlobalStatus::state(), throwTriggerResultsMissing(), and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->state(i); }
void TriggerResultsByName::throwTriggerNamesMissing | ( | ) | const [private] |
Definition at line 236 of file TriggerResultsByName.cc.
References Exception, and edm::errors::LogicError.
Referenced by getAndCheckIndex(), triggerIndex(), triggerName(), and triggerNames().
{ throw edm::Exception(edm::errors::LogicError) << "TriggerResultsByName has a null pointer to TriggerNames.\n" << "This should never happen. It could indicate the ParameterSet\n" << "containing the names is missing from the ParameterSet registry.\n" << "Please report this to the edm developers along with instructions\n" << "to reproduce the problem\n"; }
void TriggerResultsByName::throwTriggerResultsMissing | ( | ) | const [private] |
Definition at line 225 of file TriggerResultsByName.cc.
References Exception, and edm::errors::ProductNotFound.
Referenced by accept(), at(), error(), index(), operator[](), parameterSetID(), size(), state(), triggerIndex(), triggerName(), triggerNames(), and wasrun().
{ throw edm::Exception(edm::errors::ProductNotFound) << "TriggerResultsByName has a null pointer to TriggerResults.\n" << "This probably means TriggerResults was not found in the Event\n" << "because the product was dropped or never created. It could also\n" << "mean it was requested for a process that does not exist or was\n" << "misspelled\n"; }
unsigned TriggerResultsByName::triggerIndex | ( | std::string const & | pathName | ) | const |
Definition at line 196 of file TriggerResultsByName.cc.
References throwTriggerNamesMissing(), throwTriggerResultsMissing(), edm::TriggerNames::triggerIndex(), triggerNames_, and triggerResults_.
Referenced by HSCPHLTFilter::filter().
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); if (triggerNames_ == 0) throwTriggerNamesMissing(); return triggerNames_->triggerIndex(pathName); }
std::string const & TriggerResultsByName::triggerName | ( | unsigned | i | ) | const |
Definition at line 188 of file TriggerResultsByName.cc.
References throwTriggerNamesMissing(), throwTriggerResultsMissing(), edm::TriggerNames::triggerName(), triggerNames_, and triggerResults_.
Referenced by HSCPHLTFilter::filter().
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); if (triggerNames_ == 0) throwTriggerNamesMissing(); return triggerNames_->triggerName(i); }
std::vector< std::string > const & TriggerResultsByName::triggerNames | ( | ) | const |
Definition at line 180 of file TriggerResultsByName.cc.
References throwTriggerNamesMissing(), throwTriggerResultsMissing(), edm::TriggerNames::triggerNames(), triggerNames_, and triggerResults_.
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); if (triggerNames_ == 0) throwTriggerNamesMissing(); return triggerNames_->triggerNames(); }
bool TriggerResultsByName::wasrun | ( | unsigned | i | ) | const |
Definition at line 113 of file TriggerResultsByName.cc.
References throwTriggerResultsMissing(), triggerResults_, and edm::HLTGlobalStatus::wasrun().
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->wasrun(i); }
bool TriggerResultsByName::wasrun | ( | ) | const |
Definition at line 54 of file TriggerResultsByName.cc.
References throwTriggerResultsMissing(), triggerResults_, and edm::HLTGlobalStatus::wasrun().
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); return triggerResults_->wasrun(); }
bool TriggerResultsByName::wasrun | ( | std::string const & | pathName | ) | const |
Definition at line 105 of file TriggerResultsByName.cc.
References getAndCheckIndex(), i, throwTriggerResultsMissing(), triggerResults_, and edm::HLTGlobalStatus::wasrun().
{ if (triggerResults_ == 0) throwTriggerResultsMissing(); unsigned i = getAndCheckIndex(pathName); return triggerResults_->wasrun(i); }
TriggerNames const* edm::TriggerResultsByName::triggerNames_ [private] |
Definition at line 114 of file TriggerResultsByName.h.
Referenced by getAndCheckIndex(), isValid(), triggerIndex(), triggerName(), triggerNames(), and TriggerResultsByName().
TriggerResults const* edm::TriggerResultsByName::triggerResults_ [private] |
Definition at line 113 of file TriggerResultsByName.h.
Referenced by accept(), at(), error(), index(), isValid(), operator[](), parameterSetID(), size(), state(), triggerIndex(), triggerName(), triggerNames(), TriggerResultsByName(), and wasrun().