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

#include "HLTGlobalStatus.h"

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

Public Member Functions

 ~HLTGlobalStatus ()
 
 HLTGlobalStatus (std::size_t n=0)
 
 HLTGlobalStatus (HLTGlobalStatus const &)
 
 HLTGlobalStatus (HLTGlobalStatus &&)
 
HLTGlobalStatusoperator= (HLTGlobalStatus const &)
 
HLTGlobalStatusoperator= (HLTGlobalStatus &&)
 
std::size_t size () const
 
void reset ()
 
bool wasrun () const
 
bool accept () const
 
bool error () const
 
HLTPathStatus const & at (unsigned const i) const
 
HLTPathStatusat (unsigned const i)
 
bool wasrun (unsigned const i) const
 
bool accept (unsigned const i) const
 
bool error (unsigned const i) const
 
hlt::HLTState state (unsigned const i) const
 
unsigned index (unsigned const i) const
 
void reset (unsigned const i)
 

Private Attributes

std::vector< HLTPathStatuspaths_
 

Detailed Description

Definition at line 13 of file HLTGlobalStatus.h.

Constructor & Destructor Documentation

art::HLTGlobalStatus::~HLTGlobalStatus ( )
default
art::HLTGlobalStatus::HLTGlobalStatus ( std::size_t  n = 0)
explicit

Definition at line 20 of file HLTGlobalStatus.cc.

References operator=().

20 : paths_(n) {}
std::vector< HLTPathStatus > paths_
Char_t n[5]
art::HLTGlobalStatus::HLTGlobalStatus ( HLTGlobalStatus const &  )
default
art::HLTGlobalStatus::HLTGlobalStatus ( HLTGlobalStatus &&  )
default

Member Function Documentation

bool art::HLTGlobalStatus::accept ( ) const

Definition at line 51 of file HLTGlobalStatus.cc.

References util::empty(), art::hlt::Pass, 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

Definition at line 103 of file HLTGlobalStatus.cc.

References paths_.

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

Definition at line 85 of file HLTGlobalStatus.cc.

References paths_.

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

Definition at line 91 of file HLTGlobalStatus.cc.

References paths_.

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

Definition at line 77 of file HLTGlobalStatus.cc.

References util::begin(), util::end(), art::hlt::Exception, and 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

Definition at line 109 of file HLTGlobalStatus.cc.

References paths_.

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

Definition at line 121 of file HLTGlobalStatus.cc.

References paths_.

122  {
123  return paths_.at(i).index();
124  }
std::vector< HLTPathStatus > paths_
HLTGlobalStatus & art::HLTGlobalStatus::operator= ( HLTGlobalStatus const &  )
default

Referenced by HLTGlobalStatus().

HLTGlobalStatus & art::HLTGlobalStatus::operator= ( HLTGlobalStatus &&  )
default
void art::HLTGlobalStatus::reset ( )

Definition at line 35 of file HLTGlobalStatus.cc.

References util::begin(), util::end(), and 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)

Definition at line 127 of file HLTGlobalStatus.cc.

References 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

Definition at line 29 of file HLTGlobalStatus.cc.

References 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

Definition at line 115 of file HLTGlobalStatus.cc.

References paths_.

Referenced by art::operator<<().

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

Definition at line 43 of file HLTGlobalStatus.cc.

References util::begin(), util::end(), 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

Definition at line 97 of file HLTGlobalStatus.cc.

References paths_.

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

Member Data Documentation

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

Definition at line 39 of file HLTGlobalStatus.h.

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


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