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 
9 
10 namespace edm {
11  class ActivityRegistry;
12  class MergeableRunProductMetadata;
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::one::OutputModuleBase*);
27  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase*);
28  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::limited::OutputModuleBase*);
29  } // namespace impl
30 
31  template <typename T>
32 
33  class OutputModuleCommunicatorT : public edm::OutputModuleCommunicator {
34  public:
35  OutputModuleCommunicatorT(T* iModule) : module_(iModule) {}
36  void closeFile() override;
37 
39  bool shouldWeCloseFile() const override;
40 
42  bool wantAllEvents() const override;
43 
44  void openFile(edm::FileBlock const& fb) override;
45 
47  ProcessBlockPrincipal const&,
48  ProcessContext const*,
49  ActivityRegistry*) override;
50 
52  edm::RunPrincipal const& rp,
53  ProcessContext const*,
55  MergeableRunProductMetadata const*) override;
56 
59  ProcessContext const*,
60  ActivityRegistry*) override;
61 
63  bool limitReached() const override;
64 
65  void configure(edm::OutputModuleDescription const& desc) override;
66 
67  edm::SelectedProductsForBranchType const& keptProducts() const override;
68 
69  void selectProducts(edm::ProductRegistry const& preg,
71  ProcessBlockHelperBase const&) override;
72 
74  std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
75  bool anyProductProduced) override;
76 
77  ModuleDescription const& description() const override;
78 
79  static std::unique_ptr<edm::OutputModuleCommunicator> createIfNeeded(T* iMod) {
81  }
82 
83  private:
84  inline T& module() const { return *module_; }
86  };
87 } // namespace edm
88 #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:66
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 &, ProcessBlockHelperBase 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:22
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:214
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:40
edm::OutputModuleCommunicatorT::module_
T * module_
Definition: OutputModuleCommunicatorT.h:85
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:69
edm::OutputModuleCommunicatorT::closeFile
void closeFile() override
Definition: OutputModuleCommunicatorT.cc:51
edm::OutputModuleCommunicatorT::limitReached
bool limitReached() const override
Definition: OutputModuleCommunicatorT.cc:185
OutputModuleBase
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
edm::ProcessBlockHelperBase
Definition: ProcessBlockHelperBase.h:18
edm::impl::createCommunicatorIfNeeded
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
Definition: OutputModuleCommunicatorT.cc:219
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:67
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:207
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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:35
edm::OutputModuleCommunicatorT::module
T & module() const
Definition: OutputModuleCommunicatorT.h:84
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:79
FWCoreCommonFwd.h