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 limited {
20  class OutputModuleBase;
21  }
22  namespace impl {
23  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(void *);
24  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::OutputModule *);
25  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::one::OutputModuleBase *);
26  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase *);
27  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::limited::OutputModuleBase *);
28  }
29 
30  template <typename T>
31 
32  class OutputModuleCommunicatorT : public edm::OutputModuleCommunicator {
33  public:
35  module_(iModule){}
36  void closeFile() override;
37 
39  bool shouldWeCloseFile() const override;
40 
42  bool wantAllEvents() const override;
43 
44  void openFile(edm::FileBlock const& fb) override;
45 
46  void writeRun(edm::RunPrincipal const& rp, ProcessContext const*) override;
47 
48  void writeLumi(edm::LuminosityBlockPrincipal const& lbp, ProcessContext const*) override;
49 
51  bool limitReached() const override;
52 
53  void configure(edm::OutputModuleDescription const& desc) override;
54 
55  edm::SelectedProductsForBranchType const& keptProducts() const override;
56 
57  void selectProducts(edm::ProductRegistry const& preg, ThinnedAssociationsHelper const&) override;
58 
59  void setEventSelectionInfo(std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
60  bool anyProductProduced) override;
61 
62  ModuleDescription const& description() const override;
63 
64  static std::unique_ptr<edm::OutputModuleCommunicator> createIfNeeded(T* iMod) {
66  }
67 
68  private:
69  inline T& module() const { return *module_;}
71  };
72 }
73 #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