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  }
31 
32  template <typename T>
33 
34  class OutputModuleCommunicatorT : public edm::OutputModuleCommunicator {
35  public:
37  module_(iModule){}
38  void closeFile() override;
39 
41  bool shouldWeCloseFile() const override;
42 
44  bool wantAllEvents() const override;
45 
46  void openFile(edm::FileBlock const& fb) override;
47 
48  void writeRunAsync(WaitingTaskHolder iTask,
49  edm::RunPrincipal const& rp,
50  ProcessContext const*,
52  MergeableRunProductMetadata const*) override;
53 
54  void writeLumiAsync(WaitingTaskHolder iTask,
56  ProcessContext const*,
57  ActivityRegistry*) override;
58 
60  bool limitReached() const override;
61 
62  void configure(edm::OutputModuleDescription const& desc) override;
63 
64  edm::SelectedProductsForBranchType const& keptProducts() const override;
65 
66  void selectProducts(edm::ProductRegistry const& preg, ThinnedAssociationsHelper const&) override;
67 
68  void setEventSelectionInfo(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 }
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