CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::HLTGlobalStatus Class Reference

#include <HLTGlobalStatus.h>

Inheritance diagram for edm::HLTGlobalStatus:
edm::TriggerResults

Public Member Functions

bool accept () const
 Has at least one path accepted the event? More...
 
bool accept (const unsigned int i) const
 Has ith path accepted the event? More...
 
const HLTPathStatusat (const unsigned int i) const
 
HLTPathStatusat (const unsigned int i)
 
bool error () const
 Has any path encountered an error (exception) More...
 
bool error (const unsigned int i) const
 Has ith path encountered an error (exception)? More...
 
 HLTGlobalStatus (const unsigned int n=0)
 Constructor - for n paths. More...
 
unsigned int index (const unsigned int i) const
 Get index (slot position) of module giving the decision of the ith path. More...
 
HLTGlobalStatusoperator= (HLTGlobalStatus const &rhs)
 copy assignment implemented with swap() More...
 
const HLTPathStatusoperator[] (const unsigned int i) const
 
HLTPathStatusoperator[] (const unsigned int i)
 
void reset ()
 Reset status for all paths. More...
 
void reset (const unsigned int i)
 Reset the ith path. More...
 
unsigned int size () const
 Get number of paths stored. More...
 
hlt::HLTState state (const unsigned int i) const
 Get status of ith path. More...
 
void swap (HLTGlobalStatus &other)
 swap function More...
 
bool wasrun () const
 Was at least one path run? More...
 
bool wasrun (const unsigned int i) const
 Was ith path run? More...
 

Private Member Functions

bool State (unsigned int icase) const
 Global state variable calculated on the fly. More...
 

Private Attributes

std::vector< HLTPathStatuspaths_
 Status of each HLT path. More...
 

Detailed Description

The HLT global status, summarising the status of the individual HLT triggers, is implemented as a vector of HLTPathStatus objects.

If the user wants map-like indexing of HLT triggers through their names as key, s/he must use the TriggerNamesService.

Author
Martin Grunewald

Definition at line 27 of file HLTGlobalStatus.h.

Constructor & Destructor Documentation

◆ HLTGlobalStatus()

edm::HLTGlobalStatus::HLTGlobalStatus ( const unsigned int  n = 0)
inline

Constructor - for n paths.

Definition at line 34 of file HLTGlobalStatus.h.

34 : paths_(n) {}
std::vector< HLTPathStatus > paths_
Status of each HLT path.

Member Function Documentation

◆ accept() [1/2]

bool edm::HLTGlobalStatus::accept ( ) const
inline

Has at least one path accepted the event?

Definition at line 51 of file HLTGlobalStatus.h.

References State().

Referenced by accept(), edm::TriggerResultsByName::accept(), TriggerHelper::acceptHltLogicalExpression(), GenericTriggerEventFlag::acceptHltLogicalExpression(), CaloTowerAnalyzer::analyze(), HLTInspect::analyze(), QcdPhotonsDQM::analyze(), EwkDQM::analyze(), TopDiLeptonDQM::analyze(), HcalRaddamMuon::analyze(), HLTHiggsSubAnalysis::analyze(), DQMPFCandidateAnalyzer::analyze(), HcalHBHEMuonAnalyzer::analyze(), HLTExoticaSubAnalysis::analyze(), HLTrigReport::analyze(), EmDQMReco::analyze(), L1TMuonDQMOffline::analyze(), METAnalyzer::analyze(), EopElecTreeWriter::analyze(), TrackerDpgAnalysis::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), HLTEventAnalyzerRAW::analyzeTrigger(), CSCEfficiency::applyTrigger(), HltDiff::compare(), HLTBitComputer::compute(), L1MetFilterRecoTreeProducer::doMetFilters(), ZeeCalibration::duringLoop(), HLTBitVariable::eval(), TriggerFieldPtr::fill(), FWHLTTriggerTableView::fillAverageAcceptFractions(), TriggerOutputBranches::fillColumn(), EwkElecTauHistManager::fillHistograms(), EwkMuTauHistManager::fillHistograms(), QcdUeDQM::fillHltBits(), QcdLowPtDQM::fillHltBits(), ZeePlots::fillHLTInfo(), JetMETHLTOfflineSource::fillMEforEffAllTrigger(), JetMETHLTOfflineSource::fillMEforTriggerNTfired(), FWHLTTriggerTableView::fillTable(), HLTPathSelector::filter(), PhysDecl::filter(), HltComparator::filter(), HLTHighLevel::filter(), FWFileEntry::filterEventsWithCustomParser(), esMonitoring.FDJsonServer::handle_accept(), LeptonSkimming::hltFired(), JetMETHLTOfflineSource::isHLTPathAccepted(), TrigObjTnPHistColl::PathSelector::operator()(), triggerExpression::Data::passHLT(), hltdqm::passTrig(), CandidateTriggerObjectProducer::produce(), TriggerMatchProducer< object >::produce(), pat::PATTriggerEventProducer::produce(), GenFilterEfficiencyProducer::produce(), pat::PATTriggerProducer::produce(), TriggerTools::readEvent(), HLTEventSelector::select(), and egHLT::OffHelper::setTrigInfo().

