LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::TriggerResults Class Reference

#include "TriggerResults.h"

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

Public Member Functions

 ~TriggerResults () noexcept
 
 TriggerResults ()
 
 TriggerResults (HLTGlobalStatus const &hlt, fhicl::ParameterSetID const &psetid)
 
fhicl::ParameterSetID const & parameterSetID () const
 
std::size_t size () const
 
void reset ()
 
void reset (unsigned const i)
 
bool wasrun () const
 
bool wasrun (unsigned const i) const
 
bool accept () const
 
bool accept (unsigned const i) const
 
bool error () const
 
bool error (unsigned const i) const
 
HLTPathStatus const & at (unsigned const i) const
 
HLTPathStatusat (unsigned const i)
 
hlt::HLTState state (unsigned const i) const
 
unsigned index (unsigned const i) const
 

Private Attributes

fhicl::ParameterSetID psetid_ {}
 

Detailed Description

Definition at line 22 of file TriggerResults.h.

Constructor & Destructor Documentation

art::TriggerResults::~TriggerResults ( )
defaultnoexcept
art::TriggerResults::TriggerResults ( )
default
art::TriggerResults::TriggerResults ( HLTGlobalStatus const &  hlt,
fhicl::ParameterSetID const &  psetid 
)

Definition at line 13 of file TriggerResults.cc.

15  : HLTGlobalStatus{hlt}, psetid_{psetID}
16  {}
fhicl::ParameterSetID psetid_
HLTGlobalStatus(std::size_t n=0)

Member Function Documentation

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

Definition at line 51 of file HLTGlobalStatus.cc.

References util::empty(), art::hlt::Pass, art::HLTGlobalStatus::paths_, and art::hlt::Ready.

Referenced by art::TriggerPathsExecutor::process_event_paths_done().

52  {
53  if (empty(paths_)) {
54  return true;
55  }
56 
57  bool at_least_one_ran = false;
58  bool at_least_one_accepted = false;
59 
60  for (auto const& path_status : paths_) {
61  auto const s(path_status.state());
62  if (s != hlt::Ready) {
63  at_least_one_ran = true;
64  if (s == hlt::Pass) {
65  at_least_one_accepted = true;
66  }
67  }
68  }
69 
70  if (!at_least_one_ran) {
71  return true;
72  }
73  return at_least_one_accepted;
74  }
std::vector< HLTPathStatus > paths_
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109
bool art::HLTGlobalStatus::accept ( unsigned const  i) const
inherited

Definition at line 103 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

104  {
105  return paths_.at(i).accept();
106  }
std::vector< HLTPathStatus > paths_
HLTPathStatus const & art::HLTGlobalStatus::at ( unsigned const  i) const
inherited

Definition at line 85 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

86  {
87  return paths_.at(i);
88  }
std::vector< HLTPathStatus > paths_
HLTPathStatus & art::HLTGlobalStatus::at ( unsigned const  i)
inherited

Definition at line 91 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

92  {
93  return paths_.at(i);
94  }
std::vector< HLTPathStatus > paths_
bool art::HLTGlobalStatus::error ( ) const
inherited

Definition at line 77 of file HLTGlobalStatus.cc.

References util::begin(), util::end(), art::hlt::Exception, and art::HLTGlobalStatus::paths_.

Referenced by art::EventSelector::selectionDecision().

78  {
79  return std::any_of(begin(paths_), end(paths_), [](auto const& path_status) {
80  return path_status.state() == hlt::Exception;
81  });
82  }
std::vector< HLTPathStatus > paths_
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69
bool art::HLTGlobalStatus::error ( unsigned const  i) const
inherited

Definition at line 109 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

110  {
111  return paths_.at(i).error();
112  }
std::vector< HLTPathStatus > paths_
unsigned art::HLTGlobalStatus::index ( unsigned const  i) const
inherited

Definition at line 121 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

122  {
123  return paths_.at(i).index();
124  }
std::vector< HLTPathStatus > paths_
fhicl::ParameterSetID const & art::TriggerResults::parameterSetID ( ) const

Definition at line 19 of file TriggerResults.cc.

Referenced by art::EventSelector::acceptEvent(), and art::EventSelector::data_for().

20  {
21  return psetid_;
22  }
fhicl::ParameterSetID psetid_
void art::HLTGlobalStatus::reset ( )
inherited

Definition at line 35 of file HLTGlobalStatus.cc.

References util::begin(), util::end(), and art::HLTGlobalStatus::paths_.

36  {
37  std::for_each(begin(paths_), end(paths_), [](auto& path_status) {
38  path_status.reset();
39  });
40  }
std::vector< HLTPathStatus > paths_
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69
void art::HLTGlobalStatus::reset ( unsigned const  i)
inherited

Definition at line 127 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

128  {
129  paths_.at(i).reset();
130  atomic_thread_fence(memory_order_seq_cst);
131  }
std::vector< HLTPathStatus > paths_
std::size_t art::HLTGlobalStatus::size ( void  ) const
inherited

Definition at line 29 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

Referenced by art::EventSelector::data_for(), and art::operator<<().

30  {
31  return paths_.size();
32  }
std::vector< HLTPathStatus > paths_
hlt::HLTState art::HLTGlobalStatus::state ( unsigned const  i) const
inherited

Definition at line 115 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

Referenced by art::operator<<().

116  {
117  return paths_.at(i).state();
118  }
std::vector< HLTPathStatus > paths_
bool art::HLTGlobalStatus::wasrun ( ) const
inherited

Definition at line 43 of file HLTGlobalStatus.cc.

References util::begin(), util::end(), art::HLTGlobalStatus::paths_, and art::hlt::Ready.

44  {
45  return std::any_of(begin(paths_), end(paths_), [](auto const& path_status) {
46  return path_status.state() != hlt::Ready;
47  });
48  }
std::vector< HLTPathStatus > paths_
decltype(auto) constexpr end(T &&obj)
ADL-aware version of std::end.
Definition: StdUtils.h:77
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:69
bool art::HLTGlobalStatus::wasrun ( unsigned const  i) const
inherited

Definition at line 97 of file HLTGlobalStatus.cc.

References art::HLTGlobalStatus::paths_.

98  {
99  return paths_.at(i).wasrun();
100  }
std::vector< HLTPathStatus > paths_

Member Data Documentation

fhicl::ParameterSetID art::TriggerResults::psetid_ {}
private

Definition at line 34 of file TriggerResults.h.


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