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

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

Public Member Functions

 EndPathExecutor (PathManager &pm, ActionTable &actions, ActivityRegistry &areg, MasterProductRegistry &mpr, bool const parentageEnabled, bool const rangesEnabled)
 
template<typename T >
void process (typename T::MyPrincipal &principal)
 
void beginJob ()
 
void endJob ()
 
void writeEvent (EventPrincipal &ep)
 
void writeSubRun (SubRunPrincipal &srp)
 
void writeRun (RunPrincipal &rp)
 
void seedRunRangeSet (std::unique_ptr< RangeSetHandler >)
 
void seedSubRunRangeSet (std::unique_ptr< RangeSetHandler >)
 
void setAuxiliaryRangeSetID (SubRunPrincipal &srp)
 
void setAuxiliaryRangeSetID (RunPrincipal &rp)
 
void closeAllOutputFiles ()
 
void openAllOutputFiles (FileBlock &fb)
 
void closeSomeOutputFiles ()
 
void openSomeOutputFiles (FileBlock const &fb)
 
void setOutputFileStatus (OutputFileStatus)
 
void respondToOpenInputFile (FileBlock const &fb)
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenOutputFiles (FileBlock const &fb)
 
void respondToCloseOutputFiles (FileBlock const &fb)
 
void recordOutputClosureRequests (Granularity)
 
bool outputsToOpen () const
 
bool outputsToClose () const
 
bool someOutputsOpen () const
 
void incrementInputFileNumber ()
 
bool terminate () const
 
void selectProducts (ProductList const &)
 

Private Types

using OutputWorkers = std::vector< OutputWorker * >
 
using OutputWorkerSet = std::set< OutputWorker * >
 

Private Member Functions

void resetAll ()
 
template<typename T >
void runEndPaths (typename T::MyPrincipal &)
 
template<class F >
void doForAllEnabledWorkers_ (F f)
 
template<class F >
void doForAllEnabledOutputWorkers_ (F f)
 

Private Attributes

PathsInfoendPathInfo_
 
ActionTableact_table_
 
ActivityRegistryactReg_
 
OutputWorkers outputWorkers_
 
OutputWorkerSet outputWorkersToOpen_
 
OutputWorkerSet outputWorkersToClose_ {}
 
std::vector< unsigned char > workersEnabled_
 
std::vector< unsigned char > outputWorkersEnabled_
 
OutputFileStatus fileStatus_ {OutputFileStatus::Closed}
 
std::unique_ptr< RangeSetHandlerrunRangeSetHandler_ {nullptr}
 
std::unique_ptr< RangeSetHandlersubRunRangeSetHandler_ {nullptr}
 
bool const parentageEnabled_ {true}
 
bool const rangesEnabled_ {true}
 

Detailed Description

Definition at line 41 of file EndPathExecutor.h.

Member Typedef Documentation

using art::EndPathExecutor::OutputWorkers = std::vector<OutputWorker*>
private

Definition at line 92 of file EndPathExecutor.h.

Definition at line 93 of file EndPathExecutor.h.

Constructor & Destructor Documentation

art::EndPathExecutor::EndPathExecutor ( PathManager pm,
ActionTable actions,
ActivityRegistry areg,
MasterProductRegistry mpr,
bool const  parentageEnabled,
bool const  rangesEnabled 
)

Member Function Documentation

void art::EndPathExecutor::beginJob ( )
void art::EndPathExecutor::closeAllOutputFiles ( )
void art::EndPathExecutor::closeSomeOutputFiles ( )
template<class F >
void art::EndPathExecutor::doForAllEnabledOutputWorkers_ ( F  f)
private

Definition at line 174 of file EndPathExecutor.h.

References fcn, allTimeWatchdog::index, outputWorkers_, and outputWorkersEnabled_.

175 {
176  size_t index{0};
177  for (auto ow : outputWorkers_) {
178  if (outputWorkersEnabled_[index++]) {
179  fcn(ow);
180  }
181  }
182 }
TF1 * fcn
Definition: warp_gsimple.C:35
OutputWorkers outputWorkers_
std::vector< unsigned char > outputWorkersEnabled_
template<class F >
void art::EndPathExecutor::doForAllEnabledWorkers_ ( F  f)
private

Definition at line 162 of file EndPathExecutor.h.

References endPathInfo_, fcn, allTimeWatchdog::index, febshutoff_auto::val, art::PathsInfo::workers(), and workersEnabled_.

163 {
164  size_t index{0};
165  for (auto const& val : endPathInfo_.workers()) {
166  if (workersEnabled_[index++]) {
167  fcn(val.second.get());
168  }
169  }
170 }
std::vector< unsigned char > workersEnabled_
TF1 * fcn
Definition: warp_gsimple.C:35
WorkerMap const & workers() const
Definition: PathsInfo.h:87
void art::EndPathExecutor::endJob ( )
void art::EndPathExecutor::incrementInputFileNumber ( )
void art::EndPathExecutor::openAllOutputFiles ( FileBlock fb)
void art::EndPathExecutor::openSomeOutputFiles ( FileBlock const &  fb)
bool art::EndPathExecutor::outputsToClose ( ) const
bool art::EndPathExecutor::outputsToOpen ( ) const
template<typename T >
void art::EndPathExecutor::process ( typename T::MyPrincipal &  principal)

Definition at line 122 of file EndPathExecutor.h.

