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
132  }
133 
134  void
135  EDAnalyzerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
136  postForkReacquireResources(iChildIndex, iNumberOfChildren);
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)
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 postForkReacquireResources(unsigned int, unsigned int)
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
virtual void preForkReleaseResources()
HLT enums.
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:49
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
Definition: Run.h:42