CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDAnalyzerBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : global::EDAnalyzerBase
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
22 
23 
26 
28 
31 
32 
33 //
34 // constants, enums and typedefs
35 //
36 namespace edm {
37  namespace global {
38  //
39  // static data member definitions
40  //
41 
42  //
43  // constructors and destructor
44  //
46  moduleDescription_() { }
47 
49  {
50  }
51 
52  bool
54  ModuleCallingContext const* mcc) {
55  Event e(ep, moduleDescription_, mcc);
56  e.setConsumer(this);
57  this->analyze(e.streamID(), e, c);
58  return true;
59  }
60 
61  void
63  preallocStreams(iPrealloc.numberOfStreams());
64  }
65 
66  void
68  this->beginJob();
69  }
70 
71  void
73  this->endJob();
74  }
75 
76  void
78  ModuleCallingContext const* mcc) {
79 
80  Run r(rp, moduleDescription_, mcc);
81  r.setConsumer(this);
82  Run const& cnstR = r;
83  this->doBeginRun_(cnstR, c);
84  this->doBeginRunSummary_(cnstR, c);
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->doEndRunSummary_(r,c);
94  this->doEndRun_(cnstR, c);
95  }
96 
97  void
99  ModuleCallingContext const* mcc) {
100  LuminosityBlock lb(lbp, moduleDescription_, mcc);
101  lb.setConsumer(this);
102  LuminosityBlock const& cnstLb = lb;
103  this->doBeginLuminosityBlock_(cnstLb, c);
104  this->doBeginLuminosityBlockSummary_(cnstLb, c);
105  }
106 
107  void
109  ModuleCallingContext const* mcc) {
110  LuminosityBlock lb(lbp, moduleDescription_, mcc);
111  lb.setConsumer(this);
112  LuminosityBlock const& cnstLb = lb;
113  this->doEndLuminosityBlockSummary_(cnstLb,c);
114  this->doEndLuminosityBlock_(cnstLb, c);
115  }
116 
117  void
119  doBeginStream_(id);
120  }
121  void
123  doEndStream_(id);
124  }
125  void
127  RunPrincipal& rp,
128  EventSetup const& c,
129  ModuleCallingContext const* mcc)
130  {
131  Run r(rp, moduleDescription_, mcc);
132  r.setConsumer(this);
133  this->doStreamBeginRun_(id, r, c);
134  }
135  void
137  RunPrincipal& rp,
138  EventSetup const& c,
139  ModuleCallingContext const* mcc) {
140  Run r(rp, moduleDescription_, mcc);
141  r.setConsumer(this);
142  this->doStreamEndRun_(id, r, c);
143  this->doStreamEndRunSummary_(id, r, c);
144  }
145  void
148  EventSetup const& c,
149  ModuleCallingContext const* mcc) {
150  LuminosityBlock lb(lbp, moduleDescription_, mcc);
151  lb.setConsumer(this);
152  this->doStreamBeginLuminosityBlock_(id,lb, c);
153  }
154 
155  void
158  EventSetup const& c,
159  ModuleCallingContext const* mcc) {
160  LuminosityBlock lb(lbp, moduleDescription_, mcc);
161  lb.setConsumer(this);
162  this->doStreamEndLuminosityBlock_(id,lb, c);
163  this->doStreamEndLuminosityBlockSummary_(id,lb, c);
164  }
165 
166 
167 
168  void
170  //respondToOpenInputFile(fb);
171  }
172 
173  void
175  //respondToCloseInputFile(fb);
176  }
177 
178  void
180  //preForkReleaseResources();
181  }
182 
183  void
184  EDAnalyzerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
185  //postForkReacquireResources(iChildIndex, iNumberOfChildren);
186  }
187 
188  void EDAnalyzerBase::preallocStreams(unsigned int) {}
192  void EDAnalyzerBase::doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) {}
197 
198 
199  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
200  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
203 
208 
209  void
212  desc.setUnknown();
213  descriptions.addDefault(desc);
214  }
215 
216  void
218  edmodule_mightGet_config(iConfig);
219  }
220 
221  void
223 
225 
227 
229  regService->watchProductAdditions(callWhenNewProductsRegistered_);
230  }
231  }
232  static const std::string kBaseType("EDAnalyzer");
233 
234  const std::string&
236  return kBaseType;
237  }
238 
239  }
240 }
static const std::string kBaseType("EDAnalyzer")
void doStreamBeginLuminosityBlock(StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c)
void setConsumer(EDConsumerBase const *iConsumer)
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lb, EventSetup const &c)
virtual void analyze(StreamID, Event const &, EventSetup const &) const =0
void doRespondToCloseInputFile(FileBlock const &fb)
static const std::string & baseType()
void doStreamEndRun(StreamID id, RunPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c)
void doEndRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
virtual void doBeginRunSummary_(Run const &rp, EventSetup const &c)
void doStreamEndLuminosityBlock(StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:40
virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const &rp, EventSetup const &c)
virtual void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c)
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
virtual void doEndRun_(Run const &rp, EventSetup const &c)
bool doEvent(EventPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
void addDefault(ParameterSetDescription const &psetDescription)
virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
ModuleDescription moduleDescription_
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
void registerProductsAndCallbacks(EDAnalyzerBase *module, ProductRegistry *reg)
virtual void doEndRunSummary_(Run const &rp, EventSetup const &c)
void doBeginRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
void callForEachBranch(T const &iFunc)
void doEndStream(StreamID id)
void doPreallocate(PreallocationConfiguration const &)
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
void doStreamBeginRun(StreamID id, RunPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doEndStream_(StreamID id)
static void prevalidate(ConfigurationDescriptions &descriptions)
virtual void preallocStreams(unsigned int)
void doRespondToOpenInputFile(FileBlock const &fb)
StreamID streamID() const
Definition: Event.h:75
void doBeginLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
void doBeginStream(StreamID id)
void doEndLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:48
virtual void doBeginStream_(StreamID id)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: Run.h:41