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 
9 
10 namespace edm {
11  class ActivityRegistry;
12  class MergeableRunProductMetadata;
13  class ThinnedAssociationsHelper;
14 
15  namespace one {
16  class OutputModuleBase;
17  }
18  namespace global {
19  class OutputModuleBase;
20  }
21  namespace limited {
22  class OutputModuleBase;
23  }
24  namespace impl {
25  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(void*);
26  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::one::OutputModuleBase*);
27  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase*);
28  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::limited::OutputModuleBase*);
29  } // namespace impl
30 
31  template <typename T>
32 
34  public:
35  OutputModuleCommunicatorT(T* iModule) : 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 
47  ProcessBlockPrincipal const&,
48  ProcessContext const*,
49  ActivityRegistry*) noexcept override;
50 
52  edm::RunPrincipal const& rp,
53  ProcessContext const*,
55  MergeableRunProductMetadata const*) noexcept override;
56 
59  ProcessContext const*,
60  ActivityRegistry*) noexcept override;
61 
63  bool limitReached() const override;
64 
65  void configure(edm::OutputModuleDescription const& desc) override;
66 
67  edm::SelectedProductsForBranchType const& keptProducts() const override;
68 
69  void selectProducts(edm::ProductRegistry const& preg,
71  ProcessBlockHelperBase const&) override;
72 
74  std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
75  bool anyProductProduced) override;
76 
77  ModuleDescription const& description() const override;
78 
79  static std::unique_ptr<edm::OutputModuleCommunicator> createIfNeeded(T* iMod) {
81  }
82 
83  private:
84  inline T& module() const noexcept { return *module_; }
86  };
87 } // namespace edm
88 #endif
void selectProducts(edm::ProductRegistry const &preg, ThinnedAssociationsHelper const &, ProcessBlockHelperBase const &) override
void writeLumiAsync(WaitingTaskHolder iTask, edm::LuminosityBlockPrincipal const &lbp, ProcessContext const *, ActivityRegistry *) noexcept override
ModuleDescription const & description() const override
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
void configure(edm::OutputModuleDescription const &desc) override
void writeRunAsync(WaitingTaskHolder iTask, edm::RunPrincipal const &rp, ProcessContext const *, ActivityRegistry *, MergeableRunProductMetadata const *) noexcept override
edm::SelectedProductsForBranchType const & keptProducts() const override
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced) override
void writeProcessBlockAsync(WaitingTaskHolder iTask, ProcessBlockPrincipal const &, ProcessContext const *, ActivityRegistry *) noexcept override
HLT enums.
static std::unique_ptr< edm::OutputModuleCommunicator > createIfNeeded(T *iMod)
long double T
void openFile(edm::FileBlock const &fb) override