LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::OutputWorker Class Reference

#include "OutputWorker.h"

Inheritance diagram for art::OutputWorker:
art::WorkerT< OutputModule > art::Worker

Public Types

using ModuleType = OutputModule
 
using WorkerType = WorkerT< OutputModule >
 
enum  State {
  Ready, Pass, Fail, Working,
  Exception
}
 

Public Member Functions

 OutputWorker (std::unique_ptr< OutputModule > &&mod, ModuleDescription const &, WorkerParams const &)
 
virtual ~OutputWorker ()
 
std::string const & lastClosedFileName () const
 
void closeFile ()
 
bool fileIsOpen () const
 
void incrementInputFileNumber ()
 
bool requestsToCloseFile () const
 
bool wantAllEvents () const
 
void openFile (FileBlock const &fb)
 
void writeRun (RunPrincipal &rp)
 
void writeSubRun (SubRunPrincipal &srp)
 
void writeEvent (EventPrincipal &ep)
 
void setRunAuxiliaryRangeSetID (RangeSet const &)
 
void setSubRunAuxiliaryRangeSetID (RangeSet const &)
 
bool limitReached () const
 
void setFileStatus (OutputFileStatus)
 
void configure (OutputModuleDescription const &desc)
 
Granularity fileGranularity () const
 
virtual void selectProducts (ProductList const &)
 
bool modifiesEvent () const override
 
template<typename T >
bool doWork (typename T::MyPrincipal &, CurrentProcessingContext const *cpc)
 
void beginJob ()
 
void endJob ()
 
void respondToOpenInputFile (FileBlock const &fb)
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenOutputFiles (FileBlock const &fb)
 
void respondToCloseOutputFiles (FileBlock const &fb)
 
void reset ()
 
ModuleDescription const & description () const
 
ModuleDescription const * descPtr () const
 
void setActivityRegistry (cet::exempt_ptr< ActivityRegistry > areg)
 
void clearCounters ()
 
std::size_t timesRun () const
 
std::size_t timesVisited () const
 
std::size_t timesPassed () const
 
std::size_t timesFailed () const
 
std::size_t timesExcept () const
 
State state () const
 
std::string const & label () const
 

Protected Member Functions

OutputModulemodule ()
 
OutputModule const & module () const
 

Private Attributes

ServiceHandle< CatalogInterfaceci_
 
Granularity fileGranularity_ {Granularity::Unset}
 

Detailed Description

Definition at line 29 of file OutputWorker.h.

Member Typedef Documentation

Definition at line 24 of file WorkerT.h.

Definition at line 25 of file WorkerT.h.

Member Enumeration Documentation

enum art::Worker::State
inherited
Enumerator
Ready 
Pass 
Fail 
Working 
Exception 

Definition at line 53 of file Worker.h.

Constructor & Destructor Documentation

art::OutputWorker::OutputWorker ( std::unique_ptr< OutputModule > &&  mod,
ModuleDescription const &  md,
WorkerParams const &  wp 
)

Definition at line 9 of file OutputWorker.cc.

References ci_, art::Worker::description(), fhicl::ParameterSetRegistry::get(), and art::Worker::label().

12  : WorkerT<OutputModule>(std::move(mod), md, wp), ci_()
13  {
14  ci_->outputModuleInitiated(
15  label(),
16  fhicl::ParameterSetRegistry::get(description().parameterSetID()));
17  }
static collection_type const & get() noexcept
ModuleDescription const & description() const
Definition: Worker.h:74
std::string const & label() const
Definition: Worker.h:127
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:66
art::OutputWorker::~OutputWorker ( )
virtual

Definition at line 19 of file OutputWorker.cc.

19 {}

Member Function Documentation

void art::Worker::beginJob ( )
inherited

Definition at line 18 of file Worker.cc.

References art::Worker::actReg_, art::errors::BadExceptionType, art::Worker::description(), e, art::Worker::implBeginJob(), art::Worker::md_, art::errors::OtherArt, s, art::errors::StdException, art::errors::Unknown, and art::Worker::workerType().

