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

#include "/cvmfs/nova.opensciencegrid.org/externals/canvas/v3_06_01/source/canvas/Persistency/Common/HLTGlobalStatus.h"

Inheritance diagram for art::HLTGlobalStatus:
art::TriggerResults

Public Member Functions

 HLTGlobalStatus ()=default
 
 HLTGlobalStatus (std::size_t const n)
 
std::size_t size () const
 
void reset ()
 
bool wasrun () const
 
bool accept () const
 
bool error () const
 
HLTPathStatus const & at (std::size_t const i) const
 
HLTPathStatusat (std::size_t const i)
 
HLTPathStatus const & operator[] (std::size_t const i) const
 
HLTPathStatusoperator[] (std::size_t const i)
 
bool wasrun (std::size_t const i) const
 
bool accept (std::size_t const i) const
 
bool error (std::size_t const i) const
 
hlt::HLTState state (std::size_t const i) const
 
std::size_t index (std::size_t const i) const
 
void reset (std::size_t const i)
 
void swap (HLTGlobalStatus &other)
 
HLTGlobalStatusoperator= (HLTGlobalStatus const &rhs)
 

Private Member Functions

bool state_on_demand (std::size_t const icase) const
 

Private Attributes

std::vector< HLTPathStatuspaths_ {}
 

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

art::HLTGlobalStatus::HLTGlobalStatus ( )
default
art::HLTGlobalStatus::HLTGlobalStatus ( std::size_t const  n)
inlineexplicit

Definition at line 32 of file HLTGlobalStatus.h.

32 : paths_(n) {}
std::vector< HLTPathStatus > paths_

Member Function Documentation

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

Definition at line 59 of file HLTGlobalStatus.h.

References state_on_demand().

Referenced by art::Schedule::runTriggerPaths_().

60  {
61  return state_on_demand(1);
62  }
bool state_on_demand(std::size_t const icase) const
bool art::HLTGlobalStatus::accept ( std::size_t const  i) const
inline

Definition at line 97 of file HLTGlobalStatus.h.

References art::HLTPathStatus::accept(), and at().

98  {
99  return at(i).accept();
100  }
HLTPathStatus const & at(std::size_t const i) const
bool accept() const
Definition: HLTPathStatus.h:78
HLTPathStatus const& art::HLTGlobalStatus::at ( std::size_t const  i) const
inline

Definition at line 73 of file HLTGlobalStatus.h.

References paths_.

Referenced by accept(), error(), index(), reset(), state(), and wasrun().

74  {
75  return paths_.at(i);
76  }
std::vector< HLTPathStatus > paths_
HLTPathStatus& art::HLTGlobalStatus::at ( std::size_t const  i)
inline

Definition at line 78 of file HLTGlobalStatus.h.

References paths_.

79  {
80  return paths_.at(i);
81  }
std::vector< HLTPathStatus > paths_
bool art::HLTGlobalStatus::error ( ) const
inline

Definition at line 65 of file HLTGlobalStatus.h.

References state_on_demand().

66  {
67  return state_on_demand(2);
68  }
bool state_on_demand(std::size_t const icase) const
bool art::HLTGlobalStatus::error ( std::size_t const  i) const
inline

Definition at line 103 of file HLTGlobalStatus.h.

References at(), and art::HLTPathStatus::error().

104  {
105  return at(i).error();
106  }
bool error() const
Definition: HLTPathStatus.h:84
HLTPathStatus const & at(std::size_t const i) const
std::size_t art::HLTGlobalStatus::index ( std::size_t const  i) const
inline

Definition at line 116 of file HLTGlobalStatus.h.

References at(), and art::HLTPathStatus::index().

117  {
118  return at(i).index();
119  }
HLTPathStatus const & at(std::size_t const i) const
unsigned int index() const
Definition: HLTPathStatus.h:58
HLTGlobalStatus& art::HLTGlobalStatus::operator= ( HLTGlobalStatus const &  rhs)
inline

Definition at line 135 of file HLTGlobalStatus.h.

References swap(), and APDHVSetting::temp.

136  {
137  HLTGlobalStatus temp(rhs);
138  this->swap(temp);
139  return *this;
140  }
HLTGlobalStatus()=default
void swap(HLTGlobalStatus &other)
HLTPathStatus const& art::HLTGlobalStatus::operator[] ( std::size_t const  i) const
inline

Definition at line 83 of file HLTGlobalStatus.h.

