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 
23 // user include files
29 
30 // forward declarations
31 namespace edm {
32 
33  class ModuleCallingContext;
34  class PreallocationConfiguration;
35  namespace maker {
36  template<typename T> class ModuleHolderT;
37  }
38 
39  namespace one {
40 
42  {
43 
44  public:
45  template <typename T> friend class edm::maker::ModuleHolderT;
46  template <typename T> friend class edm::WorkerT;
48 
49 
51  virtual ~EDProducerBase();
52 
53  static void fillDescriptions(ConfigurationDescriptions& descriptions);
54  static void prevalidate(ConfigurationDescriptions& descriptions);
55  static const std::string& baseType();
56 
57  // Warning: the returned moduleDescription will be invalid during construction
59 
60  private:
61  bool doEvent(EventPrincipal& ep, EventSetup const& c,
62  ModuleCallingContext const*);
64  void doBeginJob();
65  void doEndJob();
66 
67  void doBeginRun(RunPrincipal& rp, EventSetup const& c,
68  ModuleCallingContext const*);
69  void doEndRun(RunPrincipal& rp, EventSetup const& c,
70  ModuleCallingContext const*);
72  ModuleCallingContext const*);
74  ModuleCallingContext const*);
75 
76  //For now, the following are just dummy implemenations with no ability for users to override
80  void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren);
81 
82 
85  }
86  std::string workerType() const {return "WorkerT<EDProducer>";}
87 
88  virtual void produce(Event&, EventSetup const&) = 0;
89  virtual void beginJob() {}
90  virtual void endJob(){}
91 
92  virtual void doBeginRun_(Run const& rp, EventSetup const& c);
93  virtual void doEndRun_(Run const& rp, EventSetup const& c);
94  virtual void doBeginLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
95  virtual void doEndLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
96 
97  virtual void doBeginRunProduce_(Run& rp, EventSetup const& c);
98  virtual void doEndRunProduce_(Run& rp, EventSetup const& c);
100  virtual void doEndLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
101 
102 
104  moduleDescription_ = md;
105  }
107  std::vector<BranchID> previousParentage_;
109 
110  };
111 
112  }
113 }
114 
115 
116 #endif
static void fillDescriptions(ConfigurationDescriptions &descriptions)
std::string workerType() const
static const std::string & baseType()
bool doEvent(EventPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
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)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
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 &)
Definition: vlib.h:208
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
virtual void produce(Event &, EventSetup const &)=0
Definition: Run.h:41