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 OutputModule;
12  class ThinnedAssociationsHelper;
13 
14  namespace one {
15  class OutputModuleBase;
16  }
17  namespace global {
18  class OutputModuleBase;
19  }
20  namespace limited {
21  class OutputModuleBase;
22  }
23  namespace impl {
24  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(void *);
25  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::OutputModule *);
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  }
30 
31  template <typename T>
32 
33  class OutputModuleCommunicatorT : public edm::OutputModuleCommunicator {
34  public:
36  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*,
50  ActivityRegistry*) override;
51 
52  void writeLumiAsync(WaitingTaskHolder iTask,
54  ProcessContext const*,
55  ActivityRegistry*) override;
56 
58  bool limitReached() const override;
59 
60  void configure(edm::OutputModuleDescription const& desc) override;
61 
62  edm::SelectedProductsForBranchType const& keptProducts() const override;
63 
64  void selectProducts(edm::ProductRegistry const& preg, ThinnedAssociationsHelper const&) override;
65 
66  void setEventSelectionInfo(std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
67  bool anyProductProduced) override;
68 
69  ModuleDescription const& description() const override;
70 
71  static std::unique_ptr<edm::OutputModuleCommunicator> createIfNeeded(T* iMod) {
73  }
74 
75  private:
76  inline T& module() const { return *module_;}
78  };
79 }
80 #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