CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  }
68 
69  void
71  this->beginJob();
72  }
73 
74  void
76  this->endJob();
77  }
78 
79  void
81  ModuleCallingContext const* mcc) {
82 
83  Run r(rp, moduleDescription_, mcc);
84  r.setConsumer(this);
85  Run const& cnstR = r;
86  this->doBeginRun_(cnstR, c);
87  this->doBeginRunSummary_(cnstR, c);
88  }
89 
90  void
92  ModuleCallingContext const* mcc) {
93  Run r(rp, moduleDescription_, mcc);
94  r.setConsumer(this);
95  Run const& cnstR = r;
96  this->doEndRunSummary_(r,c);
97  this->doEndRun_(cnstR, c);
98  }
99 
100  void
102  ModuleCallingContext const* mcc) {
103  LuminosityBlock lb(lbp, moduleDescription_, mcc);
104  lb.setConsumer(this);
105  LuminosityBlock const& cnstLb = lb;
106  this->doBeginLuminosityBlock_(cnstLb, c);
107  this->doBeginLuminosityBlockSummary_(cnstLb, c);
108  }
109 
110  void
112  ModuleCallingContext const* mcc) {
113  LuminosityBlock lb(lbp, moduleDescription_, mcc);
114  lb.setConsumer(this);
115  LuminosityBlock const& cnstLb = lb;
116  this->doEndLuminosityBlockSummary_(cnstLb,c);
117  this->doEndLuminosityBlock_(cnstLb, c);
118  }
119 
120  void
122  doBeginStream_(id);
123  }
124  void
126  doEndStream_(id);
127  }
128  void
130  RunPrincipal& rp,
131  EventSetup const& c,
132  ModuleCallingContext const* mcc)
133  {
134  Run r(rp, moduleDescription_, mcc);
135  r.setConsumer(this);
136  this->doStreamBeginRun_(id, r, c);
137  }
138  void
140  RunPrincipal& rp,
141  EventSetup const& c,
142  ModuleCallingContext const* mcc) {
143  Run r(rp, moduleDescription_, mcc);
144  r.setConsumer(this);
145  this->doStreamEndRun_(id, r, c);
146  this->doStreamEndRunSummary_(id, r, c);
147  }
148  void
151  EventSetup const& c,
152  ModuleCallingContext const* mcc) {
153  LuminosityBlock lb(lbp, moduleDescription_, mcc);
154  lb.setConsumer(this);
155  this->doStreamBeginLuminosityBlock_(id,lb, c);
156  }
157 
158  void
161  EventSetup const& c,
162  ModuleCallingContext const* mcc) {
163  LuminosityBlock lb(lbp, moduleDescription_, mcc);
164  lb.setConsumer(this);
165  this->doStreamEndLuminosityBlock_(id,lb, c);
166  this->doStreamEndLuminosityBlockSummary_(id,lb, c);
167  }
168 
169 
170 
171  void
173  //respondToOpenInputFile(fb);
174  }
175 
176  void
178  //respondToCloseInputFile(fb);
179  }
180 
181  void
184  }
185 
186  void
187  EDAnalyzerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
188  postForkReacquireResources(iChildIndex, iNumberOfChildren);
189  }
190 
191  void EDAnalyzerBase::preallocStreams(unsigned int) {}
195  void EDAnalyzerBase::doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) {}
200 
201 
202  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
203  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
206 
211 
212  void
215  desc.setUnknown();
216  descriptions.addDefault(desc);
217  }
218 
219  void
221  edmodule_mightGet_config(iConfig);
222  }
223 
224  void
226 
228 
230 
232  regService->watchProductAdditions(callWhenNewProductsRegistered_);
233  }
234  }
235  static const std::string kBaseType("EDAnalyzer");
236 
237  const std::string&
239  return kBaseType;
240  }
241 
242  }
243 }
static const std::string kBaseType("EDAnalyzer")
void doStreamBeginLuminosityBlock(StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c)
void setConsumer(EDConsumerBase const *iConsumer)
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lb, EventSetup const &c)
virtual void analyze(StreamID, Event const &, EventSetup const &) const =0
void doRespondToCloseInputFile(FileBlock const &fb)
static const std::string & baseType()
void doStreamEndRun(StreamID id, RunPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c)
void doEndRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
virtual void doBeginRunSummary_(Run const &rp, EventSetup const &c)
void doStreamEndLuminosityBlock(StreamID id, LuminosityBlockPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:37
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 addDefault(ParameterSetDescription const &psetDescription)
virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
ModuleDescription moduleDescription_
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
void registerProductsAndCallbacks(EDAnalyzerBase *module, ProductRegistry *reg)
virtual void doEndRunSummary_(Run const &rp, EventSetup const &c)
void doBeginRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
void callForEachBranch(T const &iFunc)
bool doEvent(EventPrincipal &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
virtual void postForkReacquireResources(unsigned int, unsigned int)
void doEndStream(StreamID id)
void doPreallocate(PreallocationConfiguration const &)
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
void doStreamBeginRun(StreamID id, RunPrincipal &ep, 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)
void doRespondToOpenInputFile(FileBlock const &fb)
StreamID streamID() const
Definition: Event.h:79
void doBeginLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
void doBeginStream(StreamID id)
void doEndLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:50
virtual void preForkReleaseResources()
virtual void doBeginStream_(StreamID id)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: Run.h:43