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 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::one::OutputModuleBase*);
26  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase*);
27  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::limited::OutputModuleBase*);
28  } // namespace impl
29 
30  template <typename T>
31 
32  class OutputModuleCommunicatorT : public edm::OutputModuleCommunicator {
33  public:
34  OutputModuleCommunicatorT(T* iModule) : module_(iModule) {}
35  void closeFile() override;
36 
38  bool shouldWeCloseFile() const override;
39 
41  bool wantAllEvents() const override;
42 
43  void openFile(edm::FileBlock const& fb) override;
44 
46  edm::RunPrincipal const& rp,
47  ProcessContext const*,
49  MergeableRunProductMetadata const*) override;
50 
53  ProcessContext const*,
54  ActivityRegistry*) override;
55 
57  bool limitReached() const override;
58 
59  void configure(edm::OutputModuleDescription const& desc) override;
60 
61  edm::SelectedProductsForBranchType const& keptProducts() const override;
62 
63  void selectProducts(edm::ProductRegistry const& preg, ThinnedAssociationsHelper const&) override;
64 
66  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 } // namespace edm
80 #endif
edm::OutputModuleCommunicatorT::writeRunAsync
void writeRunAsync(WaitingTaskHolder iTask, edm::RunPrincipal const &rp, ProcessContext const *, ActivityRegistry *, MergeableRunProductMetadata const *) override
Definition: OutputModuleCommunicatorT.cc:62
ActivityRegistry
edm::global::OutputModuleBase
Definition: OutputModuleBase.h:65
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProcessContext
Definition: ProcessContext.h:27
edm::LuminosityBlockPrincipal
Definition: LuminosityBlockPrincipal.h:31
edm::OutputModuleCommunicatorT::selectProducts
void selectProducts(edm::ProductRegistry const &preg, ThinnedAssociationsHelper const &) override
Definition: OutputModuleCommunicatorT.cc:157
edm::ModuleDescription
Definition: ModuleDescription.h:21
edm::ProductRegistry
Definition: ProductRegistry.h:34
edm::FileBlock
Definition: FileBlock.h:20
edm::OutputModuleCommunicatorT::configure
void configure(edm::OutputModuleDescription const &desc) override
Definition: OutputModuleCommunicatorT.cc:147
OutputModuleCommunicator.h
edm::OutputModuleCommunicatorT::description
ModuleDescription const & description() const override
Definition: OutputModuleCommunicatorT.cc:170
edm::ActivityRegistry
Definition: ActivityRegistry.h:132
edm::MergeableRunProductMetadata
Definition: MergeableRunProductMetadata.h:52
edm::OutputModuleCommunicator
Definition: OutputModuleCommunicator.h:39
edm::OutputModuleCommunicatorT::module_
T * module_
Definition: OutputModuleCommunicatorT.h:77
edm::OutputModuleCommunicatorT::writeLumiAsync
void writeLumiAsync(WaitingTaskHolder iTask, edm::LuminosityBlockPrincipal const &lbp, ProcessContext const *, ActivityRegistry *) override
Definition: OutputModuleCommunicatorT.cc:103
edm::one::OutputModuleBase
Definition: OutputModuleBase.h:68
edm::OutputModuleCommunicatorT::closeFile
void closeFile() override
Definition: OutputModuleCommunicatorT.cc:47
edm::OutputModuleCommunicatorT::limitReached
bool limitReached() const override
Definition: OutputModuleCommunicatorT.cc:142
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
OutputModuleBase
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:35
edm::impl::createCommunicatorIfNeeded
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
Definition: OutputModuleCommunicatorT.cc:175
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:30
edm::OutputModuleCommunicatorT::keptProducts
edm::SelectedProductsForBranchType const & keptProducts() const override
Definition: OutputModuleCommunicatorT.cc:152
edm::limited::OutputModuleBase
Definition: OutputModuleBase.h:66
edm::OutputModuleCommunicatorT::wantAllEvents
bool wantAllEvents() const override
Definition: OutputModuleCommunicatorT.cc:137
edm::OutputModuleCommunicatorT::setEventSelectionInfo
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced) override
Definition: OutputModuleCommunicatorT.cc:163
edm::OutputModuleCommunicatorT::shouldWeCloseFile
bool shouldWeCloseFile() const override
Definition: OutputModuleCommunicatorT.cc:52
edm::SelectedProductsForBranchType
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
Definition: SelectedProducts.h:13
impl
Definition: trackAlgoPriorityOrder.h:18
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::OutputModuleCommunicatorT::OutputModuleCommunicatorT
OutputModuleCommunicatorT(T *iModule)
Definition: OutputModuleCommunicatorT.h:34
edm::OutputModuleCommunicatorT::module
T & module() const
Definition: OutputModuleCommunicatorT.h:76
T
long double T
Definition: Basic3DVectorLD.h:48
edm::OutputModuleCommunicatorT::openFile
void openFile(edm::FileBlock const &fb) override
Definition: OutputModuleCommunicatorT.cc:57
genParticles_cff.map
map
Definition: genParticles_cff.py:11
edm::OutputModuleDescription
Definition: OutputModuleDescription.h:17
edm::RunPrincipal
Definition: RunPrincipal.h:34
edm::OutputModuleCommunicatorT::createIfNeeded
static std::unique_ptr< edm::OutputModuleCommunicator > createIfNeeded(T *iMod)
Definition: OutputModuleCommunicatorT.h:71
benchmark_cfg.fb
fb
Definition: benchmark_cfg.py:14