OutputWorker.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_OutputWorker_h
2 #define art_Framework_Core_OutputWorker_h
3 // vim: set sw=2 expandtab :
4 
5 // The OutputModule as the schedule sees it. The job of
6 // this object is to call the output module.
7 //
8 // According to our current definition, a single output module can only
9 // appear in one worker.
10 
19 
20 #include <memory>
21 
22 namespace art {
23  struct OutputModuleDescription;
24  class RangeSet;
25  class OutputWorker : public WorkerT<OutputModule> {
26  public: // MEMBER FUNCTIONS -- Special Member Functions
27  virtual ~OutputWorker();
28  // This is called directly by the make_worker function created
29  // by the DEFINE_ART_MODULE macro.
30  OutputWorker(std::shared_ptr<OutputModule> mod,
31  ModuleDescription const&,
32  WorkerParams const&);
33 
34  public:
35  std::string const& lastClosedFileName() const;
36  bool closeFile();
37  bool fileIsOpen() const;
39  bool requestsToCloseFile() const;
40  bool openFile(FileBlock const& fb);
41  void writeRun(RunPrincipal& rp);
42  void writeSubRun(SubRunPrincipal& srp);
43  void writeEvent(EventPrincipal& ep, ModuleContext const& mc);
46  bool limitReached() const;
50  virtual void selectProducts(ProductTables const&);
51 
52  private:
55  };
56 } // namespace art
57 
58 #endif /* art_Framework_Core_OutputWorker_h */
59 
60 // Local Variables:
61 // mode: c++
62 // End:
void setRunAuxiliaryRangeSetID(RangeSet const &)
Definition: OutputWorker.cc:82
std::string string
Definition: nybbler.cc:12
std::string const & lastClosedFileName() const
Definition: OutputWorker.cc:26
virtual void selectProducts(ProductTables const &)
void writeEvent(EventPrincipal &ep, ModuleContext const &mc)
Definition: OutputWorker.cc:76
bool limitReached() const
Granularity fileGranularity_
Definition: OutputWorker.h:54
void configure(OutputModuleDescription const &desc)
virtual ~OutputWorker()
void setFileStatus(OutputFileStatus)
bool fileIsOpen() const
Definition: OutputWorker.cc:94
OutputFileStatus
void setSubRunAuxiliaryRangeSetID(RangeSet const &)
Definition: OutputWorker.cc:88
bool openFile(FileBlock const &fb)
Definition: OutputWorker.cc:54
bool requestsToCloseFile() const
Definition: OutputWorker.cc:48
OutputWorker(std::shared_ptr< OutputModule > mod, ModuleDescription const &, WorkerParams const &)
Definition: OutputWorker.cc:15
void incrementInputFileNumber()
Definition: OutputWorker.cc:42
void writeSubRun(SubRunPrincipal &srp)
Definition: OutputWorker.cc:70
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:53
void writeRun(RunPrincipal &rp)
Definition: OutputWorker.cc:64
Granularity fileGranularity() const