CMS 3D CMS Logo

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
static const char module_[]
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
HLT enums.
static std::unique_ptr< edm::OutputModuleCommunicator > createIfNeeded(T *iMod)
long double T
def move(src, dest)
Definition: eostools.py:510