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 : 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);
60  {
61  std::lock_guard<std::mutex> guard(mutex_);
62  std::lock_guard<SharedResourcesAcquirer> guardResources(resourcesAcquirer_);
64  EventSignalsSentry sentry(act,mcc);
65  this->analyze(e, c);
66  }
67  return true;
68  }
69 
71  return SharedResourcesAcquirer{};
72  }
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);
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);
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);
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);
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
135  }
136 
137  void
138  EDAnalyzerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
139  postForkReacquireResources(iChildIndex, iNumberOfChildren);
140  }
141 
142  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
143  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
146 
147  void
150  desc.setUnknown();
151  descriptions.addDefault(desc);
152  }
153 
154  void
156  edmodule_mightGet_config(iConfig);
157  }
158 
159  static const std::string kBaseType("EDAnalyzer");
160 
161  const std::string&
163  return kBaseType;
164  }
165 
166  void
168 
170 
172 
174  regService->watchProductAdditions(callWhenNewProductsRegistered_);
175  }
176  }
177 
178  }
179 }
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:37
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_
helper::RootFunctionHelper< F, args >::root_function function(F &f)
Definition: rootFunction.h:14
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:43
virtual void preForkReleaseResources()
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:50
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
Definition: Run.h:43