CMS 3D CMS Logo

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
23 
24 
27 
29 
32 
33 
34 //
35 // constants, enums and typedefs
36 //
37 namespace edm {
38  namespace global {
39  //
40  // static data member definitions
41  //
42 
43  //
44  // constructors and destructor
45  //
47  moduleDescription_() { }
48 
50  {
51  }
52 
53  bool
55  ActivityRegistry* act,
56  ModuleCallingContext const* mcc) {
57  Event e(ep, moduleDescription_, mcc);
58  e.setConsumer(this);
59  EventSignalsSentry sentry(act,mcc);
60  this->analyze(e.streamID(), e, c);
61  return true;
62  }
63 
64  void
66  preallocStreams(iPrealloc.numberOfStreams());
68  preallocate(iPrealloc);
69  }
70 
71  void
73  this->beginJob();
74  }
75 
76  void
78  this->endJob();
79  }
80 
81  void
83  ModuleCallingContext const* mcc) {
84 
85  Run r(rp, moduleDescription_, mcc, false);
86  r.setConsumer(this);
87  Run const& cnstR = r;
88  this->doBeginRun_(cnstR, c);
89  this->doBeginRunSummary_(cnstR, c);
90  }
91 
92  void
94  ModuleCallingContext const* mcc) {
95  Run r(rp, moduleDescription_, mcc, true);
96  r.setConsumer(this);
97  Run const& cnstR = r;
98  this->doEndRunSummary_(r,c);
99  this->doEndRun_(cnstR, c);
100  }
101 
102  void
104  ModuleCallingContext const* mcc) {
105  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
106  lb.setConsumer(this);
107  LuminosityBlock const& cnstLb = lb;
108  this->doBeginLuminosityBlock_(cnstLb, c);
109  this->doBeginLuminosityBlockSummary_(cnstLb, c);
110  }
111 
112  void
114  ModuleCallingContext const* mcc) {
115  LuminosityBlock lb(lbp, moduleDescription_, mcc, true);
116  lb.setConsumer(this);
117  LuminosityBlock const& cnstLb = lb;
118  this->doEndLuminosityBlockSummary_(cnstLb,c);
119  this->doEndLuminosityBlock_(cnstLb, c);
120  }
121 
122  void
124  doBeginStream_(id);
125  }
126  void
128  doEndStream_(id);
129  }
130  void
132  RunPrincipal const& rp,
133  EventSetup const& c,
134  ModuleCallingContext const* mcc)
135  {
136  Run r(rp, moduleDescription_, mcc, false);
137  r.setConsumer(this);
138  this->doStreamBeginRun_(id, r, c);
139  }
140  void
142  RunPrincipal const& rp,
143  EventSetup const& c,
144  ModuleCallingContext const* mcc) {
145  Run r(rp, moduleDescription_, mcc, true);
146  r.setConsumer(this);
147  this->doStreamEndRun_(id, r, c);
148  this->doStreamEndRunSummary_(id, r, c);
149  }
150  void
152  LuminosityBlockPrincipal const& lbp,
153  EventSetup const& c,
154  ModuleCallingContext const* mcc) {
155  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
156  lb.setConsumer(this);
157  this->doStreamBeginLuminosityBlock_(id,lb, c);
158  }
159 
160  void
162  LuminosityBlockPrincipal const& lbp,
163  EventSetup const& c,
164  ModuleCallingContext const* mcc) {
165  LuminosityBlock lb(lbp, moduleDescription_, mcc, true);
166  lb.setConsumer(this);
167  this->doStreamEndLuminosityBlock_(id,lb, c);
168  this->doStreamEndLuminosityBlockSummary_(id,lb, c);
169  }
170 
171 
172 
173  void
175  //respondToOpenInputFile(fb);
176  }
177 
178  void
180  //respondToCloseInputFile(fb);
181  }
182 
183  void EDAnalyzerBase::preallocStreams(unsigned int) {}
184  void EDAnalyzerBase::preallocLumis(unsigned int) {}
189  void EDAnalyzerBase::doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) {}
194 
195 
196  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
197  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
200 
205 
206  void
209  desc.setUnknown();
210  descriptions.addDefault(desc);
211  }
212 
213  void
215  edmodule_mightGet_config(iConfig);
216  }
217 
218  void
220 
222 
224 
226  regService->watchProductAdditions(callWhenNewProductsRegistered_);
227  }
228  }
229  static const std::string kBaseType("EDAnalyzer");
230 
231  const std::string&
233  return kBaseType;
234  }
235 
236  }
237 }
static const std::string kBaseType("EDAnalyzer")
virtual void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c)
void setConsumer(EDConsumerBase const *iConsumer)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lb, EventSetup const &c)
void doStreamEndLuminosityBlock(StreamID id, LuminosityBlockPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
void doRespondToCloseInputFile(FileBlock const &fb)
static const std::string & baseType()
virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c)
virtual void doBeginRunSummary_(Run const &rp, EventSetup const &c)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:42
virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const &rp, EventSetup const &c)
virtual void preallocLumis(unsigned int)
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)
void doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, 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)
void doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
ModuleDescription moduleDescription_
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
virtual void preallocate(PreallocationConfiguration const &)
void doStreamBeginRun(StreamID id, RunPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
void registerProductsAndCallbacks(EDAnalyzerBase *module, ProductRegistry *reg)
virtual void doEndRunSummary_(Run const &rp, EventSetup const &c)
void callForEachBranch(T const &iFunc)
void doEndStream(StreamID id)
void doStreamBeginLuminosityBlock(StreamID id, LuminosityBlockPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
void doPreallocate(PreallocationConfiguration const &)
void doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
void doBeginRun(RunPrincipal const &rp, 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)
HLT enums.
void doRespondToOpenInputFile(FileBlock const &fb)
StreamID streamID() const
Definition: Event.h:96
void doStreamEndRun(StreamID id, RunPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
void doBeginStream(StreamID id)
virtual void analyze(StreamID, Event const &, EventSetup const &) const =0
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:51
virtual void doBeginStream_(StreamID id)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: Run.h:44