CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OutputWorker.h
Go to the documentation of this file.
1 #ifndef Framework_OutputWorker_h
2 #define Framework_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 #include <memory>
14 
17 
18 namespace edm {
19 
20  class OutputWorker : public WorkerT<OutputModule> {
21  public:
22  OutputWorker(std::unique_ptr<OutputModule>&& mod,
23  ModuleDescription const&,
24  WorkerParams const&);
25 
26  virtual ~OutputWorker();
27 
28  // Call closeFile() on the controlled OutputModule.
29  void closeFile();
30 
31  // Call shouldWeCloseFile() on the controlled OutputModule.
32  bool shouldWeCloseFile() const;
33 
34  void openNewFileIfNeeded();
35 
36  bool wantAllEvents() const;
37 
38  void openFile(FileBlock const& fb);
39 
40  void writeRun(RunPrincipal const& rp);
41 
42  void writeLumi(LuminosityBlockPrincipal const& lbp);
43 
44  bool limitReached() const;
45 
46  void configure(OutputModuleDescription const& desc);
47 
48  SelectionsArray const& keptProducts() const;
49 
50  void selectProducts(ProductRegistry const& preg);
51  };
52 
53 }
54 
55 #endif
OutputWorker(std::unique_ptr< OutputModule > &&mod, ModuleDescription const &, WorkerParams const &)
Definition: OutputWorker.cc:11
bool shouldWeCloseFile() const
Definition: OutputWorker.cc:27
void writeLumi(LuminosityBlockPrincipal const &lbp)
Definition: OutputWorker.cc:47
void openFile(FileBlock const &fb)
Definition: OutputWorker.cc:37
boost::array< Selections, NumBranchTypes > SelectionsArray
Definition: Selections.h:12
SelectionsArray const & keptProducts() const
Definition: OutputWorker.cc:57
void selectProducts(ProductRegistry const &preg)
Definition: OutputWorker.cc:61
void configure(OutputModuleDescription const &desc)
Definition: OutputWorker.cc:55
bool limitReached() const
Definition: OutputWorker.cc:53
virtual ~OutputWorker()
Definition: OutputWorker.cc:18
void openNewFileIfNeeded()
Definition: OutputWorker.cc:32
bool wantAllEvents() const
Definition: OutputWorker.cc:51
T mod(const T &a, const T &b)
Definition: ecalDccMap.h:4
void writeRun(RunPrincipal const &rp)
Definition: OutputWorker.cc:42