CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OutputModuleCommunicatorT.h
Go to the documentation of this file.
1 
2 #ifndef FWCore_Framework_OutputModuleCommunicatorT_h
3 #define FWCore_Framework_OutputModuleCommunicatorT_h
4 /*----------------------------------------------------------------------
5 ----------------------------------------------------------------------*/
6 
8 
9 namespace edm {
10  class OutputModule;
11  class ThinnedAssociationsHelper;
12 
13  namespace one {
14  class OutputModuleBase;
15  }
16  namespace global {
17  class OutputModuleBase;
18  }
19  namespace impl {
20  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(void *);
21  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::OutputModule *);
22  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::one::OutputModuleBase *);
23  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase *);
24  }
25 
26  template <typename T>
27 
28  class OutputModuleCommunicatorT : public edm::OutputModuleCommunicator {
29  public:
31  module_(iModule){}
32  virtual void closeFile() override;
33 
35  virtual bool shouldWeCloseFile() const override;
36 
37  virtual void openNewFileIfNeeded() override;
38 
40  virtual bool wantAllEvents() const override;
41 
42  virtual void openFile(edm::FileBlock const& fb) override;
43 
44  virtual void writeRun(edm::RunPrincipal const& rp, ProcessContext const*) override;
45 
46  virtual void writeLumi(edm::LuminosityBlockPrincipal const& lbp, ProcessContext const*) override;
47 
49  virtual bool limitReached() const override;
50 
51  virtual void configure(edm::OutputModuleDescription const& desc) override;
52 
53  virtual edm::SelectedProductsForBranchType const& keptProducts() const override;
54 
55  virtual void selectProducts(edm::ProductRegistry const& preg, ThinnedAssociationsHelper const&) override;
56 
57  virtual void setEventSelectionInfo(std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
58  bool anyProductProduced) override;
59 
60  virtual ModuleDescription const& description() const override;
61 
62  static std::unique_ptr<edm::OutputModuleCommunicator> createIfNeeded(T* iMod) {
64  }
65 
66  private:
67  inline T& module() const { return *module_;}
69  };
70 }
71 #endif
virtual bool wantAllEvents() const override
virtual edm::SelectedProductsForBranchType const & keptProducts() const override
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
virtual void selectProducts(edm::ProductRegistry const &preg, ThinnedAssociationsHelper const &) override
virtual void configure(edm::OutputModuleDescription const &desc) override
virtual void writeRun(edm::RunPrincipal const &rp, ProcessContext const *) override
virtual void openNewFileIfNeeded() override
def move
Definition: eostools.py:510
virtual bool limitReached() const override
virtual void writeLumi(edm::LuminosityBlockPrincipal const &lbp, ProcessContext const *) override
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
virtual void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced) override
virtual ModuleDescription const & description() const override
static std::unique_ptr< edm::OutputModuleCommunicator > createIfNeeded(T *iMod)
virtual bool shouldWeCloseFile() const override
preg
Definition: Schedule.cc:384
long double T
virtual void openFile(edm::FileBlock const &fb) override