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

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

Public Member Functions

 Schedule (ScheduleID, PathManager &, fhicl::ParameterSet const &, TriggerNamesService const &, MasterProductRegistry &, ProductDescriptions &, ActionTable &, ActivityRegistry &, bool const parentageEnabled, bool const rangesEnabled)
 
template<typename T >
void process (typename T::MyPrincipal &)
 
void beginJob ()
 
void endJob ()
 
void respondToOpenInputFile (FileBlock const &)
 
void respondToCloseInputFile (FileBlock const &)
 
void respondToOpenOutputFiles (FileBlock const &)
 
void respondToCloseOutputFiles (FileBlock const &)
 

Private Member Functions

void makeTriggerResultsInserter_ (fhicl::ParameterSet const &trig_pset, MasterProductRegistry &mpr, ProductDescriptions &productsToProduce, ActivityRegistry &areg)
 
template<typename T >
bool runTriggerPaths_ (typename T::MyPrincipal &)
 
template<class F >
void doForAllWorkers_ (F functor)
 
template<class F >
void doForAllEnabledPaths_ (F functor)
 

Private Attributes

ScheduleID const sID_
 
fhicl::ParameterSet process_pset_
 
ActionTableact_table_
 
std::string processName_
 
PathsInfotriggerPathsInfo_
 
std::vector< unsigned char > pathsEnabled_
 
std::unique_ptr< Workerresults_inserter_ {nullptr}
 
bool const parentageEnabled_ {true}
 
bool const rangesEnabled_ {true}
 

Detailed Description

Definition at line 62 of file Schedule.h.

Constructor & Destructor Documentation

art::Schedule::Schedule ( ScheduleID  ,
PathManager ,
fhicl::ParameterSet const &  ,
TriggerNamesService const &  ,
MasterProductRegistry ,
ProductDescriptions ,
ActionTable ,
ActivityRegistry ,
bool const  parentageEnabled,
bool const  rangesEnabled 
)

Member Function Documentation

void art::Schedule::beginJob ( )
template<class F >
void art::Schedule::doForAllEnabledPaths_ ( F  functor)
private

Definition at line 179 of file Schedule.h.

References path, art::PathsInfo::pathPtrs(), pathsEnabled_, and triggerPathsInfo_.

Referenced by runTriggerPaths_().

180  {
181  size_t path_index = 0;
182  for (auto const& path : triggerPathsInfo_.pathPtrs()) {
183  if (pathsEnabled_[path_index++]) {
184  functor(path.get());
185  }
186  }
187  }
std::vector< unsigned char > pathsEnabled_
Definition: Schedule.h:115
const std::string path
Definition: plot_BEN.C:43
PathsInfo & triggerPathsInfo_
Definition: Schedule.h:114
PathPtrs const & pathPtrs() const
Definition: PathsInfo.h:93
template<class F >
void art::Schedule::doForAllWorkers_ ( F  functor)
private

Definition at line 166 of file Schedule.h.

References results_inserter_, triggerPathsInfo_, febshutoff_auto::val, and art::PathsInfo::workers().

Referenced by process().

167  {
168  for (auto const& val : triggerPathsInfo_.workers()) {
169  functor(val.second.get());
170  }
171  if (results_inserter_) {
172  // Do this last -- not part of main list.
173  functor(results_inserter_.get());
174  }
175  }
WorkerMap const & workers() const
Definition: PathsInfo.h:87
PathsInfo & triggerPathsInfo_
Definition: Schedule.h:114
std::unique_ptr< Worker > results_inserter_
Definition: Schedule.h:116
void art::Schedule::endJob ( )
void art::Schedule::makeTriggerResultsInserter_ ( fhicl::ParameterSet const &  trig_pset,
MasterProductRegistry mpr,
ProductDescriptions productsToProduce,
ActivityRegistry areg 
)
private
template<typename T >
void art::Schedule::process ( typename T::MyPrincipal &  principal)

Definition at line 123 of file Schedule.h.

References act_table_, plot_validation_datamc::action, art::PathsInfo::addEvent(), art::PathsInfo::addPass(), ana::assert(), doForAllWorkers_(), e, art::Event, art::actions::FailModule, art::actions::FailPath, art::ActionTable::find(), art::actions::IgnoreCompletely, art::PathsInfo::pathResults(), art::HLTGlobalStatus::reset(), results_inserter_, art::actions::Rethrow, art::actions::SkipEvent, T, triggerPathsInfo_, cet::trim_right_copy(), and w.

