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

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Framework/Core/Path.h"

Public Types

using State = hlt::HLTState
 
using WorkersInPath = std::vector< WorkerInPath >
 
using size_type = WorkersInPath::size_type
 
using TrigResPtr = cet::exempt_ptr< HLTGlobalStatus >
 

Public Member Functions

 Path (int bitpos, std::string const &path_name, WorkersInPath &&workers, TrigResPtr pathResults, ActionTable const &actions, ActivityRegistry &reg, bool isEndPath)
 
template<typename T >
void process (typename T::MyPrincipal &)
 
int bitPosition () const
 
std::string const & name () const
 
void clearCounters ()
 
std::size_t timesRun () const
 
std::size_t timesPassed () const
 
std::size_t timesFailed () const
 
std::size_t timesExcept () const
 
State state () const
 
auto const & workersInPath () const
 
void findEventModifiers (std::vector< std::string > &foundLabels) const
 
void findEventObservers (std::vector< std::string > &foundLabels) const
 

Private Member Functions

void findByModifiesEvent (bool modifies, std::vector< std::string > &foundLabels) const
 
bool handleWorkerFailure (cet::exception const &e, int nwrwue, bool isEvent)
 
void recordUnknownException (int nwrwue, bool isEvent)
 
void recordStatus (int nwrwue, bool isEvent)
 
void updateCounters (bool succeed, bool isEvent)
 

Private Attributes

std::size_t timesRun_ {}
 
std::size_t timesPassed_ {}
 
std::size_t timesFailed_ {}
 
std::size_t timesExcept_ {}
 
State state_ {hlt::Ready}
 
int bitpos_
 
std::string name_
 
TrigResPtr trptr_
 
ActivityRegistryactReg_
 
ActionTable const & act_table_
 
WorkersInPath workers_
 
bool isEndPath_
 

Detailed Description

Definition at line 32 of file Path.h.

Member Typedef Documentation

using art::Path::size_type = WorkersInPath::size_type

Definition at line 37 of file Path.h.

Definition at line 34 of file Path.h.

Definition at line 38 of file Path.h.

using art::Path::WorkersInPath = std::vector<WorkerInPath>

Definition at line 36 of file Path.h.

Constructor & Destructor Documentation

art::Path::Path ( int  bitpos,
std::string const &  path_name,
WorkersInPath &&  workers,
TrigResPtr  pathResults,
ActionTable const &  actions,
ActivityRegistry reg,
bool  isEndPath 
)

Member Function Documentation

int art::Path::bitPosition ( ) const
inline

Definition at line 52 of file Path.h.

References bitpos_, and string.

Referenced by process().

53  {
54  return bitpos_;
55  }
int bitpos_
Definition: Path.h:109
void art::Path::clearCounters ( )

Referenced by name().

void art::Path::findByModifiesEvent ( bool  modifies,
std::vector< std::string > &  foundLabels 
) const
private

Referenced by workersInPath().

void art::Path::findEventModifiers ( std::vector< std::string > &  foundLabels) const

Referenced by workersInPath().

void art::Path::findEventObservers ( std::vector< std::string > &  foundLabels) const

Referenced by workersInPath().

bool art::Path::handleWorkerFailure ( cet::exception const &  e,
int  nwrwue,
bool  isEvent 
)
private

Referenced by process().

std::string const& art::Path::name ( ) const
inline
template<typename T >
void art::Path::process ( typename T::MyPrincipal &  ep)

Definition at line 129 of file Path.h.

References actReg_, bitPosition(), e, febshutoff_auto::end, lem_server::ep, art::Event, handleWorkerFailure(), isEndPath_, it, name_, art::hlt::Ready, recordStatus(), recordUnknownException(), state_, fabricate::status, T, timesRun_, updateCounters(), and workers_.

