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...
 
HLTPathStatusat (const unsigned int i)
 
const HLTPathStatusat (const unsigned int i) const
 
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...
 
HLTPathStatusoperator[] (const unsigned int i)
 
const HLTPathStatusoperator[] (const unsigned int i) const
 
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 25 of file HLTGlobalStatus.h.

Constructor & Destructor Documentation

◆ HLTGlobalStatus()

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

Constructor - for n paths.

Definition at line 32 of file HLTGlobalStatus.h.

32 : paths_(n) {}

Member Function Documentation

◆ accept() [1/2]

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

Has at least one path accepted the event?

Definition at line 49 of file HLTGlobalStatus.h.

49 { return State(1); }

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(), HLTrigReport::analyze(), HLTExoticaSubAnalysis::analyze(), EmDQMReco::analyze(), METAnalyzer::analyze(), TrackerDpgAnalysis::analyze(), ZCounting::analyzeElectrons(), ZCounting::analyzeMuons(), HLTEventAnalyzerAOD::analyzeTrigger(), HLTEventAnalyzerRAW::analyzeTrigger(), CSCEfficiency::applyTrigger(), HltDiff::compare(), HLTBitComputer::compute(), L1MetFilterRecoTreeProducer::doMetFilters(), ZeeCalibration::duringLoop(), HLTBitVariable::eval(), 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(), PrescalerFHN::filter(), FWFileEntry::filterEventsWithCustomParser(), esMonitoring.FDJsonServer::handle_accept(), LeptonSkimming::hltFired(), JetMETHLTOfflineSource::isHLTPathAccepted(), TrigObjTnPHistColl::PathSelector::operator()(), hltdqm::passTrig(), CandidateTriggerObjectProducer::produce(), TriggerMatchProducer< object >::produce(), pat::PATTriggerEventProducer::produce(), GenFilterEfficiencyProducer::produce(), pat::PATTriggerProducer::produce(), HLTEventSelector::select(), and egHLT::OffHelper::setTrigInfo().

◆ accept() [2/2]

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

Has ith path accepted the event?

Definition at line 63 of file HLTGlobalStatus.h.

63 { return at(i).accept(); }

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

Referenced by esMonitoring.FDJsonServer::handle_accept().

◆ at() [1/2]

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

Definition at line 56 of file HLTGlobalStatus.h.

56 { return paths_.at(i); }

References mps_fire::i, and paths_.

◆ at() [2/2]

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

Definition at line 55 of file HLTGlobalStatus.h.

55 { return paths_.at(i); }

References mps_fire::i, and paths_.

Referenced by accept(), edm::TriggerResultsByName::at(), error(), index(), edm::TriggerResultsByName::operator[](), reset(), state(), and wasrun().

◆ 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 65 of file HLTGlobalStatus.h.

65 { return at(i).error(); }

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

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag().

◆ index()

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

◆ operator=()

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

copy assignment implemented with swap()

Definition at line 76 of file HLTGlobalStatus.h.

76  {
77  HLTGlobalStatus temp(rhs);
78  this->swap(temp);
79  return *this;
80  }

References swap(), and groupFilesInBlocks::temp.

◆ operator[]() [1/2]

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

Definition at line 58 of file HLTGlobalStatus.h.

58 { return paths_.at(i); }

References mps_fire::i, and paths_.

◆ operator[]() [2/2]

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

Definition at line 57 of file HLTGlobalStatus.h.

57 { return paths_.at(i); }

References mps_fire::i, and paths_.

◆ reset() [1/2]

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

Reset status for all paths.

Definition at line 38 of file HLTGlobalStatus.h.

38  {
39  const unsigned int n(size());
40  for (unsigned int i = 0; i != n; ++i)
41  paths_[i].reset();
42  }

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

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

◆ reset() [2/2]

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

Reset the ith path.

Definition at line 72 of file HLTGlobalStatus.h.

72 { at(i).reset(); }

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

◆ size()

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

◆ state()

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

◆ State()

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

Global state variable calculated on the fly.

Definition at line 84 of file HLTGlobalStatus.h.

84  {
85  bool flags[3] = {false, false, false};
86  const unsigned int n(size());
87  for (unsigned int i = 0; i != n; ++i) {
88  const hlt::HLTState s(state(i));
89  if (s != hlt::Ready) {
90  flags[0] = true; // at least one trigger was run
91  if (s == hlt::Pass) {
92  flags[1] = true; // at least one trigger accepted
93  } else if (s == hlt::Exception) {
94  flags[2] = true; // at least one trigger with error
95  }
96  }
97  }
98  return flags[icase];
99  }

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

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

◆ swap()

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

swap function

Definition at line 74 of file HLTGlobalStatus.h.

74 { paths_.swap(other.paths_); }

References trackingPlots::other, and paths_.

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

◆ 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 61 of file HLTGlobalStatus.h.

61 { return at(i).wasrun(); }

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

Member Data Documentation

◆ paths_

std::vector<HLTPathStatus> edm::HLTGlobalStatus::paths_
private
edm::HLTPathStatus::error
bool error() const
has this path encountered an error (exception)?
Definition: HLTPathStatus.h:61
edm::hlt::HLTState
HLTState
status of a trigger path
Definition: HLTenums.h:16
edm::HLTGlobalStatus::HLTGlobalStatus
HLTGlobalStatus(const unsigned int n=0)
Constructor - for n paths.
Definition: HLTGlobalStatus.h:32
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::HLTGlobalStatus::swap
void swap(HLTGlobalStatus &other)
swap function
Definition: HLTGlobalStatus.h:74
edm::HLTGlobalStatus::state
hlt::HLTState state(const unsigned int i) const
Get status of ith path.
Definition: HLTGlobalStatus.h:68
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::HLTGlobalStatus::paths_
std::vector< HLTPathStatus > paths_
Status of each HLT path.
Definition: HLTGlobalStatus.h:28
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::HLTGlobalStatus::size
unsigned int size() const
Get number of paths stored.
Definition: HLTGlobalStatus.h:35
trackingPlots.other
other
Definition: trackingPlots.py:1460
edm::HLTGlobalStatus::State
bool State(unsigned int icase) const
Global state variable calculated on the fly.
Definition: HLTGlobalStatus.h:84
edm::HLTPathStatus::accept
bool accept() const
has this path accepted the event?
Definition: HLTPathStatus.h:59
edm::hlt::Ready
not [yet] run
Definition: HLTenums.h:17
edm::HLTGlobalStatus::at
const HLTPathStatus & at(const unsigned int i) const
Definition: HLTGlobalStatus.h:55
edm::HLTPathStatus::reset
void reset()
reset this path
Definition: HLTPathStatus.h:54
edm::HLTPathStatus::index
unsigned int index() const
Definition: HLTPathStatus.h:52
edm::HLTGlobalStatus::reset
void reset()
Reset status for all paths.
Definition: HLTGlobalStatus.h:38
edm::hlt::Exception
error
Definition: HLTenums.h:20
edm::hlt::Pass
accept
Definition: HLTenums.h:18
HLT_FULL_cff.flags
flags
Definition: HLT_FULL_cff.py:13150
edm::HLTPathStatus::wasrun
bool wasrun() const
was this path run?
Definition: HLTPathStatus.h:57
edm::HLTPathStatus::state
hlt::HLTState state() const
get state of path
Definition: HLTPathStatus.h:48