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

#include <OutputWorker.h>

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

Public Member Functions

virtual ~OutputWorker ()
 
 OutputWorker (std::shared_ptr< OutputModule > mod, ModuleDescription const &, WorkerParams const &)
 
std::string const & lastClosedFileName () const
 
bool closeFile ()
 
bool fileIsOpen () const
 
void incrementInputFileNumber ()
 
bool requestsToCloseFile () const
 
bool openFile (FileBlock const &fb)
 
void writeRun (RunPrincipal &rp)
 
void writeSubRun (SubRunPrincipal &srp)
 
void writeEvent (EventPrincipal &ep, ModuleContext const &mc)
 
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 (ProductTables const &)
 
- Public Member Functions inherited from art::WorkerT< OutputModule >
 WorkerT (std::shared_ptr< OutputModule >, ModuleDescription const &, WorkerParams const &)
 
- Public Member Functions inherited from art::Worker
virtual ~Worker ()=default
 
 Worker (ModuleDescription const &, WorkerParams const &)
 
void beginJob (detail::SharedResources const &)
 
void endJob ()
 
void respondToOpenInputFile (FileBlock const &fb)
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenOutputFiles (FileBlock const &fb)
 
void respondToCloseOutputFiles (FileBlock const &fb)
 
bool doWork (Transition, Principal &, ModuleContext const &)
 
void doWork_event (hep::concurrency::WaitingTaskPtr workerInPathDoneTask, EventPrincipal &, ModuleContext const &)
 
void doWork_event (EventPrincipal &, ModuleContext const &)
 
ScheduleID scheduleID () const
 
ModuleDescription const & description () const
 
std::string const & label () const
 
bool returnCode () const
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
void reset ()
 
std::size_t timesVisited () const
 
std::size_t timesRun () const
 
std::size_t timesPassed () const
 
std::size_t timesFailed () const
 
std::size_t timesExcept () const
 
void runWorker (EventPrincipal &, ModuleContext const &)
 

Private Attributes

ServiceHandle< CatalogInterfaceci_ {}
 
Granularity fileGranularity_ {Granularity::Unset}
 

Additional Inherited Members

- Public Types inherited from art::WorkerT< OutputModule >
using ModuleType = OutputModule
 
- Public Types inherited from art::Worker
enum  State {
  Ready, Pass, Fail, Working,
  ExceptionThrown
}
 
- Protected Member Functions inherited from art::WorkerT< OutputModule >
OutputModulemodule ()
 
OutputModule const & module () const
 
- Protected Attributes inherited from art::Worker
std::atomic< std::size_t > counts_visited_ {}
 
std::atomic< std::size_t > counts_run_ {}
 
std::atomic< std::size_t > counts_passed_ {}
 
std::atomic< std::size_t > counts_failed_ {}
 
std::atomic< std::size_t > counts_thrown_ {}
 

Detailed Description

Definition at line 25 of file OutputWorker.h.

Constructor & Destructor Documentation

art::OutputWorker::~OutputWorker ( )
virtualdefault
art::OutputWorker::OutputWorker ( std::shared_ptr< OutputModule mod,
ModuleDescription const &  md,
WorkerParams const &  wp 
)

Definition at line 15 of file OutputWorker.cc.

18  : WorkerT<OutputModule>{mod, md, wp}

Member Function Documentation

bool art::OutputWorker::closeFile ( )

Definition at line 32 of file OutputWorker.cc.

33  {
34  bool const didCloseFile{module().doCloseFile()};
35  if (didCloseFile) {
36  ci_->outputFileClosed(description().moduleLabel(), lastClosedFileName());
37  }
38  return didCloseFile;
39  }
std::string const & lastClosedFileName() const
Definition: OutputWorker.cc:26
ModuleDescription const & description() const
Definition: Worker.cc:118
OutputModule & module()
Definition: WorkerT.h:33
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:53
void art::OutputWorker::configure ( OutputModuleDescription const &  desc)

Definition at line 112 of file OutputWorker.cc.

113  {
114  module().configure(desc);
115  }
OutputModule & module()
Definition: WorkerT.h:33
void configure(OutputModuleDescription const &desc)
Granularity art::OutputWorker::fileGranularity ( ) const

Definition at line 124 of file OutputWorker.cc.

125  {
126  return module().fileGranularity();
127  }
virtual Granularity fileGranularity() const
OutputModule & module()
Definition: WorkerT.h:33
bool art::OutputWorker::fileIsOpen ( ) const

