CMS 3D CMS Logo

EDAnalyzerBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : limited::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 limited {
39  //
40  // static data member definitions
41  //
42 
43  //
44  // constructors and destructor
45  //
47  moduleDescription_(),
48  queue_(pset.getUntrackedParameter<unsigned int>("concurrencyLimit")) { }
49 
51  {
52  }
53 
54  bool
56  ActivityRegistry* act,
57  ModuleCallingContext const* mcc) {
58  Event e(ep, moduleDescription_, mcc);
59  e.setConsumer(this);
60  EventSignalsSentry sentry(act,mcc);
61  this->analyze(e.streamID(), e, c);
62  return true;
63  }
64 
65  void
67  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);
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);
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);
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);
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);
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);
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);
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);
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) {}
188  void EDAnalyzerBase::doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) {}
193 
194 
195  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
196  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
199 
204 
205  void
208  desc.setUnknown();
209  descriptions.addDefault(desc);
210  }
211 
212  void
214  edmodule_mightGet_config(iConfig);
215  }
216 
217  void
219 
221 
223 
225  regService->watchProductAdditions(callWhenNewProductsRegistered_);
226  }
227  }
228  static const std::string kBaseType("EDAnalyzer");
229 
230  const std::string&
232  return kBaseType;
233  }
234 
235  }
236 }
void setConsumer(EDConsumerBase const *iConsumer)
virtual void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c)
virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const &rp, EventSetup const &c)
ModuleDescription moduleDescription_
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
virtual void preallocStreams(unsigned int)
virtual void doEndStream_(StreamID id)
void doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
void doStreamEndRun(StreamID id, RunPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
void doRespondToCloseInputFile(FileBlock const &fb)
void doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
void doStreamEndLuminosityBlock(StreamID id, LuminosityBlockPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:42
static void fillDescriptions(ConfigurationDescriptions &descriptions)
void doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
virtual void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c)
virtual void analyze(StreamID, Event const &, EventSetup const &) const =0
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginStream_(StreamID id)
void doRespondToOpenInputFile(FileBlock const &fb)
virtual void preallocate(PreallocationConfiguration const &)
virtual void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
void doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
virtual void doEndRunSummary_(Run const &rp, EventSetup const &c)
void addDefault(ParameterSetDescription const &psetDescription)
static const std::string kBaseType("EDAnalyzer")
virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
void registerProductsAndCallbacks(EDAnalyzerBase *module, ProductRegistry *reg)
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
void doStreamBeginLuminosityBlock(StreamID id, LuminosityBlockPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c)
virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
void callForEachBranch(T const &iFunc)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lb, EventSetup const &c)
static void prevalidate(ConfigurationDescriptions &descriptions)
virtual void doEndRun_(Run const &rp, EventSetup const &c)
EDAnalyzerBase(ParameterSet const &pset)
HLT enums.
StreamID streamID() const
Definition: Event.h:95
void doStreamBeginRun(StreamID id, RunPrincipal const &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doBeginRunSummary_(Run const &rp, EventSetup const &c)
void doBeginStream(StreamID id)
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
virtual void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:50
void doPreallocate(PreallocationConfiguration const &)
static const std::string & baseType()
Definition: Run.h:43
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)