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 
73 
74  void
77 
78  this->beginJob();
79  }
80 
81  void
83  this->endJob();
84  }
85 
86  void
88  ModuleCallingContext const* mcc) {
89  Run r(rp, moduleDescription_, mcc, false);
90  r.setConsumer(this);
91  Run const& cnstR = r;
92  this->doBeginRun_(cnstR, c);
93  }
94 
95  void
97  ModuleCallingContext const* mcc) {
98  Run r(rp, moduleDescription_, mcc, true);
99  r.setConsumer(this);
100  Run const& cnstR = r;
101  this->doEndRun_(cnstR, c);
102  }
103 
104  void
106  ModuleCallingContext const* mcc) {
107  LuminosityBlock lb(lbp, moduleDescription_, mcc, false);
108  lb.setConsumer(this);
109  LuminosityBlock const& cnstLb = lb;
110  this->doBeginLuminosityBlock_(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->doEndLuminosityBlock_(cnstLb, c);
120  }
121 
122  void
124  //respondToOpenInputFile(fb);
125  }
126 
127  void
129  //respondToCloseInputFile(fb);
130  }
131 
132  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
133  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
136 
137  void
140  desc.setUnknown();
141  descriptions.addDefault(desc);
142  }
143 
144  void
146  edmodule_mightGet_config(iConfig);
147  }
148 
149  static const std::string kBaseType("EDAnalyzer");
150 
151  const std::string&
153  return kBaseType;
154  }
155 
156  void
158 
160 
162 
164  regService->watchProductAdditions(callWhenNewProductsRegistered_);
165  }
166  }
167 
168  }
169 }
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()
static void prevalidate(ConfigurationDescriptions &descriptions)
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