CMS 3D CMS Logo

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
23 
26 
27 
28 //
29 // constants, enums and typedefs
30 //
31 namespace edm {
32 
33  namespace one {
34  //
35  // static data member definitions
36  //
37 
38  //
39  // constructors and destructor
40  //
42  ProducerBase(),
43  moduleDescription_(),
44  previousParentage_(),
45  previousParentageId_() { }
46 
48  {
49  }
50 
51  bool
53  ActivityRegistry* act,
54  ModuleCallingContext const* mcc) {
55  Event e(ep, moduleDescription_, mcc);
56  e.setConsumer(this);
58  EventSignalsSentry sentry(act,mcc);
59  this->produce(e, c);
61  return true;
62  }
63 
66  std::vector<std::shared_ptr<SerialTaskQueue>>(1, std::make_shared<SerialTaskQueue>())};
67  }
68 
69  void
72 
73  this->beginJob();
74  }
75 
76  void
78  this->endJob();
79  }
80 
81  void
83  auto const nThreads = iPrealloc.numberOfThreads();
84  preallocThreads(nThreads);
85  }
86 
87  void
89  ModuleCallingContext const* mcc) {
90  Run r(rp, moduleDescription_, mcc);
91  r.setConsumer(this);
92  Run const& cnstR = r;
93  this->doBeginRun_(cnstR, c);
94  this->doBeginRunProduce_(r,c);
95  commit_(r);
96  }
97 
98  void
100  ModuleCallingContext const* mcc) {
101  Run r(rp, moduleDescription_, mcc);
102  r.setConsumer(this);
103  Run const& cnstR = r;
104  this->doEndRun_(cnstR, c);
105  this->doEndRunProduce_(r, c);
106  commit_(r);
107  }
108 
109  void
111  ModuleCallingContext const* mcc) {
112  LuminosityBlock lb(lbp, moduleDescription_, mcc);
113  lb.setConsumer(this);
114  LuminosityBlock const& cnstLb = lb;
115  this->doBeginLuminosityBlock_(cnstLb, c);
116  this->doBeginLuminosityBlockProduce_(lb, c);
117  commit_(lb);
118  }
119 
120  void
122  ModuleCallingContext const* mcc) {
123  LuminosityBlock lb(lbp, moduleDescription_, mcc);
124  lb.setConsumer(this);
125  LuminosityBlock const& cnstLb = lb;
126  this->doEndLuminosityBlock_(cnstLb, c);
127  this->doEndLuminosityBlockProduce_(lb, c);
128  commit_(lb);
129  }
130 
131  void
133  //respondToOpenInputFile(fb);
134  }
135 
136  void
138  //respondToCloseInputFile(fb);
139  }
140 
141  void EDProducerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
142  void EDProducerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
145 
150 
151  void
154  desc.setUnknown();
155  descriptions.addDefault(desc);
156  }
157 
158  void
160  edmodule_mightGet_config(iConfig);
161  }
162 
163  static const std::string kBaseType("EDProducer");
164 
165  const std::string&
167  return kBaseType;
168  }
169 
170  }
171 }
static const std::string kBaseType("EDAnalyzer")
void doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
void setConsumer(EDConsumerBase const *iConsumer)
static const std::string & baseType()
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 setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:38
ParentageID previousParentageId_
void doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
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)
SharedResourcesAcquirer resourcesAcquirer_
void doPreallocate(PreallocationConfiguration const &)
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
virtual void preallocThreads(unsigned int)
void setSharedResourcesAcquirer(SharedResourcesAcquirer *iResourceAcquirer)
Definition: Event.cc:44
HLT enums.
void doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
void doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
static void prevalidate(ConfigurationDescriptions &descriptions)
void commit_(P &iPrincipal)
Definition: ProducerBase.h:92
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
virtual SharedResourcesAcquirer createAcquirer()
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:49
std::vector< BranchID > previousParentage_
ModuleDescription moduleDescription_
virtual void produce(Event &, EventSetup const &)=0
Definition: Run.h:42