References act_table_, plot_validation_datamc::action, art::PathsInfo::addEvent(), art::PathsInfo::addPass(), endPathInfo_, lem_server::ep, art::Event, art::errors::EventProcessorFailure, art::ActionTable::find(), art::actions::IgnoreCompletely, art::PathsInfo::pathPtrs(), resetAll(), art::actions::Rethrow, T, and cet::trim_right_copy().

123 {
124  this->resetAll();
125 
126  if (T::level == Level::Event) {
128  }
129  try {
130  if (!endPathInfo_.pathPtrs().empty()) {
131  endPathInfo_.pathPtrs().front()->process<T>(ep);
132  }
133  }
134  catch (cet::exception& ex) {
135  actions::ActionCodes const action{T::level == Level::Event ?
136  act_table_->find(ex.root_cause()) :
138  switch (action) {
140  mf::LogWarning(ex.category())
141  << "exception being ignored for current event:\n"
142  << cet::trim_right_copy(ex.what(), " \n");
143  break;
144  }
145  default: {
146  throw art::Exception(errors::EventProcessorFailure, "EndPathExecutor:")
147  << "an exception occurred during current event processing\n"
148  << ex;
149  }
150  }
151  }
152  catch (...) {
153  mf::LogError("PassingThrough")
154  << "an exception occurred during current event processing\n";
155  throw;
156  }
158 }
ActionTable * act_table_
actions::ActionCodes find(std::string const &category) const
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
void addPass()
Definition: PathsInfo.h:81
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::string trim_right_copy(std::string source, std::string const &t=" ")
Definition: trim.h:54
void addEvent()
Definition: PathsInfo.h:75
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
double T
Definition: Xdiff_gwt.C:5
PathPtrs const & pathPtrs() const
Definition: PathsInfo.h:93
void art::EndPathExecutor::recordOutputClosureRequests ( Granularity  )
void art::EndPathExecutor::resetAll ( )
private

Referenced by process().

void art::EndPathExecutor::respondToCloseInputFile ( FileBlock const &  fb)
void art::EndPathExecutor::respondToCloseOutputFiles ( FileBlock const &  fb)
void art::EndPathExecutor::respondToOpenInputFile ( FileBlock const &  fb)
void art::EndPathExecutor::respondToOpenOutputFiles ( FileBlock const &  fb)
template<typename T >
void art::EndPathExecutor::runEndPaths ( typename T::MyPrincipal &  )
private
void art::EndPathExecutor::seedRunRangeSet ( std::unique_ptr< RangeSetHandler )
void art::EndPathExecutor::seedSubRunRangeSet ( std::unique_ptr< RangeSetHandler )
void art::EndPathExecutor::selectProducts ( ProductList const &  )
void art::EndPathExecutor::setAuxiliaryRangeSetID ( SubRunPrincipal srp)
void art::EndPathExecutor::setAuxiliaryRangeSetID ( RunPrincipal rp)
void art::EndPathExecutor::setOutputFileStatus ( OutputFileStatus  )
bool art::EndPathExecutor::someOutputsOpen ( ) const
bool art::EndPathExecutor::terminate ( ) const
void art::EndPathExecutor::writeEvent ( EventPrincipal ep)
void art::EndPathExecutor::writeRun ( RunPrincipal rp)
void art::EndPathExecutor::writeSubRun ( SubRunPrincipal srp)

Member Data Documentation

ActionTable* art::EndPathExecutor::act_table_
private

Definition at line 106 of file EndPathExecutor.h.

Referenced by process().

ActivityRegistry& art::EndPathExecutor::actReg_
private

Definition at line 107 of file EndPathExecutor.h.

PathsInfo& art::EndPathExecutor::endPathInfo_
private

Definition at line 105 of file EndPathExecutor.h.

Referenced by doForAllEnabledWorkers_(), and process().

OutputFileStatus art::EndPathExecutor::fileStatus_ {OutputFileStatus::Closed}
private

Definition at line 113 of file EndPathExecutor.h.

OutputWorkers art::EndPathExecutor::outputWorkers_
private

Definition at line 108 of file EndPathExecutor.h.

Referenced by doForAllEnabledOutputWorkers_().

std::vector<unsigned char> art::EndPathExecutor::outputWorkersEnabled_
private

Definition at line 112 of file EndPathExecutor.h.

Referenced by doForAllEnabledOutputWorkers_().

OutputWorkerSet art::EndPathExecutor::outputWorkersToClose_ {}
private

Definition at line 110 of file EndPathExecutor.h.

OutputWorkerSet art::EndPathExecutor::outputWorkersToOpen_
private

Definition at line 109 of file EndPathExecutor.h.

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

Definition at line 116 of file EndPathExecutor.h.

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

Definition at line 117 of file EndPathExecutor.h.

std::unique_ptr<RangeSetHandler> art::EndPathExecutor::runRangeSetHandler_ {nullptr}
private

Definition at line 114 of file EndPathExecutor.h.

std::unique_ptr<RangeSetHandler> art::EndPathExecutor::subRunRangeSetHandler_ {nullptr}
private

Definition at line 115 of file EndPathExecutor.h.

std::vector<unsigned char> art::EndPathExecutor::workersEnabled_
private

Definition at line 111 of file EndPathExecutor.h.

Referenced by doForAllEnabledWorkers_().


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