References paths_.

84  {
85  return paths_.at(i);
86  }
std::vector< HLTPathStatus > paths_
HLTPathStatus& art::HLTGlobalStatus::operator[] ( std::size_t const  i)
inline

Definition at line 87 of file HLTGlobalStatus.h.

References paths_.

87 { return paths_.at(i); }
std::vector< HLTPathStatus > paths_
void art::HLTGlobalStatus::reset ( )
inline

Definition at line 43 of file HLTGlobalStatus.h.

References cet::for_all(), path, and paths_.

Referenced by art::Schedule::process().

44  {
45  cet::for_all(paths_, [](auto& path) { path.reset(); });
46  }
std::vector< HLTPathStatus > paths_
const std::string path
Definition: plot_BEN.C:43
auto for_all(FwdCont &, Func)
void art::HLTGlobalStatus::reset ( std::size_t const  i)
inline

Definition at line 122 of file HLTGlobalStatus.h.

References at(), and art::HLTPathStatus::reset().

123  {
124  at(i).reset();
125  }
HLTPathStatus const & at(std::size_t const i) const
std::size_t art::HLTGlobalStatus::size ( void  ) const
inline

Definition at line 36 of file HLTGlobalStatus.h.

References paths_.

Referenced by art::TriggerNamesService::getTrigPaths(), art::operator<<(), and state_on_demand().

37  {
38  return paths_.size();
39  }
std::vector< HLTPathStatus > paths_
hlt::HLTState art::HLTGlobalStatus::state ( std::size_t const  i) const
inline

Definition at line 110 of file HLTGlobalStatus.h.

References at(), and art::HLTPathStatus::state().

Referenced by art::operator<<(), and state_on_demand().

111  {
112  return at(i).state();
113  }
HLTPathStatus const & at(std::size_t const i) const
hlt::HLTState state() const
Definition: HLTPathStatus.h:52
bool art::HLTGlobalStatus::state_on_demand ( std::size_t const  icase) const
inlineprivate

Definition at line 145 of file HLTGlobalStatus.h.

References art::hlt::Exception, MECModelEnuComparisons::i, getGoodRuns4SAM::n, art::hlt::Pass, paths_, art::hlt::Ready, size(), and state().

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

146  {
147  bool flags[3]{false, false, false};
148  for (std::size_t i{}, n{size()}; i != n; ++i) {
149  auto const s = state(i);
150  if (s != hlt::Ready) {
151  flags[0] = true; // at least one trigger was run
152  if (s == hlt::Pass) {
153  flags[1] = true; // at least one trigger accepted
154  } else if (s == hlt::Exception) {
155  flags[2] = true; // at least one trigger with error
156  }
157  }
158  }
159  // Change in semantics of flags[1] vs pre-art: now we accept if
160  // no paths were run.
161  flags[1] |= (!flags[0]) | paths_.empty();
162  return flags[icase];
163  }
std::vector< HLTPathStatus > paths_
::xsd::cxx::tree::flags flags
Definition: Database.h:214
hlt::HLTState state(std::size_t const i) const
const XML_Char * s
Definition: expat.h:262
not [yet] run
Definition: HLTenums.h:15
std::size_t size() const
accept
Definition: HLTenums.h:16
void art::HLTGlobalStatus::swap ( HLTGlobalStatus other)
inline

Definition at line 128 of file HLTGlobalStatus.h.

References paths_.

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

129  {
130  paths_.swap(other.paths_);
131  }
std::vector< HLTPathStatus > paths_
bool art::HLTGlobalStatus::wasrun ( ) const
inline

Definition at line 52 of file HLTGlobalStatus.h.

References state_on_demand().

53  {
54  return state_on_demand(0);
55  }
bool state_on_demand(std::size_t const icase) const
bool art::HLTGlobalStatus::wasrun ( std::size_t const  i) const
inline

Definition at line 91 of file HLTGlobalStatus.h.

References at(), and art::HLTPathStatus::wasrun().

92  {
93  return at(i).wasrun();
94  }
bool wasrun() const
Definition: HLTPathStatus.h:71
HLTPathStatus const & at(std::size_t const i) const

Member Data Documentation

std::vector<HLTPathStatus> art::HLTGlobalStatus::paths_ {}
private

Definition at line 27 of file HLTGlobalStatus.h.

Referenced by at(), operator[](), reset(), size(), state_on_demand(), and swap().


The documentation for this class was generated from the following file: