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 
80  //For now, the following are just dummy implemenations with no ability for users to override
84  void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren);
85 
86 
89  }
90  std::string workerType() const {return "WorkerT<EDProducer>";}
91 
92  virtual void produce(Event&, EventSetup const&) = 0;
93  virtual void beginJob() {}
94  virtual void endJob(){}
95 
96  virtual void doBeginRun_(Run const& rp, EventSetup const& c);
97  virtual void doEndRun_(Run const& rp, EventSetup const& c);
98  virtual void doBeginLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
99  virtual void doEndLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
100 
101  virtual void doBeginRunProduce_(Run& rp, EventSetup const& c);
102  virtual void doEndRunProduce_(Run& rp, EventSetup const& c);
103  virtual void doBeginLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
104  virtual void doEndLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
105 
107 
109  moduleDescription_ = md;
110  }
112  std::vector<BranchID> previousParentage_;
114 
117  };
118 
119  }
120 }
121 
122 
123 #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
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 *)
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