51 { return State(1); }
bool State(unsigned int icase) const
Global state variable calculated on the fly.

◆ accept() [2/2]

bool edm::HLTGlobalStatus::accept ( const unsigned int  i) const
inline

Has ith path accepted the event?

Definition at line 65 of file HLTGlobalStatus.h.

References edm::HLTPathStatus::accept(), at(), and mps_fire::i.

Referenced by esMonitoring.FDJsonServer::handle_accept().

65 { return at(i).accept(); }
const HLTPathStatus & at(const unsigned int i) const
bool accept() const
has this path accepted the event?
Definition: HLTPathStatus.h:59

◆ at() [1/2]

const HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i) const
inline

◆ at() [2/2]

HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i)
inline

Definition at line 58 of file HLTGlobalStatus.h.

References mps_fire::i, and paths_.

58 { return paths_.at(i); }
std::vector< HLTPathStatus > paths_
Status of each HLT path.

◆ error() [1/2]

bool edm::HLTGlobalStatus::error ( ) const
inline

◆ error() [2/2]

bool edm::HLTGlobalStatus::error ( const unsigned int  i) const
inline

Has ith path encountered an error (exception)?

Definition at line 67 of file HLTGlobalStatus.h.

References at(), edm::HLTPathStatus::error(), and mps_fire::i.

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag().

67 { return at(i).error(); }
const HLTPathStatus & at(const unsigned int i) const
bool error() const
has this path encountered an error (exception)?
Definition: HLTPathStatus.h:61

◆ index()

unsigned int edm::HLTGlobalStatus::index ( const unsigned int  i) const
inline

Get index (slot position) of module giving the decision of the ith path.

Definition at line 72 of file HLTGlobalStatus.h.

References at(), mps_fire::i, and edm::HLTPathStatus::index().

Referenced by HLTrigReport::analyze(), HLTEventAnalyzerAOD::analyzeTrigger(), HLTEventAnalyzerRAW::analyzeTrigger(), HltDiff::compare(), edm::TriggerResultsByName::index(), and pat::PATTriggerProducer::produce().

72 { return at(i).index(); }
unsigned int index() const
Definition: HLTPathStatus.h:52
const HLTPathStatus & at(const unsigned int i) const

◆ operator=()

HLTGlobalStatus& edm::HLTGlobalStatus::operator= ( HLTGlobalStatus const &  rhs)
inline

copy assignment implemented with swap()

Definition at line 78 of file HLTGlobalStatus.h.

References swap(), and groupFilesInBlocks::temp.

78  {
79  HLTGlobalStatus temp(rhs);
80  this->swap(temp);
81  return *this;
82  }
void swap(HLTGlobalStatus &other)
swap function
HLTGlobalStatus(const unsigned int n=0)
Constructor - for n paths.

◆ operator[]() [1/2]

const HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i) const
inline

Definition at line 59 of file HLTGlobalStatus.h.

References mps_fire::i, and paths_.

59 { return paths_[i]; }
std::vector< HLTPathStatus > paths_
Status of each HLT path.

◆ operator[]() [2/2]

HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i)
inline

Definition at line 60 of file HLTGlobalStatus.h.

References mps_fire::i, and paths_.

