CMS 3D CMS Logo

OutputModuleCommunicatorT.cc
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2 ----------------------------------------------------------------------*/
3 
12 
14 
15 namespace edm {
16 
17  template<typename T>
18  void
20  module().doCloseFile();
21  }
22 
23  template<typename T>
24  bool
26  return module().shouldWeCloseFile();
27  }
28 
29  template<typename T>
30  void
32  module().doOpenFile(fb);
33  }
34 
35  template<typename T>
36  void
39  LuminosityBlockID(rp.run(), 0),
40  rp.index(),
42  rp.endTime(),
43  processContext);
44  ParentContext parentContext(&globalContext);
46  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
47  module().doWriteRun(rp, &mcc);
48  }
49 
50  template<typename T>
51  void
54  lbp.id(),
55  lbp.runPrincipal().index(),
56  lbp.index(),
57  lbp.beginTime(),
58  processContext);
59  ParentContext parentContext(&globalContext);
61  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
62  module().doWriteLuminosityBlock(lbp, &mcc);
63  }
64 
65  template<typename T>
66  bool OutputModuleCommunicatorT<T>::wantAllEvents() const {return module().wantAllEvents();}
67 
68  template<typename T>
69  bool OutputModuleCommunicatorT<T>::limitReached() const {return module().limitReached();}
70 
71  template<typename T>
73 
74  template<typename T>
76  return module().keptProducts();
77  }
78 
79  template<typename T>
81  module().selectProducts(preg, helper);
82  }
83 
84  template<typename T>
85  void OutputModuleCommunicatorT<T>::setEventSelectionInfo(std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
86  bool anyProductProduced) {
87  module().setEventSelectionInfo(outputModulePathPositions, anyProductProduced);
88  }
89 
90  template<typename T>
92  return module().description();
93  }
94 
95  namespace impl {
96  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(void *) {
97  return std::unique_ptr<edm::OutputModuleCommunicator>{};
98  }
99  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::OutputModule * iMod){
100  return std::make_unique<OutputModuleCommunicatorT<edm::OutputModule>>(iMod);
101  }
102  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase * iMod){
103  return std::make_unique<OutputModuleCommunicatorT<edm::global::OutputModuleBase>>(iMod);
104  }
105  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::one::OutputModuleBase * iMod){
106  return std::make_unique<OutputModuleCommunicatorT<edm::one::OutputModuleBase>>(iMod);
107  }
108  }
109 }
110 
114 
115 namespace edm {
119 }
RunPrincipal const & runPrincipal() const
Definition: helper.py:1
Timestamp const & beginTime() const
std::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
virtual void selectProducts(edm::ProductRegistry const &preg, ThinnedAssociationsHelper const &) override
virtual void configure(edm::OutputModuleDescription const &desc) override
LuminosityBlockIndex index() const
RunNumber_t run() const
Definition: RunPrincipal.h:61
virtual void writeRun(edm::RunPrincipal const &rp, ProcessContext const *) override
virtual bool shouldWeCloseFile() const override
virtual ModuleDescription const & description() const override
virtual edm::SelectedProductsForBranchType const & keptProducts() const override
virtual void writeLumi(edm::LuminosityBlockPrincipal const &lbp, ProcessContext const *) override
Timestamp const & endTime() const
Definition: RunPrincipal.h:77
std::unique_ptr< edm::OutputModuleCommunicator > createCommunicatorIfNeeded(void *)
static LuminosityBlockIndex invalidLuminosityBlockIndex()
virtual void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced) override
RunIndex index() const
Definition: RunPrincipal.h:53
HLT enums.
virtual bool limitReached() const override
virtual bool wantAllEvents() const override
virtual void openFile(edm::FileBlock const &fb) override