CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDProducerBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_one_EDProducerBase_h
2 #define FWCore_Framework_one_EDProducerBase_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : one::EDProducerBase
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Thu, 02 May 2013 21:21:21 GMT
19 //
20 
21 // system include files
22 #include <mutex>
23 
24 // user include files
31 
32 // forward declarations
33 namespace edm {
34 
35  class ModuleCallingContext;
36  class PreallocationConfiguration;
37  class ActivityRegistry;
38  namespace maker {
39  template<typename T> class ModuleHolderT;
40  }
41 
42  namespace one {
43 
45  {
46 
47  public:
48  template <typename T> friend class edm::maker::ModuleHolderT;
49  template <typename T> friend class edm::WorkerT;
51 
52 
54  virtual ~EDProducerBase();
55 
56  static void fillDescriptions(ConfigurationDescriptions& descriptions);
57  static void prevalidate(ConfigurationDescriptions& descriptions);
58  static const std::string& baseType();
59 
60  // Warning: the returned moduleDescription will be invalid during construction
62 
63  private:
64  bool doEvent(EventPrincipal& ep, EventSetup const& c,
66  ModuleCallingContext const*);
68  void doBeginJob();
69  void doEndJob();
70 
71  void doBeginRun(RunPrincipal& rp, EventSetup const& c,
72  ModuleCallingContext const*);
73  void doEndRun(RunPrincipal& rp, EventSetup const& c,
74  ModuleCallingContext const*);
76  ModuleCallingContext const*);
78  ModuleCallingContext const*);
79 
81  void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren);
82 
83  //For now, the following are just dummy implemenations with no ability for users to override
86 
87 
90  }
91  std::string workerType() const {return "WorkerT<EDProducer>";}
92 
93  virtual void produce(Event&, EventSetup const&) = 0;
94  virtual void beginJob() {}
95  virtual void endJob(){}
96 
97  virtual void preForkReleaseResources() {}
98  virtual void postForkReacquireResources(unsigned int /*iChildIndex*/, unsigned int /*iNumberOfChildren*/) {}
99 
100  virtual void doBeginRun_(Run const& rp, EventSetup const& c);
101  virtual void doEndRun_(Run const& rp, EventSetup const& c);
102  virtual void doBeginLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
103  virtual void doEndLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
104 
105  virtual void doBeginRunProduce_(Run& rp, EventSetup const& c);
106  virtual void doEndRunProduce_(Run& rp, EventSetup const& c);
107  virtual void doBeginLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
108  virtual void doEndLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
109 
111 
114  }
116  std::vector<BranchID> previousParentage_;
118 
121  };
122 
123  }
124 }
125 
126 
127 #endif
static void fillDescriptions(ConfigurationDescriptions &descriptions)
std::string workerType() const
static const std::string & baseType()
virtual void doEndLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
static boost::mutex mutex
Definition: LHEProxy.cc:11
virtual void doBeginRunProduce_(Run &rp, EventSetup const &c)
virtual void doEndRunProduce_(Run &rp, EventSetup const &c)
void doEndLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:60
virtual void postForkReacquireResources(unsigned int, unsigned int)
void doBeginRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
ModuleDescription const & moduleDescription() const
ParentageID previousParentageId_
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void doEndLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void registerProductsAndCallbacks(EDProducerBase *module, ProductRegistry *reg)
void doRespondToCloseInputFile(FileBlock const &fb)
void doRespondToOpenInputFile(FileBlock const &fb)
virtual void doEndRun_(Run const &rp, EventSetup const &c)
bool doEvent(EventPrincipal &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
SharedResourcesAcquirer resourcesAcquirer_
EDProducerBase ModuleType
void doEndRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
void doBeginLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
virtual void preForkReleaseResources()
void setModuleDescription(ModuleDescription const &md)
static void prevalidate(ConfigurationDescriptions &descriptions)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
void doPreallocate(PreallocationConfiguration const &)
virtual SharedResourcesAcquirer createAcquirer()
Definition: vlib.h:208
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
virtual void produce(Event &, EventSetup const &)=0
Definition: Run.h:41