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  }
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) {}
186  void EDAnalyzerBase::doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) {}
191 
192 
193  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
194  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
197 
202 
203  void
206  desc.setUnknown();
207  descriptions.addDefault(desc);
208  }
209 
210  void
212  edmodule_mightGet_config(iConfig);
213  }
214 
215  void
217 
219 
221 
223  regService->watchProductAdditions(callWhenNewProductsRegistered_);
224  }
225  }
226  static const std::string kBaseType("EDAnalyzer");
227 
228  const std::string&
230  return kBaseType;
231  }
232 
233  }
234 }
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 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:86
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 *)