CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OutputModuleCommunicatorT.cc
Go to the documentation of this file.
1 
2 /*----------------------------------------------------------------------
3 ----------------------------------------------------------------------*/
4 
13 
15 
16 namespace edm {
17 
18  template<typename T>
19  void
21  module().doCloseFile();
22  }
23 
24  template<typename T>
25  bool
27  return module().shouldWeCloseFile();
28  }
29 
30  template<typename T>
31  void
33  module().maybeOpenFile();
34  }
35 
36  template<typename T>
37  void
39  module().doOpenFile(fb);
40  }
41 
42  template<typename T>
43  void
46  LuminosityBlockID(rp.run(), 0),
47  rp.index(),
49  rp.endTime(),
50  processContext);
51  ParentContext parentContext(&globalContext);
53  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
54  module().doWriteRun(rp, &mcc);
55  }
56 
57  template<typename T>
58  void
61  lbp.id(),
62  lbp.runPrincipal().index(),
63  lbp.index(),
64  lbp.beginTime(),
65  processContext);
66  ParentContext parentContext(&globalContext);
68  ModuleContextSentry moduleContextSentry(&mcc, parentContext);
69  module().doWriteLuminosityBlock(lbp, &mcc);
70  }
71 
72  template<typename T>
73  bool OutputModuleCommunicatorT<T>::wantAllEvents() const {return module().wantAllEvents();}
74 
75  template<typename T>
76  bool OutputModuleCommunicatorT<T>::limitReached() const {return module().limitReached();}
77 
78  template<typename T>
80 
81  template<typename T>
83  return module().keptProducts();
84  }
85 
86  template<typename T>
88  module().selectProducts(preg, helper);
89  }
90 
91  template<typename T>
92  void OutputModuleCommunicatorT<T>::setEventSelectionInfo(std::map<std::string, std::vector<std::pair<std::string, int> > > const& outputModulePathPositions,
93  bool anyProductProduced) {
94  module().setEventSelectionInfo(outputModulePathPositions, anyProductProduced);
95  }
96 
97  template<typename T>
99  return module().description();
100  }
101 
102  namespace impl {
103  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(void *) {
104  return std::move(std::unique_ptr<edm::OutputModuleCommunicator>{});
105  }
106  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::OutputModule * iMod){
107  return std::move(std::unique_ptr<edm::OutputModuleCommunicator>{ new OutputModuleCommunicatorT<edm::OutputModule>(iMod) });
108  }
109  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::global::OutputModuleBase * iMod){
110  return std::move(std::unique_ptr<edm::OutputModuleCommunicator>{ new OutputModuleCommunicatorT<edm::global::OutputModuleBase>(iMod) });
111  }
112  std::unique_ptr<edm::OutputModuleCommunicator> createCommunicatorIfNeeded(::edm::one::OutputModuleBase * iMod){
113  return std::move(std::unique_ptr<edm::OutputModuleCommunicator>{ new OutputModuleCommunicatorT<edm::one::OutputModuleBase>(iMod) });
114  }
115  }
116 }
117 
121 
122 namespace edm {
123  template class OutputModuleCommunicatorT<OutputModule>;
124  template class OutputModuleCommunicatorT<one::OutputModuleBase>;
125  template class OutputModuleCommunicatorT<global::OutputModuleBase>;
126 }
RunPrincipal const & runPrincipal() const
virtual bool wantAllEvents() const override
virtual edm::SelectedProductsForBranchType const & keptProducts() const override
Timestamp const & beginTime() const
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 void openNewFileIfNeeded() override
virtual bool limitReached() 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()
tuple description
Definition: idDealer.py:66
virtual void setEventSelectionInfo(std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced) override
boost::array< SelectedProducts, NumBranchTypes > SelectedProductsForBranchType
virtual ModuleDescription const & description() const override
RunIndex index() const
Definition: RunPrincipal.h:53
virtual bool shouldWeCloseFile() const override
preg
Definition: Schedule.cc:369
virtual void openFile(edm::FileBlock const &fb) override