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().maybeOpenFile();
33  }
34 
35  template<typename T>
36  void
38  module().doOpenFile(fb);
39  }
40 
41  template<typename T>
42  void
45  LuminosityBlockID(rp.run(), 0),
46  rp.index(),
48  rp.endTime(),
49  processContext);
50  ParentContext parentContext(&globalContext);
52  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
53  module().doWriteRun(rp, &mcc);
54  }
55 
56  template<typename T>
57  void
60  lbp.id(),
61  lbp.runPrincipal().index(),
62  lbp.index(),
63  lbp.beginTime(),
64  processContext);
65  ParentContext parentContext(&globalContext);
67  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
68  module().doWriteLuminosityBlock(lbp, &mcc);
69  }
70 
71  template<typename T>
72  bool OutputModuleCommunicatorT<T>::wantAllEvents() const {return module().wantAllEvents();}
73 
74  template<typename T>
75  bool OutputModuleCommunicatorT<T>::limitReached() const {return module().limitReached();}
76 
77  template<typename T>
79 
80  template<typename T>
82  return module().keptProducts();
83  }
84 
85  template<typename T>
87  module().selectProducts(preg, helper);
88  }
89 
90  template<typename T>
91  void OutputModuleCommunicatorT<T>::setEventSelectionInfo(std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
92  bool anyProductProduced) {
93  module().setEventSelectionInfo(outputModulePathPositions, anyProductProduced);
94  }
95 
96  template<typename T>
98  return module().description();
99  }
100 
101  namespace impl {
102  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(void *) {
103  return std::unique_ptr<edm::OutputModuleCommunicator>{};
104  }
105  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::OutputModule * iMod){
106  return std::make_unique<OutputModuleCommunicatorT<edm::OutputModule>>(iMod);
107  }
108  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase * iMod){
109  return std::make_unique<OutputModuleCommunicatorT<edm::global::OutputModuleBase>>(iMod);
110  }
111  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::one::OutputModuleBase * iMod){
112  return std::make_unique<OutputModuleCommunicatorT<edm::one::OutputModuleBase>>(iMod);
113  }
114  }
115 }
116 
120 
121 namespace edm {
125 }
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 openNewFileIfNeeded() 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