LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
OutputWorker.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_OutputWorker_h
2 #define art_Framework_Core_OutputWorker_h
3 
4 /*----------------------------------------------------------------------
5 
6 OutputWorker: The OutputModule as the schedule sees it. The job of
7 this object is to call the output module.
8 
9 According to our current definition, a single output module can only
10 appear in one worker.
11 
12 ----------------------------------------------------------------------*/
13 
22 
23 #include <memory>
24 
25 namespace art {
26 
27  class RangeSet;
28 
29  class OutputWorker : public WorkerT<OutputModule> {
30  public:
31  OutputWorker(std::unique_ptr<OutputModule>&& mod,
32  ModuleDescription const&,
33  WorkerParams const&);
34 
35  virtual ~OutputWorker();
36 
37  std::string const& lastClosedFileName() const;
38 
39  void closeFile();
40 
41  bool fileIsOpen() const;
43  bool requestsToCloseFile() const;
44 
45  bool wantAllEvents() const;
46 
47  void openFile(FileBlock const& fb);
48 
49  void writeRun(RunPrincipal& rp);
50  void writeSubRun(SubRunPrincipal& srp);
51  void writeEvent(EventPrincipal& ep);
52 
55 
56  bool limitReached() const;
58 
59  void configure(OutputModuleDescription const& desc);
60 
62 
63  virtual void selectProducts(ProductList const&);
64 
65  private:
68  };
69 }
70 
71 #endif /* art_Framework_Core_OutputWorker_h */
72 
73 // Local Variables:
74 // mode: c++
75 // End:
void setRunAuxiliaryRangeSetID(RangeSet const &)
Definition: OutputWorker.cc:73
void openFile(FileBlock const &fb)
Definition: OutputWorker.cc:48
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductList.h:15
std::string const & lastClosedFileName() const
Definition: OutputWorker.cc:22
bool limitReached() const
Granularity fileGranularity_
Definition: OutputWorker.h:67
void configure(OutputModuleDescription const &desc)
virtual ~OutputWorker()
Definition: OutputWorker.cc:19
void setFileStatus(OutputFileStatus)
Definition: OutputWorker.cc:91
bool fileIsOpen() const
Definition: OutputWorker.cc:85
OutputFileStatus
void setSubRunAuxiliaryRangeSetID(RangeSet const &)
Definition: OutputWorker.cc:79
TFile fb("Li6.root")
OutputWorker(std::unique_ptr< OutputModule > &&mod, ModuleDescription const &, WorkerParams const &)
Definition: OutputWorker.cc:9
bool requestsToCloseFile() const
Definition: OutputWorker.cc:42
bool wantAllEvents() const
Definition: OutputWorker.cc:97
void writeEvent(EventPrincipal &ep)
Definition: OutputWorker.cc:67
HLT enums.
void incrementInputFileNumber()
Definition: OutputWorker.cc:36
void writeSubRun(SubRunPrincipal &srp)
Definition: OutputWorker.cc:61
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:66
virtual void selectProducts(ProductList const &)
void writeRun(RunPrincipal &rp)
Definition: OutputWorker.cc:55
Granularity fileGranularity() const