130 {
131  int nwrwue{-1}; // numWorkersRunWithoutUnhandledException
132  T::prePathSignal(actReg_, name_);
133 
134  if (T::level == Level::Event) {
135  ++timesRun_;
136  }
137  state_ = hlt::Ready;
138 
139  bool should_continue{true};
140  CurrentProcessingContext cpc{&name_, bitPosition(), isEndPath_};
141 
142  for (auto it = workers_.begin(), end = workers_.end();
143  it != end && should_continue;
144  ++it) {
145  ++nwrwue;
146  try {
147  cpc.activate(nwrwue, it->getWorker()->descPtr());
148  should_continue = it->runWorker<T>(ep, &cpc);
149  }
150  catch (cet::exception& e) {
151  // handleWorkerFailure may throw a new exception.
152  should_continue =
153  handleWorkerFailure(e, nwrwue, T::level == Level::Event);
154  }
155  catch (...) {
156  recordUnknownException(nwrwue, T::level == Level::Event);
157  throw;
158  }
159  }
160  updateCounters(should_continue, T::level == Level::Event);
161  recordStatus(nwrwue, T::level == Level::Event);
162  HLTPathStatus const status(state_, nwrwue);
163  T::postPathSignal(actReg_, name_, status);
164 }
void recordStatus(int nwrwue, bool isEvent)
void recordUnknownException(int nwrwue, bool isEvent)
int status
Definition: fabricate.py:1613
set< int >::iterator it
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
void updateCounters(bool succeed, bool isEvent)
ActivityRegistry & actReg_
Definition: Path.h:112
not [yet] run
Definition: HLTenums.h:15
std::string name_
Definition: Path.h:110
bool handleWorkerFailure(cet::exception const &e, int nwrwue, bool isEvent)
std::size_t timesRun_
Definition: Path.h:103
int bitPosition() const
Definition: Path.h:52
WorkersInPath workers_
Definition: Path.h:115
double T
Definition: Xdiff_gwt.C:5
bool isEndPath_
Definition: Path.h:117
Float_t e
Definition: plot.C:35
State state_
Definition: Path.h:107
void art::Path::recordStatus ( int  nwrwue,
bool  isEvent 
)
private

Referenced by process().

void art::Path::recordUnknownException ( int  nwrwue,
bool  isEvent 
)
private

Referenced by process().

State art::Path::state ( ) const
inline

Definition at line 85 of file Path.h.

References state_.

86  {
87  return state_;
88  }
State state_
Definition: Path.h:107
std::size_t art::Path::timesExcept ( ) const
inline

Definition at line 80 of file Path.h.

References timesExcept_.

81  {
82  return timesExcept_;
83  }
std::size_t timesExcept_
Definition: Path.h:106
std::size_t art::Path::timesFailed ( ) const
inline

Definition at line 75 of file Path.h.

References timesFailed_.

76  {
77  return timesFailed_;
78  }
std::size_t timesFailed_
Definition: Path.h:105
std::size_t art::Path::timesPassed ( ) const
inline

Definition at line 70 of file Path.h.

References timesPassed_.

71  {
72  return timesPassed_;
73  }
std::size_t timesPassed_
Definition: Path.h:104
std::size_t art::Path::timesRun ( ) const
inline

Definition at line 65 of file Path.h.

References timesRun_.

66  {
67  return timesRun_;
68  }
std::size_t timesRun_
Definition: Path.h:103
void art::Path::updateCounters ( bool  succeed,
bool  isEvent 
)
private

Referenced by process().

auto const& art::Path::workersInPath ( ) const
inline

Definition at line 91 of file Path.h.

References findByModifiesEvent(), findEventModifiers(), findEventObservers(), and workers_.

92  {
93  return workers_;
94  }
WorkersInPath workers_
Definition: Path.h:115

Member Data Documentation

ActionTable const& art::Path::act_table_
private

Definition at line 113 of file Path.h.

ActivityRegistry& art::Path::actReg_
private

Definition at line 112 of file Path.h.

Referenced by process().

int art::Path::bitpos_
private

Definition at line 109 of file Path.h.

Referenced by bitPosition().

bool art::Path::isEndPath_
private

Definition at line 117 of file Path.h.

Referenced by process().

std::string art::Path::name_
private

Definition at line 110 of file Path.h.

Referenced by name(), and process().

State art::Path::state_ {hlt::Ready}
private

Definition at line 107 of file Path.h.

Referenced by process(), and state().

std::size_t art::Path::timesExcept_ {}
private

Definition at line 106 of file Path.h.

Referenced by timesExcept().

std::size_t art::Path::timesFailed_ {}
private

Definition at line 105 of file Path.h.

Referenced by timesFailed().

std::size_t art::Path::timesPassed_ {}
private

Definition at line 104 of file Path.h.

Referenced by timesPassed().

std::size_t art::Path::timesRun_ {}
private

Definition at line 103 of file Path.h.

Referenced by process(), and timesRun().

TrigResPtr art::Path::trptr_
private

Definition at line 111 of file Path.h.

WorkersInPath art::Path::workers_
private

Definition at line 115 of file Path.h.

Referenced by process(), and workersInPath().


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