18  {
19  assert(actReg_.get() != nullptr);
20  actReg_->sPreModuleBeginJob.invoke(md_);
21  implBeginJob();
22  actReg_->sPostModuleBeginJob.invoke(md_);
23 }
24 catch (cet::exception& e) {
25  // should event id be included?
26  LogError("BeginJob") << "A cet::exception is going through " << workerType()
27  << ":\n";
28 
29  e << "A cet::exception is going through " << workerType() << ":\n"
30  << description();
31  throw art::Exception(errors::OtherArt, std::string(), e);
32 }
33 catch (std::bad_alloc& e) {
34  LogError("BeginJob") << "A std::bad_alloc is going through " << workerType()
35  << ":\n"
36  << description() << "\n";
37  throw;
38 }
39 catch (std::exception& e) {
40  LogError("BeginJob") << "A std::exception is going through " << workerType()
41  << ":\n"
42  << description() << "\n";
44  << "A std::exception is going through " << workerType() << ":\n"
45  << description() << "\n";
46 }
47 catch (std::string& s) {
48  LogError("BeginJob") << "module caught an std::string during beginJob\n";
49 
51  << "std::string = " << s << "\n"
52  << description() << "\n";
53 }
54 catch (char const* c) {
55  LogError("BeginJob") << "module caught an const char* during beginJob\n";
56 
57  throw art::Exception(errors::BadExceptionType) << "cstring = " << c << "\n"
58  << description();
59 }
60 catch (...) {
61  LogError("BeginJob") << "An unknown Exception occurred in\n"
62  << description() << "\n";
63  throw art::Exception(errors::Unknown) << "An unknown Exception occurred in\n"
64  << description() << "\n";
65 }
Float_t s
Definition: plot.C:23
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
virtual void implBeginJob()=0
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
virtual std::string workerType() const =0
ModuleDescription const & description() const
Definition: Worker.h:74
ModuleDescription md_
Definition: Worker.h:160
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
Float_t e
Definition: plot.C:34
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void art::Worker::clearCounters ( )
inlineinherited

Definition at line 88 of file Worker.h.

References art::Worker::counts_.

89  {
91  }
CountingStatistics counts_
Definition: Worker.h:157
ExecutionCounts< stats::Visited, stats::Run, stats::Passed, stats::Failed, stats::ExceptionThrown > CountingStatistics
void art::OutputWorker::closeFile ( )

Definition at line 28 of file OutputWorker.cc.

References ci_, art::Worker::description(), art::OutputModule::doCloseFile(), lastClosedFileName(), and art::WorkerT< OutputModule >::module().

Referenced by art::EndPathExecutor::closeAllOutputFiles().