124  {
125  doForAllWorkers_([](auto w) { w->reset(); });
127  if (T::level == Level::Event) {
129  }
130  try {
131  if (runTriggerPaths_<T>(principal) && T::level == Level::Event) {
133  }
134  if (results_inserter_.get()) {
135  results_inserter_->doWork<T>(principal, 0);
136  }
137  }
138  catch (cet::exception& e) {
139  actions::ActionCodes const action = {T::level == Level::Event ?
140  act_table_->find(e.root_cause()) :
143  assert(action != actions::FailPath);
144  assert(action != actions::FailModule);
145  if (action == actions::SkipEvent) {
146  mf::LogWarning(e.category())
147  << "an exception occurred and all paths for "
148  "the event are being skipped: \n"
149  << cet::trim_right_copy(e.what(), " \n");
150  } else {
151  throw;
152  }
153  }
154  }
actions::ActionCodes find(std::string const &category) const
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
void addPass()
Definition: PathsInfo.h:81
std::string trim_right_copy(std::string source, std::string const &t=" ")
Definition: trim.h:54
void addEvent()
Definition: PathsInfo.h:75
PathsInfo & triggerPathsInfo_
Definition: Schedule.h:114
std::unique_ptr< Worker > results_inserter_
Definition: Schedule.h:116
HLTGlobalStatus & pathResults()
Definition: PathsInfo.h:69
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
assert(nhit_max >=nhit_nbins)
void doForAllWorkers_(F functor)
Definition: Schedule.h:166
double T
Definition: Xdiff_gwt.C:5
Float_t e
Definition: plot.C:35
Float_t w
Definition: plot.C:20
ActionTable * act_table_
Definition: Schedule.h:112
void art::Schedule::respondToCloseInputFile ( FileBlock const &  )
void art::Schedule::respondToCloseOutputFiles ( FileBlock const &  )
void art::Schedule::respondToOpenInputFile ( FileBlock const &  )
void art::Schedule::respondToOpenOutputFiles ( FileBlock const &  )
template<typename T >
bool art::Schedule::runTriggerPaths_ ( typename T::MyPrincipal &  ep)
inlineprivate

Definition at line 158 of file Schedule.h.

References art::HLTGlobalStatus::accept(), doForAllEnabledPaths_(), lem_server::ep, art::PathsInfo::pathResults(), and triggerPathsInfo_.

159  {
160  doForAllEnabledPaths_([&ep](auto p) { p->template process<T>(ep); });
162  }
void doForAllEnabledPaths_(F functor)
Definition: Schedule.h:179
const char * p
Definition: xmltok.h:285
PathsInfo & triggerPathsInfo_
Definition: Schedule.h:114
HLTGlobalStatus & pathResults()
Definition: PathsInfo.h:69
bool accept() const

Member Data Documentation

ActionTable* art::Schedule::act_table_
private

Definition at line 112 of file Schedule.h.

Referenced by process().

bool const art::Schedule::parentageEnabled_ {true}
private

Definition at line 117 of file Schedule.h.

std::vector<unsigned char> art::Schedule::pathsEnabled_
private

Definition at line 115 of file Schedule.h.

Referenced by doForAllEnabledPaths_().

fhicl::ParameterSet art::Schedule::process_pset_
private

Definition at line 111 of file Schedule.h.

std::string art::Schedule::processName_
private

Definition at line 113 of file Schedule.h.

bool const art::Schedule::rangesEnabled_ {true}
private

Definition at line 118 of file Schedule.h.

std::unique_ptr<Worker> art::Schedule::results_inserter_ {nullptr}
private

Definition at line 116 of file Schedule.h.

Referenced by doForAllWorkers_(), and process().

ScheduleID const art::Schedule::sID_
private

Definition at line 110 of file Schedule.h.

PathsInfo& art::Schedule::triggerPathsInfo_
private

Definition at line 114 of file Schedule.h.

Referenced by doForAllEnabledPaths_(), doForAllWorkers_(), process(), and runTriggerPaths_().


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