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());
67  preallocate(iPrealloc);
68  }
69 
70  void
72  this->beginJob();
73  }
74 
75  void
77  this->endJob();
78  }
79 
80  void
82  ModuleCallingContext const* mcc) {
83 
84  Run r(rp, moduleDescription_, mcc);
85  r.setConsumer(this);
86  Run const& cnstR = r;
87  this->doBeginRun_(cnstR, c);
88  this->doBeginRunSummary_(cnstR, c);
89  }
90 
91  void
93  ModuleCallingContext const* mcc) {
94  Run r(rp, moduleDescription_, mcc);
95  r.setConsumer(this);
96  Run const& cnstR = r;
97  this->doEndRunSummary_(r,c);
98  this->doEndRun_(cnstR, c);
99  }
100 
101  void
103  ModuleCallingContext const* mcc) {
104  LuminosityBlock lb(lbp, moduleDescription_, mcc);
105  lb.setConsumer(this);
106  LuminosityBlock const& cnstLb = lb;
107  this->doBeginLuminosityBlock_(cnstLb, c);
108  this->doBeginLuminosityBlockSummary_(cnstLb, c);
109  }
110 
111  void
113  ModuleCallingContext const* mcc) {
114  LuminosityBlock lb(lbp, moduleDescription_, mcc);
115  lb.setConsumer(this);
116  LuminosityBlock const& cnstLb = lb;
117  this->doEndLuminosityBlockSummary_(cnstLb,c);
118  this->doEndLuminosityBlock_(cnstLb, c);
119  }
120 
121  void
123  doBeginStream_(id);
124  }
125  void
127  doEndStream_(id);
128  }
129  void
131  RunPrincipal const& rp,
132  EventSetup const& c,
133  ModuleCallingContext const* mcc)
134  {
135  Run r(rp, moduleDescription_, mcc);
136  r.setConsumer(this);
137  this->doStreamBeginRun_(id, r, c);
138  }
139  void
141  RunPrincipal const& rp,
142  EventSetup const& c,
143  ModuleCallingContext const* mcc) {
144  Run r(rp, moduleDescription_, mcc);
145  r.setConsumer(this);
146  this->doStreamEndRun_(id, r, c);
147  this->doStreamEndRunSummary_(id, r, c);
148  }
149  void
151  LuminosityBlockPrincipal const& lbp,
152  EventSetup const& c,
153  ModuleCallingContext const* mcc) {
154  LuminosityBlock lb(lbp, moduleDescription_, mcc);
155  lb.setConsumer(this);
156  this->doStreamBeginLuminosityBlock_(id,lb, c);
157  }
158 
159  void
161  LuminosityBlockPrincipal const& lbp,
162  EventSetup const& c,
163  ModuleCallingContext const* mcc) {
164  LuminosityBlock lb(lbp, moduleDescription_, mcc);
165  lb.setConsumer(this);
166  this->doStreamEndLuminosityBlock_(id,lb, c);
167  this->doStreamEndLuminosityBlockSummary_(id,lb, c);
168  }
169 
170 
171 
172  void
174  //respondToOpenInputFile(fb);
175  }
176 
177  void
179  //respondToCloseInputFile(fb);
180  }
181 
182  void EDAnalyzerBase::preallocStreams(unsigned int) {}
187  void EDAnalyzerBase::doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) {}
192 
193 
194  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
195  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
198 
203 
204  void
207  desc.setUnknown();
208  descriptions.addDefault(desc);
209  }
210 
211  void
213  edmodule_mightGet_config(iConfig);
214  }
215 
216  void
218 
220 
222 
224  regService->watchProductAdditions(callWhenNewProductsRegistered_);
225  }
226  }
227  static const std::string kBaseType("EDAnalyzer");
228 
229  const std::string&
231  return kBaseType;
232  }
233 
234  }
235 }
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 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:95
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:50
virtual void doBeginStream_(StreamID id)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: Run.h:43