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 // $Id: EDProducerBase.h,v 1.1 2013/05/17 14:49:44 chrjones Exp $
20 //
21 
22 // system include files
23 
24 // user include files
30 
31 // forward declarations
32 namespace edm {
33  namespace one {
34 
36  {
37 
38  public:
39  template <typename T> friend class edm::WorkerT;
42 
43 
45  virtual ~EDProducerBase();
46 
47  static void fillDescriptions(ConfigurationDescriptions& descriptions);
48  static void prevalidate(ConfigurationDescriptions& descriptions);
49  static const std::string& baseType();
50 
51  protected:
52  // The returned pointer will be null unless the this is currently
53  // executing its event loop function ('produce').
55 
56  private:
57  bool doEvent(EventPrincipal& ep, EventSetup const& c,
58  CurrentProcessingContext const* cpcp);
59  void doBeginJob();
60  void doEndJob();
61 
62  void doBeginRun(RunPrincipal& rp, EventSetup const& c,
63  CurrentProcessingContext const* cpc);
64  void doEndRun(RunPrincipal& rp, EventSetup const& c,
65  CurrentProcessingContext const* cpc);
67  CurrentProcessingContext const* cpc);
69  CurrentProcessingContext const* cpc);
70 
71  //For now, the following are just dummy implemenations with no ability for users to override
77  void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren);
78 
79 
82  }
83  std::string workerType() const {return "WorkerT<EDProducer>";}
84 
85  virtual void produce(Event&, EventSetup const&) = 0;
86  virtual void beginJob() {}
87  virtual void endJob(){}
88 
89  virtual void doBeginRun_(Run const& rp, EventSetup const& c);
90  virtual void doEndRun_(Run const& rp, EventSetup const& c);
91  virtual void doBeginLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
92  virtual void doEndLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
93 
94  virtual void doBeginRunProduce_(Run& rp, EventSetup const& c);
95  virtual void doEndRunProduce_(Run& rp, EventSetup const& c);
97  virtual void doEndLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
98 
99 
101  moduleDescription_ = md;
102  }
105  std::vector<BranchID> previousParentage_;
107 
108  };
109 
110  }
111 }
112 
113 
114 #endif
std::string workerType() const
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
virtual void doBeginLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void doEndRun(RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
void registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:60
virtual void doEndRunProduce_(Run &rp, EventSetup const &c)
void doRespondToCloseOutputFiles(FileBlock const &fb)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
void doRespondToOpenInputFile(FileBlock const &fb)
ParentageID previousParentageId_
void doBeginLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
void doBeginRun(RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
bool doEvent(EventPrincipal &ep, EventSetup const &c, CurrentProcessingContext const *cpcp)
virtual void doBeginRunProduce_(Run &rp, EventSetup const &c)
static void prevalidate(ConfigurationDescriptions &descriptions)
void registerProductsAndCallbacks(EDProducerBase *module, ProductRegistry *reg)
void doRespondToCloseInputFile(FileBlock const &fb)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
EDProducerBase ModuleType
WorkerT< EDProducerBase > WorkerType
CurrentProcessingContext const * currentContext() const
virtual void doEndLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void setModuleDescription(ModuleDescription const &md)
void doRespondToOpenOutputFiles(FileBlock const &fb)
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
void doEndLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
Definition: vlib.h:209
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
virtual void produce(Event &, EventSetup const &)=0
CurrentProcessingContext const * current_context_
virtual void doEndRun_(Run const &rp, EventSetup const &c)
Definition: Run.h:36
static const std::string & baseType()