60 { return paths_[i]; }
std::vector< HLTPathStatus > paths_
Status of each HLT path.

◆ reset() [1/2]

void edm::HLTGlobalStatus::reset ( void  )
inline

Reset status for all paths.

Definition at line 40 of file HLTGlobalStatus.h.

References mps_fire::i, dqmiodumpmetadata::n, paths_, and size().

Referenced by edm::EventSelector::selectionIsValid().

40  {
41  const unsigned int n(size());
42  for (unsigned int i = 0; i != n; ++i)
43  paths_[i].reset();
44  }
unsigned int size() const
Get number of paths stored.
void reset()
Reset status for all paths.
std::vector< HLTPathStatus > paths_
Status of each HLT path.

◆ reset() [2/2]

void edm::HLTGlobalStatus::reset ( const unsigned int  i)
inline

Reset the ith path.

Definition at line 74 of file HLTGlobalStatus.h.

References at(), mps_fire::i, and edm::HLTPathStatus::reset().

74 { at(i).reset(); }
void reset()
reset this path
Definition: HLTPathStatus.h:54
const HLTPathStatus & at(const unsigned int i) const

◆ size()

unsigned int edm::HLTGlobalStatus::size ( void  ) const
inline

◆ state()

hlt::HLTState edm::HLTGlobalStatus::state ( const unsigned int  i) const
inline

Get status of ith path.

Definition at line 70 of file HLTGlobalStatus.h.

References at(), mps_fire::i, and edm::HLTPathStatus::state().

Referenced by HltDiff::compare(), edm::EventSelector::maskTriggerResults(), edm::TriggerResultsByName::state(), and State().

70 { return at(i).state(); }
const HLTPathStatus & at(const unsigned int i) const
hlt::HLTState state() const
get state of path
Definition: HLTPathStatus.h:48

◆ State()

bool edm::HLTGlobalStatus::State ( unsigned int  icase) const
inlineprivate

Global state variable calculated on the fly.

Definition at line 86 of file HLTGlobalStatus.h.

References edm::hlt::Exception, HLT_2023v12_cff::flags, mps_fire::i, dqmiodumpmetadata::n, edm::hlt::Pass, edm::hlt::Ready, alignCSCRings::s, size(), and state().

Referenced by accept(), error(), and wasrun().

86  {
87  bool flags[3] = {false, false, false};
88  const unsigned int n(size());
89  for (unsigned int i = 0; i != n; ++i) {
90  const hlt::HLTState s(state(i));
91  if (s != hlt::Ready) {
92  flags[0] = true; // at least one trigger was run
93  if (s == hlt::Pass) {
94  flags[1] = true; // at least one trigger accepted
95  } else if (s == hlt::Exception) {
96  flags[2] = true; // at least one trigger with error
97  }
98  }
99  }
100  return flags[icase];
101  }
hlt::HLTState state(const unsigned int i) const
Get status of ith path.
not [yet] run
Definition: HLTenums.h:17
HLTState
status of a trigger path
Definition: HLTenums.h:16
unsigned int size() const
Get number of paths stored.
accept
Definition: HLTenums.h:18

◆ swap()

void edm::HLTGlobalStatus::swap ( HLTGlobalStatus other)
inline

swap function

Definition at line 76 of file HLTGlobalStatus.h.

References trackingPlots::other, and paths_.

Referenced by operator=(), edm::TriggerResults::swap(), edm::swap(), and std::swap().

76 { paths_.swap(other.paths_); }
std::vector< HLTPathStatus > paths_
Status of each HLT path.

◆ wasrun() [1/2]

bool edm::HLTGlobalStatus::wasrun ( ) const
inline

◆ wasrun() [2/2]

bool edm::HLTGlobalStatus::wasrun ( const unsigned int  i) const
inline

Was ith path run?

Definition at line 63 of file HLTGlobalStatus.h.

References at(), mps_fire::i, and edm::HLTPathStatus::wasrun().

63 { return at(i).wasrun(); }
const HLTPathStatus & at(const unsigned int i) const
bool wasrun() const
was this path run?
Definition: HLTPathStatus.h:57

Member Data Documentation

◆ paths_

std::vector<HLTPathStatus> edm::HLTGlobalStatus::paths_
private