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 ActivityRegistry;
11  class MergeableRunProductMetadata;
12  class OutputModule;
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::OutputModule*);
27  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::one::OutputModuleBase*);
28  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase*);
29  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::limited::OutputModuleBase*);
30  } // namespace impl
31 
32  template <typename T>
33 
34  class OutputModuleCommunicatorT : public edm::OutputModuleCommunicator {
35  public:
36  OutputModuleCommunicatorT(T* iModule) : module_(iModule) {}
37  void closeFile() override;
38 
40  bool shouldWeCloseFile() const override;
41 
43  bool wantAllEvents() const override;
44 
45  void openFile(edm::FileBlock const& fb) override;
46 
47  void writeRunAsync(WaitingTaskHolder iTask,
48  edm::RunPrincipal const& rp,
49  ProcessContext const*,
51  MergeableRunProductMetadata const*) override;
52 
53  void writeLumiAsync(WaitingTaskHolder iTask,
55  ProcessContext const*,
56  ActivityRegistry*) override;
57 
59  bool limitReached() const override;
60 
61  void configure(edm::OutputModuleDescription const& desc) override;
62 
63  edm::SelectedProductsForBranchType const& keptProducts() const override;
64 
65  void selectProducts(edm::ProductRegistry const& preg, ThinnedAssociationsHelper const&) override;
66 
67  void setEventSelectionInfo(
68  std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
69  bool anyProductProduced) override;
70 
71  ModuleDescription const& description() const override;
72 
73  static std::unique_ptr<edm::OutputModuleCommunicator> createIfNeeded(T* iMod) {
75  }
76 
77  private:
78  inline T& module() const { return *module_; }
80  };
81 } // namespace edm
82 #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:511