29  {
30  module().doCloseFile();
31  ci_->outputFileClosed(description().moduleLabel(),
33  }
std::string const & lastClosedFileName() const
Definition: OutputWorker.cc:22
ModuleDescription const & description() const
Definition: Worker.h:74
OutputModule & module()
Definition: WorkerT.h:39
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:66
void art::OutputWorker::configure ( OutputModuleDescription const &  desc)

Definition at line 109 of file OutputWorker.cc.

References art::OutputModule::configure(), and art::WorkerT< OutputModule >::module().

110  {
111  module().configure(desc);
112  }
OutputModule & module()
Definition: WorkerT.h:39
void configure(OutputModuleDescription const &desc)
Definition: OutputModule.cc:64
ModuleDescription const* art::Worker::descPtr ( ) const
inlineinherited

Definition at line 79 of file Worker.h.

References art::Worker::md_, and art::Worker::setActivityRegistry().

80  {
81  return &md_;
82  }
ModuleDescription md_
Definition: Worker.h:160
ModuleDescription const& art::Worker::description ( ) const
inlineinherited

Definition at line 74 of file Worker.h.

References art::Worker::md_.

Referenced by art::Worker::beginJob(), closeFile(), art::Worker::endJob(), openFile(), and OutputWorker().

75  {
76  return md_;
77  }
ModuleDescription md_
Definition: Worker.h:160
template<typename T >
bool art::Worker::doWork ( typename T::MyPrincipal &  p,
CurrentProcessingContext const *  cpc 
)
inherited

Definition at line 218 of file Worker.h.

References art::Worker::actions_, art::Worker::actReg_, art::errors::BadAlloc, art::errors::BadExceptionType, art::Worker::cached_exception_, art::Worker::counts_, e, art::Event, art::Worker::Exception, art::detail::exceptionContext(), art::Worker::Fail, art::actions::FailModule, art::actions::FailPath, art::ActionTable::find(), art::actions::IgnoreCompletely, art::CurrentProcessingContext::isEndPath(), art::Worker::md_, art::errors::OtherArt, art::Worker::Pass, art::Worker::Ready, art::actions::Rethrow, s, art::errors::ScheduleExecutionFailure, art::actions::SkipEvent, art::Worker::state_, art::errors::StdException, art::errors::Unknown, and art::Worker::Working.

220 {
221  MaybeIncrementCounts<T::level, decltype(counts_)> counts{counts_};
222  counts.template increment<stats::Visited>();
223 
224  switch (state_) {
225  case Ready:
226  break;
227  case Pass:
228  return true;
229  case Fail:
230  return false;
231  case Exception: {
232  // Rethrow the cached exception again. It seems impossible to
233  // get here a second time unless a cet::exception has been
234  // thrown previously.
235  mf::LogWarning("repeat")
236  << "A module has been invoked a second time even though"
237  " it caught an exception during the previous invocation."
238  "\nThis may be an indication of a configuration problem.\n";
239  throw *cached_exception_;
240  }
241  case Working:
242  break; // See below.
243  }
244 
245  bool rc{false};
246  try {
247  if (state_ == Working) {
248  // Not part of the switch statement above because we want the
249  // exception to be caught by our handling mechanism.
251  << "A Module has been invoked while it is still being executed.\n"
252  << "Product dependencies have invoked a module execution cycle.\n";
253  }
254 
255  assert(actReg_.get() != nullptr);
256  state_ = Working;
257 
258  T::preModuleSignal(*actReg_, md_);
259  rc = ImplDoWork<T::processing_action>::invoke(this, p, cpc);
260  T::postModuleSignal(*actReg_, md_);
261 
262  state_ = Pass;
263 
264  if (T::level == Level::Event && !rc)
265  state_ = Fail;
266  }
267  catch (cet::exception& e) {
268 
269  // NOTE: the warning printed as a result of ignoring or failing a
270  // module will only be printed during the full true processing
271  // pass of this module.
272 
273  // Get the action corresponding to this exception. However, if
274  // processing something other than an event (e.g. run, subRun)
275  // always rethrow.
276  actions::ActionCodes action{T::level == Level::Event ?
277  actions_.find(e.root_cause()) :
279 
280  // If we are processing an endPath, treat SkipEvent or FailPath as
281  // FailModule, so any subsequent OutputModules are still run.
282  if (cpc && cpc->isEndPath()) {
283  if (action == actions::SkipEvent || action == actions::FailPath)
284  action = actions::FailModule;
285  }
286 
287  switch (action) {
289  rc = true;
290  counts.template increment<stats::Passed>();
291  state_ = Pass;
292  mf::LogWarning("IgnoreCompletely") << "Module ignored an exception\n"
293  << e.what();
294  break;
295  }
296  case actions::FailModule: {
297  rc = true;
298  mf::LogWarning("FailModule") << "Module failed due to an exception\n"
299  << e.what();
300  counts.template increment<stats::Failed>();
301  state_ = Fail;
302  break;
303  }
304  default: {
305  // We should not need to include the event/run/module names in
306  // the exception because the error logger will pick this up
307  // automatically. I'm leaving it in until this is verified.
308 
309  // here we simply add a small amount of data to the exception to
310  // add some context, we could have rethrown it as something else
311  // and embedded with this exception as an argument to the
312  // constructor.
313  counts.template increment<stats::ExceptionThrown>();
314  state_ = Exception;
315  e << "cet::exception going through module ";
317  if (auto edmEx = dynamic_cast<art::Exception*>(&e)) {
318  cached_exception_ = std::make_shared<art::Exception>(*edmEx);
319  } else {
320  cached_exception_ = std::make_shared<art::Exception>(
321  errors::OtherArt, std::string(), e);
322  }
323  throw;
324  }
325  }
326  }
327  catch (std::bad_alloc const& bda) {
328  counts.template increment<stats::ExceptionThrown>();
329  state_ = Exception;
330  cached_exception_ = std::make_shared<art::Exception>(errors::BadAlloc);
332  << "A std::bad_alloc exception occurred during a call to the module ";
333  detail::exceptionContext(md_, p, *cached_exception_)
334  << "The job has probably exhausted the virtual memory available to the "
335  "process.\n";
336  throw *cached_exception_;
337  }
338  catch (std::exception const& e) {
339  counts.template increment<stats::ExceptionThrown>();
340  state_ = Exception;
341  cached_exception_ = std::make_shared<art::Exception>(errors::StdException);
343  << "A std::exception occurred during a call to the module ";
344  detail::exceptionContext(md_, p, *cached_exception_)
345  << "and cannot be repropagated.\n"
346  << "Previous information:\n"
347  << e.what();
348  throw *cached_exception_;
349  }
350  catch (std::string const& s) {
351  counts.template increment<stats::ExceptionThrown>();
352  state_ = Exception;
353  cached_exception_ =
354  std::make_shared<art::Exception>(errors::BadExceptionType, "std::string");
355  *cached_exception_ << "A std::string thrown as an exception occurred "
356  "during a call to the module ";
357  detail::exceptionContext(md_, p, *cached_exception_)
358  << "and cannot be repropagated.\n"
359  << "Previous information:\n string = " << s;
360  throw *cached_exception_;
361  }
362  catch (char const* c) {
363  counts.template increment<stats::ExceptionThrown>();
364  state_ = Exception;
365  cached_exception_ = std::make_shared<art::Exception>(
366  errors::BadExceptionType, "const char *");
367  *cached_exception_ << "A const char* thrown as an exception occurred "
368  "during a call to the module ";
369  detail::exceptionContext(md_, p, *cached_exception_)
370  << "and cannot be repropagated.\n"
371  << "Previous information:\n const char* = " << c << "\n";
372  throw *cached_exception_;
373  }
374  catch (...) {
375  counts.template increment<stats::ExceptionThrown>();
376  state_ = Exception;
377  cached_exception_ =
378  std::make_shared<art::Exception>(errors::Unknown, "repeated");
379  *cached_exception_
380  << "An unknown occurred during a previous call to the module ";
381  detail::exceptionContext(md_, p, *cached_exception_)
382  << "and cannot be repropagated.\n";
383  throw *cached_exception_;
384  }
385 
386  return rc;
387 }
Float_t s
Definition: plot.C:23
actions::ActionCodes find(std::string const &category) const
Definition: Actions.cc:87
CountingStatistics counts_
Definition: Worker.h:157
ActionTable const & actions_
Definition: Worker.h:161
cet::exception & exceptionContext(ModuleDescription const &md, T const &ip, cet::exception &ex)
Definition: Worker.h:208
std::shared_ptr< art::Exception > cached_exception_
Definition: Worker.h:162
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
ModuleDescription md_
Definition: Worker.h:160
State state_
Definition: Worker.h:158
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
Float_t e
Definition: plot.C:34
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void art::Worker::endJob ( )
inherited

Definition at line 68 of file Worker.cc.

References art::Worker::actReg_, art::errors::BadExceptionType, art::Worker::description(), e, art::Worker::implEndJob(), art::Worker::md_, art::errors::OtherArt, s, art::errors::StdException, art::errors::Unknown, and art::Worker::workerType().

Referenced by art::EndPathExecutor::endJob(), and art::Schedule::endJob().

68  {
69  assert(actReg_.get() != nullptr);
70  actReg_->sPreModuleEndJob.invoke(md_);
71  implEndJob();
72  actReg_->sPostModuleEndJob.invoke(md_);
73 }
74 catch (cet::exception& e) {
75  LogError("EndJob") << "A cet::exception is going through " << workerType()
76  << ":\n";
77 
78  // should event id be included?
79  e << "A cet::exception is going through " << workerType() << ":\n"
80  << description();
81  throw art::Exception(errors::OtherArt, std::string(), e);
82 }
83 catch (std::bad_alloc& e) {
84  LogError("EndJob") << "A std::bad_alloc is going through " << workerType()
85  << ":\n"
86  << description() << "\n";
87  throw;
88 }
89 catch (std::exception& e) {
90  LogError("EndJob") << "An std::exception is going through " << workerType()
91  << ":\n"
92  << description() << "\n";
94  << "A std::exception is going through " << workerType() << ":\n"
95  << description() << "\n"
96  << e.what();
97 }
98 catch (std::string& s) {
99  LogError("EndJob") << "module caught an std::string during endJob\n";
100 
102  << "std::string = " << s << "\n"
103  << description() << "\n";
104 }
105 catch (char const* c) {
106  LogError("EndJob") << "module caught an const char* during endJob\n";
107 
108  throw art::Exception(errors::BadExceptionType) << "cstring = " << c << "\n"
109  << description() << "\n";
110 }
111 catch (...) {
112  LogError("EndJob") << "An unknown Exception occurred in\n"
113  << description() << "\n";
114  throw art::Exception(errors::Unknown) << "An unknown Exception occurred in\n"
115  << description() << "\n";
116 }
Float_t s
Definition: plot.C:23
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
virtual std::string workerType() const =0
ModuleDescription const & description() const
Definition: Worker.h:74
ModuleDescription md_
Definition: Worker.h:160
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
virtual void implEndJob()=0
Float_t e
Definition: plot.C:34
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
Granularity art::OutputWorker::fileGranularity ( ) const

Definition at line 121 of file OutputWorker.cc.

References art::OutputModule::fileGranularity(), and art::WorkerT< OutputModule >::module().

122  {
123  return module().fileGranularity();
124  }
virtual Granularity fileGranularity() const
Definition: OutputModule.h:245
OutputModule & module()
Definition: WorkerT.h:39
bool art::OutputWorker::fileIsOpen ( ) const

Definition at line 85 of file OutputWorker.cc.

References art::OutputModule::fileIsOpen(), and art::WorkerT< OutputModule >::module().

86  {
87  return module().fileIsOpen();
88  }
bool fileIsOpen() const
Definition: OutputModule.h:104
OutputModule & module()
Definition: WorkerT.h:39
void art::OutputWorker::incrementInputFileNumber ( )

Definition at line 36 of file OutputWorker.cc.

References art::OutputModule::incrementInputFileNumber(), and art::WorkerT< OutputModule >::module().

37  {
39  }
virtual void incrementInputFileNumber()
Definition: OutputModule.h:227
OutputModule & module()
Definition: WorkerT.h:39
std::string const & art::OutputWorker::lastClosedFileName ( ) const

Definition at line 22 of file OutputWorker.cc.

References art::OutputModule::lastClosedFileName(), and art::WorkerT< OutputModule >::module().

Referenced by art::EndPathExecutor::closeAllOutputFiles(), and closeFile().

23  {
24  return module().lastClosedFileName();
25  }
virtual std::string const & lastClosedFileName() const
Definition: OutputModule.cc:58
OutputModule & module()
Definition: WorkerT.h:39
bool art::OutputWorker::limitReached ( ) const

Definition at line 103 of file OutputWorker.cc.

References art::OutputModule::limitReached(), and art::WorkerT< OutputModule >::module().

104  {
105  return module().limitReached();
106  }
bool limitReached() const
Definition: OutputModule.h:361
OutputModule & module()
Definition: WorkerT.h:39
bool art::WorkerT< OutputModule >::modifiesEvent ( ) const
inlineoverridevirtualinherited

Implements art::Worker.

Definition at line 32 of file WorkerT.h.

References art::WorkerT< T >::module_.

33  {
34  return module_->modifiesEvent();
35  }
std::unique_ptr< OutputModule > module_
Definition: WorkerT.h:69
void art::OutputWorker::openFile ( FileBlock const &  fb)

Definition at line 48 of file OutputWorker.cc.

References ci_, art::Worker::description(), art::OutputModule::doOpenFile(), and art::WorkerT< OutputModule >::module().

Referenced by art::EndPathExecutor::openAllOutputFiles().

49  {
50  module().doOpenFile(fb);
51  ci_->outputFileOpened(description().moduleLabel());
52  }
ModuleDescription const & description() const
Definition: Worker.h:74
TFile fb("Li6.root")
OutputModule & module()
Definition: WorkerT.h:39
void doOpenFile(FileBlock const &fb)
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:66
bool art::OutputWorker::requestsToCloseFile ( ) const

Definition at line 42 of file OutputWorker.cc.

References art::WorkerT< OutputModule >::module(), and art::OutputModule::requestsToCloseFile().

43  {
44  return module().requestsToCloseFile();
45  }
virtual bool requestsToCloseFile() const
Definition: OutputModule.h:240
OutputModule & module()
Definition: WorkerT.h:39
void art::Worker::reset ( void  )
inlineinherited

Definition at line 68 of file Worker.h.

References art::Worker::Ready, and art::Worker::state_.

69  {
70  state_ = Ready;
71  }
State state_
Definition: Worker.h:158
void art::Worker::respondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 128 of file Worker.cc.

References art::Worker::actReg_, art::Worker::implRespondToCloseInputFile(), and art::Worker::md_.

129 {
130  assert(actReg_.get() != nullptr);
131  actReg_->sPreModuleRespondToCloseInputFile.invoke(md_);
133  actReg_->sPostModuleRespondToCloseInputFile.invoke(md_);
134 }
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
TFile fb("Li6.root")
ModuleDescription md_
Definition: Worker.h:160
virtual void implRespondToCloseInputFile(FileBlock const &fb)=0
void art::Worker::respondToCloseOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 146 of file Worker.cc.

References art::Worker::actReg_, art::Worker::implRespondToCloseOutputFiles(), and art::Worker::md_.

147 {
148  assert(actReg_.get() != nullptr);
149  actReg_->sPreModuleRespondToCloseOutputFiles.invoke(md_);
151  actReg_->sPostModuleRespondToCloseOutputFiles.invoke(md_);
152 }
virtual void implRespondToCloseOutputFiles(FileBlock const &fb)=0
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
TFile fb("Li6.root")
ModuleDescription md_
Definition: Worker.h:160
void art::Worker::respondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 119 of file Worker.cc.

References art::Worker::actReg_, art::Worker::implRespondToOpenInputFile(), and art::Worker::md_.

120 {
121  assert(actReg_.get() != nullptr);
122  actReg_->sPreModuleRespondToOpenInputFile.invoke(md_);
124  actReg_->sPostModuleRespondToOpenInputFile.invoke(md_);
125 }
virtual void implRespondToOpenInputFile(FileBlock const &fb)=0
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
TFile fb("Li6.root")
ModuleDescription md_
Definition: Worker.h:160
void art::Worker::respondToOpenOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 137 of file Worker.cc.

References art::Worker::actReg_, art::Worker::implRespondToOpenOutputFiles(), and art::Worker::md_.

138 {
139  assert(actReg_.get() != nullptr);
140  actReg_->sPreModuleRespondToOpenOutputFiles.invoke(md_);
142  actReg_->sPostModuleRespondToOpenOutputFiles.invoke(md_);
143 }
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
TFile fb("Li6.root")
ModuleDescription md_
Definition: Worker.h:160
virtual void implRespondToOpenOutputFiles(FileBlock const &fb)=0
void art::OutputWorker::selectProducts ( ProductList const &  productList)
virtual

Definition at line 115 of file OutputWorker.cc.

References art::WorkerT< OutputModule >::module(), and art::OutputModule::selectProducts().

116  {
117  module().selectProducts(productList);
118  }
OutputModule & module()
Definition: WorkerT.h:39
void selectProducts(ProductList const &)
Definition: OutputModule.cc:98
void art::Worker::setActivityRegistry ( cet::exempt_ptr< ActivityRegistry areg)
inherited

The signals are required to live longer than the last call to 'doWork' this was done to improve performance based on profiling

Definition at line 12 of file Worker.cc.

References art::Worker::actReg_.

Referenced by art::Worker::descPtr().

13 {
14  actReg_ = std::move(areg);
15 }
cet::exempt_ptr< ActivityRegistry > actReg_
Definition: Worker.h:164
void art::OutputWorker::setFileStatus ( OutputFileStatus  ofs)

Definition at line 91 of file OutputWorker.cc.

References art::WorkerT< OutputModule >::module(), and art::OutputModule::setFileStatus().

92  {
93  return module().setFileStatus(ofs);
94  }
OutputModule & module()
Definition: WorkerT.h:39
virtual void setFileStatus(OutputFileStatus)
void art::OutputWorker::setRunAuxiliaryRangeSetID ( RangeSet const &  rs)

Definition at line 73 of file OutputWorker.cc.

References art::OutputModule::doSetRunAuxiliaryRangeSetID(), and art::WorkerT< OutputModule >::module().

74  {
76  }
OutputModule & module()
Definition: WorkerT.h:39
void doSetRunAuxiliaryRangeSetID(RangeSet const &)
void art::OutputWorker::setSubRunAuxiliaryRangeSetID ( RangeSet const &  rs)

Definition at line 79 of file OutputWorker.cc.

References art::OutputModule::doSetSubRunAuxiliaryRangeSetID(), and art::WorkerT< OutputModule >::module().

80  {
82  }
void doSetSubRunAuxiliaryRangeSetID(RangeSet const &)
OutputModule & module()
Definition: WorkerT.h:39
State art::Worker::state ( ) const
inlineinherited

Definition at line 119 of file Worker.h.

References art::Worker::modifiesEvent(), and art::Worker::state_.

120  {
121  return state_;
122  }
State state_
Definition: Worker.h:158
std::size_t art::Worker::timesExcept ( ) const
inlineinherited

Definition at line 114 of file Worker.h.

References art::Worker::counts_, and art::ExecutionCounts< ARGS >::times().

115  {
116  return counts_.times<stats::ExceptionThrown>();
117  }
CountingStatistics counts_
Definition: Worker.h:157
std::size_t times() const
std::size_t art::Worker::timesFailed ( ) const
inlineinherited

Definition at line 109 of file Worker.h.

References art::Worker::counts_, and art::ExecutionCounts< ARGS >::times().

110  {
111  return counts_.times<stats::Failed>();
112  }
CountingStatistics counts_
Definition: Worker.h:157
std::size_t times() const
std::size_t art::Worker::timesPassed ( ) const
inlineinherited

Definition at line 104 of file Worker.h.

References art::Worker::counts_, and art::ExecutionCounts< ARGS >::times().

105  {
106  return counts_.times<stats::Passed>();
107  }
CountingStatistics counts_
Definition: Worker.h:157
std::size_t times() const
std::size_t art::Worker::timesRun ( ) const
inlineinherited

Definition at line 94 of file Worker.h.

References art::Worker::counts_, and art::ExecutionCounts< ARGS >::times().

95  {
96  return counts_.times<stats::Run>();
97  }
CountingStatistics counts_
Definition: Worker.h:157
std::size_t times() const
std::size_t art::Worker::timesVisited ( ) const
inlineinherited

Definition at line 99 of file Worker.h.

References art::Worker::counts_, and art::ExecutionCounts< ARGS >::times().

100  {
101  return counts_.times<stats::Visited>();
102  }
CountingStatistics counts_
Definition: Worker.h:157
std::size_t times() const
bool art::OutputWorker::wantAllEvents ( ) const

Definition at line 97 of file OutputWorker.cc.

References art::WorkerT< OutputModule >::module(), and art::EventObserverBase::wantAllEvents().

98  {
99  return module().wantAllEvents();
100  }
OutputModule & module()
Definition: WorkerT.h:39
void art::OutputWorker::writeEvent ( EventPrincipal ep)

Definition at line 67 of file OutputWorker.cc.

References art::OutputModule::doWriteEvent(), and art::WorkerT< OutputModule >::module().

68  {
69  module().doWriteEvent(srp);
70  }
void doWriteEvent(EventPrincipal &ep)
OutputModule & module()
Definition: WorkerT.h:39
void art::OutputWorker::writeRun ( RunPrincipal rp)

Definition at line 55 of file OutputWorker.cc.

References art::OutputModule::doWriteRun(), and art::WorkerT< OutputModule >::module().

56  {
57  module().doWriteRun(rp);
58  }
OutputModule & module()
Definition: WorkerT.h:39
void doWriteRun(RunPrincipal &rp)
void art::OutputWorker::writeSubRun ( SubRunPrincipal srp)

Definition at line 61 of file OutputWorker.cc.

References art::OutputModule::doWriteSubRun(), and art::WorkerT< OutputModule >::module().

62  {
63  module().doWriteSubRun(srp);
64  }
void doWriteSubRun(SubRunPrincipal &srp)
OutputModule & module()
Definition: WorkerT.h:39

Member Data Documentation

ServiceHandle<CatalogInterface> art::OutputWorker::ci_
private

Definition at line 66 of file OutputWorker.h.

Referenced by closeFile(), openFile(), and OutputWorker().

Granularity art::OutputWorker::fileGranularity_ {Granularity::Unset}
private

Definition at line 67 of file OutputWorker.h.


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