test
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  class ProductRegistry;
39  class ThinnedAssociationsHelper;
40 
41  namespace maker {
42  template<typename T> class ModuleHolderT;
43  }
44 
45  namespace one {
46 
48  {
49 
50  public:
51  template <typename T> friend class edm::maker::ModuleHolderT;
52  template <typename T> friend class edm::WorkerT;
54 
55 
57  virtual ~EDProducerBase();
58 
59  static void fillDescriptions(ConfigurationDescriptions& descriptions);
60  static void prevalidate(ConfigurationDescriptions& descriptions);
61  static const std::string& baseType();
62 
63  // Warning: the returned moduleDescription will be invalid during construction
65 
66  private:
67  bool doEvent(EventPrincipal const& ep, EventSetup const& c,
69  ModuleCallingContext const*);
71  void doBeginJob();
72  void doEndJob();
73 
74  void doBeginRun(RunPrincipal const& rp, EventSetup const& c,
75  ModuleCallingContext const*);
76  void doEndRun(RunPrincipal const& rp, EventSetup const& c,
77  ModuleCallingContext const*);
79  ModuleCallingContext const*);
81  ModuleCallingContext const*);
82 
84  void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren);
85 
86  //For now, the following are just dummy implemenations with no ability for users to override
91 
94  }
95  std::string workerType() const {return "WorkerT<EDProducer>";}
96 
97  virtual void produce(Event&, EventSetup const&) = 0;
98  virtual void beginJob() {}
99  virtual void endJob(){}
100 
101  virtual void preForkReleaseResources() {}
102  virtual void postForkReacquireResources(unsigned int /*iChildIndex*/, unsigned int /*iNumberOfChildren*/) {}
103 
104  virtual void doBeginRun_(Run const& rp, EventSetup const& c);
105  virtual void doEndRun_(Run const& rp, EventSetup const& c);
106  virtual void doBeginLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
107  virtual void doEndLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
108 
109  virtual void doBeginRunProduce_(Run& rp, EventSetup const& c);
110  virtual void doEndRunProduce_(Run& rp, EventSetup const& c);
111  virtual void doBeginLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
112  virtual void doEndLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c);
113 
115 
118  }
120  std::vector<BranchID> previousParentage_;
122 
125  };
126 
127  }
128 }
129 
130 
131 #endif
void doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
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 registerProducts(ProducerBase *, ProductRegistry *, ModuleDescription const &)
Definition: ProducerBase.cc:60
virtual void postForkReacquireResources(unsigned int, unsigned int)
ModuleDescription const & moduleDescription() const
ParentageID previousParentageId_
void doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
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 doRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
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)
SharedResourcesAcquirer resourcesAcquirer_
EDProducerBase ModuleType
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
virtual void preForkReleaseResources()
void doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
void setModuleDescription(ModuleDescription const &md)
void doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
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:43