CMS 3D CMS Logo

EDAnalyzerBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : one::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 
26 
29 
30 
31 //
32 // constants, enums and typedefs
33 //
34 namespace edm {
35  namespace one {
36  //
37  // static data member definitions
38  //
39 
40  //
41  // constructors and destructor
42  //
44  moduleDescription_() { }
45 
47  {
48  }
49 
50  void
53  }
54 
55  bool
57  ActivityRegistry* act,
58  ModuleCallingContext const* mcc) {
59  Event e(ep, moduleDescription_, mcc);
60  e.setConsumer(this);
62  EventSignalsSentry sentry(act,mcc);
63  this->analyze(e, c);
64  return true;
65  }
66 
69  std::vector<std::shared_ptr<SerialTaskQueue>>(1, std::make_shared<SerialTaskQueue>())};
70  }
71 
74 
75  void
78 
79  this->beginJob();
80  }
81 
82  void
84  this->endJob();
85  }
86 
87  void
90  }
91  void EDAnalyzerBase::preallocLumis(unsigned int) {};
92 
93  void
95  ModuleCallingContext const* mcc) {
96  Run r(rp, moduleDescription_, mcc, false);
97  r.setConsumer(this);
98  Run const& cnstR = r;
99  this->doBeginRun_(cnstR, c);
100  }
101 
102  void
104  ModuleCallingContext const* mcc) {
105  Run r(rp, moduleDescription_, mcc, true);
106  r.setConsumer(this);
107  Run const& cnstR = r;
108  this->doEndRun_(cnstR, c);
109  }
110 
111  void
113  ModuleCallingContext const* mcc) {
114  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
115  lb.setConsumer(this);
116  LuminosityBlock const& cnstLb = lb;
117  this->doBeginLuminosityBlock_(cnstLb, c);
118  }
119 
120  void
122  ModuleCallingContext const* mcc) {
123  LuminosityBlock lb(lbp, moduleDescription_, mcc, true);
124  lb.setConsumer(this);
125  LuminosityBlock const& cnstLb = lb;
126  this->doEndLuminosityBlock_(cnstLb, c);
127  }
128 
129  void
131  //respondToOpenInputFile(fb);
132  }
133 
134  void
136  //respondToCloseInputFile(fb);
137  }
138 
139  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
140  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
143 
144  void
147  desc.setUnknown();
148  descriptions.addDefault(desc);
149  }
150 
151  void
153  edmodule_mightGet_config(iConfig);
154  }
155 
156  static const std::string kBaseType("EDAnalyzer");
157 
158  const std::string&
160  return kBaseType;
161  }
162 
163  void
165 
167 
169 
171  regService->watchProductAdditions(callWhenNewProductsRegistered_);
172  }
173  }
174 
175  }
176 }
static const std::string kBaseType("EDAnalyzer")
void doRespondToCloseInputFile(FileBlock const &fb)
virtual SerialTaskQueue * globalLuminosityBlocksQueue()
void setConsumer(EDConsumerBase const *iConsumer)
void doEndRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
bool doEvent(EventPrincipal const &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
static const std::string & baseType()
virtual void preallocLumis(unsigned int)
static void prevalidate(ConfigurationDescriptions &descriptions)
void doPreallocate(PreallocationConfiguration const &)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:42
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void doEndRun_(Run const &rp, EventSetup const &c)
virtual void doEndLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual SharedResourcesAcquirer createAcquirer()
virtual void analyze(Event const &, EventSetup const &)=0
void addDefault(ParameterSetDescription const &psetDescription)
void registerProductsAndCallbacks(EDAnalyzerBase const *module, ProductRegistry *reg)
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
void doBeginRun(RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *)
SharedResourcesAcquirer resourcesAcquirer_
void doBeginLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
void callForEachBranch(T const &iFunc)
ModuleDescription moduleDescription_
virtual SerialTaskQueue * globalRunsQueue()
void doRespondToOpenInputFile(FileBlock const &fb)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
void doEndLuminosityBlock(LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *)
void setSharedResourcesAcquirer(SharedResourcesAcquirer *iResourceAcquirer)
Definition: Event.cc:49
HLT enums.
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:51
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
Definition: Run.h:44