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  ProcessBlockPrincipal const&,
47  ProcessContext const*,
48  ActivityRegistry*) override;
49 
51  edm::RunPrincipal const& rp,
52  ProcessContext const*,
54  MergeableRunProductMetadata const*) override;
55 
58  ProcessContext const*,
59  ActivityRegistry*) override;
60 
62  bool limitReached() const override;
63 
64  void configure(edm::OutputModuleDescription const& desc) override;
65 
66  edm::SelectedProductsForBranchType const& keptProducts() const override;
67 
68  void selectProducts(edm::ProductRegistry const& preg, ThinnedAssociationsHelper const&) override;
69 
71  std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
72  bool anyProductProduced) override;
73 
74  ModuleDescription const& description() const override;
75 
76  static std::unique_ptr<edm::OutputModuleCommunicator> createIfNeeded(T* iMod) {
78  }
79 
80  private:
81  inline T& module() const { return *module_; }
83  };
84 } // namespace edm
85 #endif
edm::OutputModuleCommunicatorT::writeRunAsync
void writeRunAsync(WaitingTaskHolder iTask, edm::RunPrincipal const &rp, ProcessContext const *, ActivityRegistry *, MergeableRunProductMetadata const *) override
Definition: OutputModuleCommunicatorT.cc:105
SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
ActivityRegistry
edm::global::OutputModuleBase
Definition: OutputModuleBase.h:64
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:200
edm::ProcessBlockPrincipal
Definition: ProcessBlockPrincipal.h:22
edm::ModuleDescription
Definition: ModuleDescription.h:21
edm::ProductRegistry
Definition: ProductRegistry.h:37
edm::FileBlock
Definition: FileBlock.h:20
edm::OutputModuleCommunicatorT::configure
void configure(edm::OutputModuleDescription const &desc) override
Definition: OutputModuleCommunicatorT.cc:190
OutputModuleCommunicator.h
edm::OutputModuleCommunicatorT::description
ModuleDescription const & description() const override
Definition: OutputModuleCommunicatorT.cc:213
edm::OutputModuleCommunicatorT::writeProcessBlockAsync
void writeProcessBlockAsync(WaitingTaskHolder iTask, ProcessBlockPrincipal const &, ProcessContext const *, ActivityRegistry *) override
Definition: OutputModuleCommunicatorT.cc:66
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
edm::MergeableRunProductMetadata
Definition: MergeableRunProductMetadata.h:52
edm::OutputModuleCommunicator
Definition: OutputModuleCommunicator.h:39
edm::OutputModuleCommunicatorT::module_
T * module_
Definition: OutputModuleCommunicatorT.h:82
edm::OutputModuleCommunicatorT::writeLumiAsync
void writeLumiAsync(WaitingTaskHolder iTask, edm::LuminosityBlockPrincipal const &lbp, ProcessContext const *, ActivityRegistry *) override
Definition: OutputModuleCommunicatorT.cc:146
edm::one::OutputModuleBase
Definition: OutputModuleBase.h:67
edm::OutputModuleCommunicatorT::closeFile
void closeFile() override
Definition: OutputModuleCommunicatorT.cc:51
edm::OutputModuleCommunicatorT::limitReached
bool limitReached() const override
Definition: OutputModuleCommunicatorT.cc:185
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
OutputModuleBase
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
edm::impl::createCommunicatorIfNeeded
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
Definition: OutputModuleCommunicatorT.cc:218
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:32
edm::OutputModuleCommunicatorT::keptProducts
edm::SelectedProductsForBranchType const & keptProducts() const override
Definition: OutputModuleCommunicatorT.cc:195
edm::limited::OutputModuleBase
Definition: OutputModuleBase.h:65
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::OutputModuleCommunicatorT::wantAllEvents
bool wantAllEvents() const override
Definition: OutputModuleCommunicatorT.cc:180
edm::OutputModuleCommunicatorT::setEventSelectionInfo
void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced) override
Definition: OutputModuleCommunicatorT.cc:206
edm::OutputModuleCommunicatorT::shouldWeCloseFile
bool shouldWeCloseFile() const override
Definition: OutputModuleCommunicatorT.cc:56
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
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:81
T
long double T
Definition: Basic3DVectorLD.h:48
edm::OutputModuleCommunicatorT::openFile
void openFile(edm::FileBlock const &fb) override
Definition: OutputModuleCommunicatorT.cc:61
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:76
benchmark_cfg.fb
fb
Definition: benchmark_cfg.py:14