Definition at line 94 of file OutputWorker.cc.

95  {
96  return module().fileIsOpen();
97  }
bool fileIsOpen() const
Definition: OutputModule.cc:88
OutputModule & module()
Definition: WorkerT.h:33
void art::OutputWorker::incrementInputFileNumber ( )

Definition at line 42 of file OutputWorker.cc.

43  {
45  }
virtual void incrementInputFileNumber()
OutputModule & module()
Definition: WorkerT.h:33
std::string const & art::OutputWorker::lastClosedFileName ( ) const
Initial value:
{
ci_->outputModuleInitiated(
label(),
static collection_type const & get() noexcept
std::string const & label() const
Definition: Worker.cc:124
ModuleDescription const & description() const
Definition: Worker.cc:118
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:53

Definition at line 26 of file OutputWorker.cc.

27  {
28  return module().lastClosedFileName();
29  }
virtual std::string const & lastClosedFileName() const
OutputModule & module()
Definition: WorkerT.h:33
bool art::OutputWorker::limitReached ( ) const

Definition at line 106 of file OutputWorker.cc.

107  {
108  return module().limitReached();
109  }
bool limitReached() const
OutputModule & module()
Definition: WorkerT.h:33
bool art::OutputWorker::openFile ( FileBlock const &  fb)

Definition at line 54 of file OutputWorker.cc.

55  {
56  bool const didOpenFile{module().doOpenFile(fb)};
57  if (didOpenFile) {
58  ci_->outputFileOpened(description().moduleLabel());
59  }
60  return didOpenFile;
61  }
bool doOpenFile(FileBlock const &fb)
ModuleDescription const & description() const
Definition: Worker.cc:118
OutputModule & module()
Definition: WorkerT.h:33
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:53
bool art::OutputWorker::requestsToCloseFile ( ) const

Definition at line 48 of file OutputWorker.cc.

49  {
50  return module().requestsToCloseFile();
51  }
virtual bool requestsToCloseFile() const
OutputModule & module()
Definition: WorkerT.h:33
void art::OutputWorker::selectProducts ( ProductTables const &  tables)
virtual

Definition at line 118 of file OutputWorker.cc.

119  {
120  module().selectProducts(tables);
121  }
void selectProducts(ProductTables const &)
OutputModule & module()
Definition: WorkerT.h:33
void art::OutputWorker::setFileStatus ( OutputFileStatus  ofs)

Definition at line 100 of file OutputWorker.cc.

101  {
102  return module().setFileStatus(ofs);
103  }
OutputModule & module()
Definition: WorkerT.h:33
virtual void setFileStatus(OutputFileStatus)
void art::OutputWorker::setRunAuxiliaryRangeSetID ( RangeSet const &  rs)

Definition at line 82 of file OutputWorker.cc.

83  {
85  }
OutputModule & module()
Definition: WorkerT.h:33
void doSetRunAuxiliaryRangeSetID(RangeSet const &)
void art::OutputWorker::setSubRunAuxiliaryRangeSetID ( RangeSet const &  rs)

Definition at line 88 of file OutputWorker.cc.

89  {
91  }
void doSetSubRunAuxiliaryRangeSetID(RangeSet const &)
OutputModule & module()
Definition: WorkerT.h:33
void art::OutputWorker::writeEvent ( EventPrincipal ep,
ModuleContext const &  mc 
)

Definition at line 76 of file OutputWorker.cc.

77  {
78  module().doWriteEvent(ep, mc);
79  }
void doWriteEvent(EventPrincipal &ep, ModuleContext const &mc)
OutputModule & module()
Definition: WorkerT.h:33
void art::OutputWorker::writeRun ( RunPrincipal rp)

Definition at line 64 of file OutputWorker.cc.

65  {
66  module().doWriteRun(rp);
67  }
OutputModule & module()
Definition: WorkerT.h:33
void doWriteRun(RunPrincipal &rp)
void art::OutputWorker::writeSubRun ( SubRunPrincipal srp)

Definition at line 70 of file OutputWorker.cc.

71  {
72  module().doWriteSubRun(srp);
73  }
void doWriteSubRun(SubRunPrincipal &srp)
OutputModule & module()
Definition: WorkerT.h:33

Member Data Documentation

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

Definition at line 53 of file OutputWorker.h.

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

Definition at line 54 of file OutputWorker.h.


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