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());
69  preallocate(iPrealloc);
70  }
71 
72  void
74  this->beginJob();
75  }
76 
77  void
79  this->endJob();
80  }
81 
82  void
84  ModuleCallingContext const* mcc) {
85 
86  Run r(rp, moduleDescription_, mcc, false);
87  r.setConsumer(this);
88  Run const& cnstR = r;
89  this->doBeginRun_(cnstR, c);
90  this->doBeginRunSummary_(cnstR, c);
91  }
92 
93  void
95  ModuleCallingContext const* mcc) {
96  Run r(rp, moduleDescription_, mcc, true);
97  r.setConsumer(this);
98  Run const& cnstR = r;
99  this->doEndRunSummary_(r,c);
100  this->doEndRun_(cnstR, c);
101  }
102 
103  void
105  ModuleCallingContext const* mcc) {
106  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
107  lb.setConsumer(this);
108  LuminosityBlock const& cnstLb = lb;
109  this->doBeginLuminosityBlock_(cnstLb, c);
110  this->doBeginLuminosityBlockSummary_(cnstLb, c);
111  }
112 
113  void
115  ModuleCallingContext const* mcc) {
116  LuminosityBlock lb(lbp, moduleDescription_, mcc, true);
117  lb.setConsumer(this);
118  LuminosityBlock const& cnstLb = lb;
119  this->doEndLuminosityBlockSummary_(cnstLb,c);
120  this->doEndLuminosityBlock_(cnstLb, c);
121  }
122 
123  void
125  doBeginStream_(id);
126  }
127  void
129  doEndStream_(id);
130  }
131  void
133  RunPrincipal const& rp,
134  EventSetup const& c,
135  ModuleCallingContext const* mcc)
136  {
137  Run r(rp, moduleDescription_, mcc, false);
138  r.setConsumer(this);
139  this->doStreamBeginRun_(id, r, c);
140  }
141  void
143  RunPrincipal const& rp,
144  EventSetup const& c,
145  ModuleCallingContext const* mcc) {
146  Run r(rp, moduleDescription_, mcc, true);
147  r.setConsumer(this);
148  this->doStreamEndRun_(id, r, c);
149  this->doStreamEndRunSummary_(id, r, c);
150  }
151  void
153  LuminosityBlockPrincipal const& lbp,
154  EventSetup const& c,
155  ModuleCallingContext const* mcc) {
156  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
157  lb.setConsumer(this);
158  this->doStreamBeginLuminosityBlock_(id,lb, c);
159  }
160 
161  void
163  LuminosityBlockPrincipal const& lbp,
164  EventSetup const& c,
165  ModuleCallingContext const* mcc) {
166  LuminosityBlock lb(lbp, moduleDescription_, mcc, true);
167  lb.setConsumer(this);
168  this->doStreamEndLuminosityBlock_(id,lb, c);
169  this->doStreamEndLuminosityBlockSummary_(id,lb, c);
170  }
171 
172 
173 
174  void
176  //respondToOpenInputFile(fb);
177  }
178 
179  void
181  //respondToCloseInputFile(fb);
182  }
183 
184  void EDAnalyzerBase::preallocStreams(unsigned int) {}
185  void EDAnalyzerBase::preallocLumis(unsigned int) {}
190  void EDAnalyzerBase::doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) {}
195 
196 
197  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
198  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
201 
206 
207  void
210  desc.setUnknown();
211  descriptions.addDefault(desc);
212  }
213 
214  void
216  edmodule_mightGet_config(iConfig);
217  }
218 
219  void
221 
223 
225 
227  regService->watchProductAdditions(callWhenNewProductsRegistered_);
228  }
229  }
230  static const std::string kBaseType("EDAnalyzer");
231 
232  const std::string&
234  return kBaseType;
235  }
236 
237  }
238 }
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:96
virtual void preallocLumis(unsigned int)
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:51
void doPreallocate(PreallocationConfiguration const &)
static const std::string & baseType()
Definition: Run.h:44
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)