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

#include <PathsInfo.h>

Public Member Functions

std::map< std::string, std::shared_ptr< Worker > > & workers ()
 
std::map< std::string, std::shared_ptr< Worker > > const & workers () const
 
void add_path (ActionTable const &, ActivityRegistry const &, PathContext const &, std::vector< WorkerInPath > &&, GlobalTaskGroup &)
 
std::vector< Path > & paths ()
 
std::vector< Path > const & paths () const
 
std::vector< std::stringpathNames () const
 
HLTGlobalStatuspathResults ()
 
void reset ()
 
void reset_for_event ()
 
void incrementTotalEventCount ()
 
void incrementPassedEventCount ()
 
std::size_t passedEvents () const
 
std::size_t failedEvents () const
 
std::size_t totalEvents () const
 

Private Attributes

std::map< std::string, std::shared_ptr< Worker > > workers_ {}
 
std::vector< Pathpaths_ {}
 
HLTGlobalStatus pathResults_ {}
 
std::atomic< std::size_t > totalEvents_ {}
 
std::atomic< std::size_t > passedEvents_ {}
 

Detailed Description

Definition at line 16 of file PathsInfo.h.

Member Function Documentation

void art::PathsInfo::add_path ( ActionTable const &  actions,
ActivityRegistry const &  registry,
PathContext const &  pc,
std::vector< WorkerInPath > &&  wips,
GlobalTaskGroup task_group 
)

Definition at line 31 of file PathsInfo.cc.

36  {
37  if (pc.pathName() == PathContext::end_path()) {
38  paths_.emplace_back(
39  actions, registry, pc, move(wips), nullptr, task_group);
40  } else {
41  paths_.emplace_back(
42  actions, registry, pc, move(wips), &pathResults_, task_group);
43  pathResults_ = HLTGlobalStatus(size(paths_));
44  }
45  TDEBUG_FUNC_SI(5, pc.scheduleID())
46  << "Made path " << std::hex << &paths_.back() << std::dec
47  << " pathID: " << to_string(pc.pathID()) << " name: " << pc.pathName();
48  }
static std::string end_path()
Definition: PathContext.h:14
QTextStream & hex(QTextStream &s)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
def move(depos, offset)
Definition: depos.py:107
#define TDEBUG_FUNC_SI(LEVEL, SI)
std::vector< Path > paths_
Definition: PathsInfo.h:40
QTextStream & dec(QTextStream &s)
HLTGlobalStatus pathResults_
Definition: PathsInfo.h:41
Namespace containing all the test actions.
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
size_t art::PathsInfo::failedEvents ( ) const

Definition at line 113 of file PathsInfo.cc.

114  {
115  return totalEvents_.load() - passedEvents_.load();
116  }
std::atomic< std::size_t > totalEvents_
Definition: PathsInfo.h:42
std::atomic< std::size_t > passedEvents_
Definition: PathsInfo.h:43
void art::PathsInfo::incrementPassedEventCount ( )

Definition at line 101 of file PathsInfo.cc.

102  {
103  ++passedEvents_;
104  }
std::atomic< std::size_t > passedEvents_
Definition: PathsInfo.h:43
void art::PathsInfo::incrementTotalEventCount ( )

Definition at line 95 of file PathsInfo.cc.

96  {
97  ++totalEvents_;
98  }
std::atomic< std::size_t > totalEvents_
Definition: PathsInfo.h:42
size_t art::PathsInfo::passedEvents ( ) const

Definition at line 107 of file PathsInfo.cc.

108  {
109  return passedEvents_.load();
110  }
std::atomic< std::size_t > passedEvents_
Definition: PathsInfo.h:43
vector< string > art::PathsInfo::pathNames ( ) const

Definition at line 63 of file PathsInfo.cc.

64  {
65  vector<string> result;
66  std::transform(begin(paths_),
67  end(paths_),
68  back_inserter(result),
69  [](auto const& path) { return path.name(); });
70  return result;
71  }
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
static QCString result
std::vector< Path > paths_
Definition: PathsInfo.h:40
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
Definition: StdUtils.h:72
HLTGlobalStatus & art::PathsInfo::pathResults ( )

Definition at line 89 of file PathsInfo.cc.

90  {
91  return pathResults_;
92  }
HLTGlobalStatus pathResults_
Definition: PathsInfo.h:41
vector< Path > & art::PathsInfo::paths ( )

Definition at line 51 of file PathsInfo.cc.

52  {
53  return paths_;
54  }
std::vector< Path > paths_
Definition: PathsInfo.h:40
vector< Path > const & art::PathsInfo::paths ( ) const

Definition at line 57 of file PathsInfo.cc.

58  {
59  return paths_;
60  }
std::vector< Path > paths_
Definition: PathsInfo.h:40
void art::PathsInfo::reset ( )

Definition at line 74 of file PathsInfo.cc.

75  {
76  for (auto const& val : workers_) {
77  val.second->reset();
78  }
79  }
std::map< std::string, std::shared_ptr< Worker > > workers_
Definition: PathsInfo.h:39
void art::PathsInfo::reset_for_event ( )

Definition at line 82 of file PathsInfo.cc.

83  {
84  reset();
86  }
HLTGlobalStatus pathResults_
Definition: PathsInfo.h:41
void reset()
Definition: PathsInfo.cc:74
size_t art::PathsInfo::totalEvents ( ) const

Definition at line 119 of file PathsInfo.cc.

120  {
121  return totalEvents_.load();
122  }
std::atomic< std::size_t > totalEvents_
Definition: PathsInfo.h:42
map< string, std::shared_ptr< Worker > > & art::PathsInfo::workers ( )

Definition at line 19 of file PathsInfo.cc.

20  {
21  return workers_;
22  }
std::map< std::string, std::shared_ptr< Worker > > workers_
Definition: PathsInfo.h:39
map< string, std::shared_ptr< Worker > > const & art::PathsInfo::workers ( ) const

Definition at line 25 of file PathsInfo.cc.

26  {
27  return workers_;
28  }
std::map< std::string, std::shared_ptr< Worker > > workers_
Definition: PathsInfo.h:39

Member Data Documentation

std::atomic<std::size_t> art::PathsInfo::passedEvents_ {}
private

Definition at line 43 of file PathsInfo.h.

HLTGlobalStatus art::PathsInfo::pathResults_ {}
private

Definition at line 41 of file PathsInfo.h.

std::vector<Path> art::PathsInfo::paths_ {}
private

Definition at line 40 of file PathsInfo.h.

std::atomic<std::size_t> art::PathsInfo::totalEvents_ {}
private

Definition at line 42 of file PathsInfo.h.

std::map<std::string, std::shared_ptr<Worker> > art::PathsInfo::workers_ {}
private

Definition at line 39 of file PathsInfo.h.


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