LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
OutputWorker.cc
Go to the documentation of this file.
2 
7 
8 namespace art {
9  OutputWorker::OutputWorker(std::unique_ptr<OutputModule>&& mod,
10  ModuleDescription const& md,
11  WorkerParams const& wp)
12  : WorkerT<OutputModule>(std::move(mod), md, wp), ci_()
13  {
14  ci_->outputModuleInitiated(
15  label(),
16  fhicl::ParameterSetRegistry::get(description().parameterSetID()));
17  }
18 
20 
21  std::string const&
23  {
24  return module().lastClosedFileName();
25  }
26 
27  void
29  {
30  module().doCloseFile();
31  ci_->outputFileClosed(description().moduleLabel(),
33  }
34 
35  void
37  {
39  }
40 
41  bool
43  {
44  return module().requestsToCloseFile();
45  }
46 
47  void
49  {
50  module().doOpenFile(fb);
51  ci_->outputFileOpened(description().moduleLabel());
52  }
53 
54  void
56  {
57  module().doWriteRun(rp);
58  }
59 
60  void
62  {
63  module().doWriteSubRun(srp);
64  }
65 
66  void
68  {
69  module().doWriteEvent(srp);
70  }
71 
72  void
74  {
76  }
77 
78  void
80  {
82  }
83 
84  bool
86  {
87  return module().fileIsOpen();
88  }
89 
90  void
92  {
93  return module().setFileStatus(ofs);
94  }
95 
96  bool
98  {
99  return module().wantAllEvents();
100  }
101 
102  bool
104  {
105  return module().limitReached();
106  }
107 
108  void
110  {
111  module().configure(desc);
112  }
113 
114  void
116  {
117  module().selectProducts(productList);
118  }
119 
122  {
123  return module().fileGranularity();
124  }
125 }
void setRunAuxiliaryRangeSetID(RangeSet const &)
Definition: OutputWorker.cc:73
void openFile(FileBlock const &fb)
Definition: OutputWorker.cc:48
static collection_type const & get() noexcept
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductList.h:15
std::string const & lastClosedFileName() const
Definition: OutputWorker.cc:22
STL namespace.
void doWriteSubRun(SubRunPrincipal &srp)
virtual Granularity fileGranularity() const
Definition: OutputModule.h:245
bool limitReached() const
void configure(OutputModuleDescription const &desc)
virtual ~OutputWorker()
Definition: OutputWorker.cc:19
virtual std::string const & lastClosedFileName() const
Definition: OutputModule.cc:58
void setFileStatus(OutputFileStatus)
Definition: OutputWorker.cc:91
bool fileIsOpen() const
Definition: OutputWorker.cc:85
bool limitReached() const
Definition: OutputModule.h:361
OutputFileStatus
void setSubRunAuxiliaryRangeSetID(RangeSet const &)
Definition: OutputWorker.cc:79
ModuleDescription const & description() const
Definition: Worker.h:74
TFile fb("Li6.root")
virtual bool requestsToCloseFile() const
Definition: OutputModule.h:240
void doSetSubRunAuxiliaryRangeSetID(RangeSet const &)
OutputWorker(std::unique_ptr< OutputModule > &&mod, ModuleDescription const &, WorkerParams const &)
Definition: OutputWorker.cc:9
void doWriteEvent(EventPrincipal &ep)
virtual void incrementInputFileNumber()
Definition: OutputModule.h:227
bool requestsToCloseFile() const
Definition: OutputWorker.cc:42
bool fileIsOpen() const
Definition: OutputModule.h:104
OutputModule & module()
Definition: WorkerT.h:39
bool wantAllEvents() const
Definition: OutputWorker.cc:97
void selectProducts(ProductList const &)
Definition: OutputModule.cc:98
void doWriteRun(RunPrincipal &rp)
void writeEvent(EventPrincipal &ep)
Definition: OutputWorker.cc:67
HLT enums.
void doOpenFile(FileBlock const &fb)
virtual void setFileStatus(OutputFileStatus)
void incrementInputFileNumber()
Definition: OutputWorker.cc:36
void writeSubRun(SubRunPrincipal &srp)
Definition: OutputWorker.cc:61
std::string const & label() const
Definition: Worker.h:127
ServiceHandle< CatalogInterface > ci_
Definition: OutputWorker.h:66
void doSetRunAuxiliaryRangeSetID(RangeSet const &)
virtual void selectProducts(ProductList const &)
void configure(OutputModuleDescription const &desc)
Definition: OutputModule.cc:64
void writeRun(RunPrincipal &rp)
Definition: OutputWorker.cc:55
Granularity fileGranularity() const