CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDProducerBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : one::EDProducerBase
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Chris Jones
10 // Created: Thu, 02 May 2013 21:56:04 GMT
11 // $Id: EDProducerBase.cc,v 1.1 2013/05/17 14:49:45 chrjones Exp $
12 //
13 
14 // system include files
15 
16 // user include files
23 
26 
27 
28 //
29 // constants, enums and typedefs
30 //
31 namespace edm {
32  namespace one {
33  //
34  // static data member definitions
35  //
36 
37  //
38  // constructors and destructor
39  //
41  ProducerBase(),
42  moduleDescription_(),
43  current_context_(nullptr),
44  previousParentage_(),
45  previousParentageId_() { }
46 
48  {
49  }
50 
51  bool
53  CurrentProcessingContext const* cpc) {
56  e.setConsumer(this);
57  this->produce(e, c);
59  return true;
60  }
61 
62  void
64  this->beginJob();
65  }
66 
67  void
69  this->endJob();
70  }
71 
72  void
74  CurrentProcessingContext const* cpc) {
75 
78  r.setConsumer(this);
79  Run const& cnstR = r;
80  this->doBeginRun_(cnstR, c);
81  this->doBeginRunProduce_(r,c);
82  commit_(r);
83  }
84 
85  void
87  CurrentProcessingContext const* cpc) {
90  r.setConsumer(this);
91  Run const& cnstR = r;
92  this->doEndRun_(cnstR, c);
93  this->doEndRunProduce_(r, c);
94  commit_(r);
95  }
96 
97  void
99  CurrentProcessingContext const* cpc) {
100  detail::CPCSentry sentry(current_context_, cpc);
102  lb.setConsumer(this);
103  LuminosityBlock const& cnstLb = lb;
104  this->doBeginLuminosityBlock_(cnstLb, c);
105  this->doBeginLuminosityBlockProduce_(lb, c);
106  commit_(lb);
107  }
108 
109  void
111  CurrentProcessingContext const* cpc) {
112  detail::CPCSentry sentry(current_context_, cpc);
114  lb.setConsumer(this);
115  LuminosityBlock const& cnstLb = lb;
116  this->doEndLuminosityBlock_(cnstLb, c);
117  this->doEndLuminosityBlockProduce_(lb, c);
118  commit_(lb);
119  }
120 
121  void
123  //respondToOpenInputFile(fb);
124  }
125 
126  void
128  //respondToCloseInputFile(fb);
129  }
130 
131  void
133  //respondToOpenOutputFiles(fb);
134  }
135 
136  void
138  //respondToCloseOutputFiles(fb);
139  }
140 
141  void
143  //preForkReleaseResources();
144  }
145 
146  void
147  EDProducerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
148  //postForkReacquireResources(iChildIndex, iNumberOfChildren);
149  }
150 
151  void EDProducerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
152  void EDProducerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
155 
160 
163  return current_context_;
164  }
165 
166  void
169  desc.setUnknown();
170  descriptions.addDefault(desc);
171  }
172 
173  void
175  edmodule_mightGet_config(iConfig);
176  }
177 
178  static const std::string kBaseType("EDProducer");
179 
180  const std::string&
182  return kBaseType;
183  }
184 
185  }
186 }
void setConsumer(EDConsumerBase const *iConsumer)
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)
#define nullptr
virtual void doEndRunProduce_(Run &rp, EventSetup const &c)
void doRespondToCloseOutputFiles(FileBlock const &fb)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:32
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)
void addDefault(ParameterSetDescription const &psetDescription)
virtual void doBeginRunProduce_(Run &rp, EventSetup const &c)
static void prevalidate(ConfigurationDescriptions &descriptions)
void doRespondToCloseInputFile(FileBlock const &fb)
static const std::string kBaseType("EDFilter")
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
CurrentProcessingContext const * currentContext() const
virtual void doEndLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void doRespondToOpenOutputFiles(FileBlock const &fb)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:55
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
void doEndLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:42
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()