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
22 
25 
28 
29 
30 //
31 // constants, enums and typedefs
32 //
33 namespace edm {
34  namespace one {
35  //
36  // static data member definitions
37  //
38 
39  //
40  // constructors and destructor
41  //
43  moduleDescription_() { }
44 
46  {
47  }
48 
49  void
52  }
53 
54  bool
56  ActivityRegistry* act,
57  ModuleCallingContext const* mcc) {
58  Event e(ep, moduleDescription_, mcc);
59  e.setConsumer(this);
61  EventSignalsSentry sentry(act,mcc);
62  this->analyze(e, c);
63  return true;
64  }
65 
68  std::vector<std::shared_ptr<SerialTaskQueue>>(1, std::make_shared<SerialTaskQueue>())};
69  }
70 
71  void
74 
75  this->beginJob();
76  }
77 
78  void
80  this->endJob();
81  }
82 
83  void
85  ModuleCallingContext const* mcc) {
86  Run r(rp, moduleDescription_, mcc);
87  r.setConsumer(this);
88  Run const& cnstR = r;
89  this->doBeginRun_(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->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  }
109 
110  void
112  ModuleCallingContext const* mcc) {
113  LuminosityBlock lb(lbp, moduleDescription_, mcc);
114  lb.setConsumer(this);
115  LuminosityBlock const& cnstLb = lb;
116  this->doEndLuminosityBlock_(cnstLb, c);
117  }
118 
119  void
121  //respondToOpenInputFile(fb);
122  }
123 
124  void
126  //respondToCloseInputFile(fb);
127  }
128 
129  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
130  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
133 
134  void
137  desc.setUnknown();
138  descriptions.addDefault(desc);
139  }
140 
141  void
143  edmodule_mightGet_config(iConfig);
144  }
145 
146  static const std::string kBaseType("EDAnalyzer");
147 
148  const std::string&
150  return kBaseType;
151  }
152 
153  void
155 
157 
159 
161  regService->watchProductAdditions(callWhenNewProductsRegistered_);
162  }
163  }
164 
165  }
166 }
static const std::string kBaseType("EDAnalyzer")
void doRespondToCloseInputFile(FileBlock const &fb)
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()
static void prevalidate(ConfigurationDescriptions &descriptions)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Event.cc:38
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_
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:44
HLT enums.
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:49
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
Definition: Run.h:42