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 //
12 
13 // system include files
14 
15 // user include files
21 
24 
25 
26 //
27 // constants, enums and typedefs
28 //
29 namespace edm {
30 
31  namespace one {
32  //
33  // static data member definitions
34  //
35 
36  //
37  // constructors and destructor
38  //
40  ProducerBase(),
41  moduleDescription_(),
42  previousParentage_(),
43  previousParentageId_() { }
44 
46  {
47  }
48 
49  bool
51  ModuleCallingContext const* mcc) {
52  Event e(ep, moduleDescription_, mcc);
53  e.setConsumer(this);
54  this->produce(e, c);
56  return true;
57  }
58 
59  void
61  this->beginJob();
62  }
63 
64  void
66  this->endJob();
67  }
68 
69  void
71  ModuleCallingContext const* mcc) {
72  Run r(rp, moduleDescription_, mcc);
73  r.setConsumer(this);
74  Run const& cnstR = r;
75  this->doBeginRun_(cnstR, c);
76  this->doBeginRunProduce_(r,c);
77  commit_(r);
78  }
79 
80  void
82  ModuleCallingContext const* mcc) {
83  Run r(rp, moduleDescription_, mcc);
84  r.setConsumer(this);
85  Run const& cnstR = r;
86  this->doEndRun_(cnstR, c);
87  this->doEndRunProduce_(r, c);
88  commit_(r);
89  }
90 
91  void
93  ModuleCallingContext const* mcc) {
94  LuminosityBlock lb(lbp, moduleDescription_, mcc);
95  lb.setConsumer(this);
96  LuminosityBlock const& cnstLb = lb;
97  this->doBeginLuminosityBlock_(cnstLb, c);
98  this->doBeginLuminosityBlockProduce_(lb, c);
99  commit_(lb);
100  }
101 
102  void
104  ModuleCallingContext const* mcc) {
105  LuminosityBlock lb(lbp, moduleDescription_, mcc);
106  lb.setConsumer(this);
107  LuminosityBlock const& cnstLb = lb;
108  this->doEndLuminosityBlock_(cnstLb, c);
109  this->doEndLuminosityBlockProduce_(lb, c);
110  commit_(lb);
111  }
112 
113  void
115  //respondToOpenInputFile(fb);
116  }
117 
118  void
120  //respondToCloseInputFile(fb);
121  }
122 
123  void
125  //preForkReleaseResources();
126  }
127 
128  void
129  EDProducerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
130  //postForkReacquireResources(iChildIndex, iNumberOfChildren);
131  }
132 
133  void EDProducerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
134  void EDProducerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
137 
142 
143  void
146  desc.setUnknown();
147  descriptions.addDefault(desc);
148  }
149 
150  void
152  edmodule_mightGet_config(iConfig);
153  }
154 
155  static const std::string kBaseType("EDProducer");
156 
157  const std::string&
159  return kBaseType;
160  }
161 
162  }
163 }
static const std::string kBaseType("EDAnalyzer")
static void fillDescriptions(ConfigurationDescriptions &descriptions)
void setConsumer(EDConsumerBase const *iConsumer)
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 setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:40
void doBeginRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
ParentageID previousParentageId_
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
void addDefault(ParameterSetDescription const &psetDescription)
virtual void doEndLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void doRespondToCloseInputFile(FileBlock const &fb)
void doRespondToOpenInputFile(FileBlock const &fb)
virtual void doEndRun_(Run const &rp, EventSetup const &c)
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlockProduce_(LuminosityBlock &lbp, EventSetup const &c)
void doEndRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
void doBeginLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
static void prevalidate(ConfigurationDescriptions &descriptions)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:65
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:48
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
virtual void produce(Event &, EventSetup const &)=0
Definition: Run.h:41