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_);
63  EventSignalsSentry sentry(act,mcc);
64  this->analyze(e, c);
65  }
66  return true;
67  }
68 
70  return SharedResourcesAcquirer{};
71  }
72 
73  void
76 
77  this->beginJob();
78  }
79 
80  void
82  this->endJob();
83  }
84 
85  void
87  ModuleCallingContext const* mcc) {
88  Run r(rp, moduleDescription_, mcc);
89  r.setConsumer(this);
90  Run const& cnstR = r;
91  this->doBeginRun_(cnstR, c);
92  }
93 
94  void
96  ModuleCallingContext const* mcc) {
97  Run r(rp, moduleDescription_, mcc);
98  r.setConsumer(this);
99  Run const& cnstR = r;
100  this->doEndRun_(cnstR, c);
101  }
102 
103  void
105  ModuleCallingContext const* mcc) {
106  LuminosityBlock lb(lbp, moduleDescription_, mcc);
107  lb.setConsumer(this);
108  LuminosityBlock const& cnstLb = lb;
109  this->doBeginLuminosityBlock_(cnstLb, c);
110  }
111 
112  void
114  ModuleCallingContext const* mcc) {
115  LuminosityBlock lb(lbp, moduleDescription_, mcc);
116  lb.setConsumer(this);
117  LuminosityBlock const& cnstLb = lb;
118  this->doEndLuminosityBlock_(cnstLb, c);
119  }
120 
121  void
123  //respondToOpenInputFile(fb);
124  }
125 
126  void
128  //respondToCloseInputFile(fb);
129  }
130 
131  void
134  }
135 
136  void
137  EDAnalyzerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
138  postForkReacquireResources(iChildIndex, iNumberOfChildren);
139  }
140 
141  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
142  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
145 
146  void
149  desc.setUnknown();
150  descriptions.addDefault(desc);
151  }
152 
153  void
155  edmodule_mightGet_config(iConfig);
156  }
157 
158  static const std::string kBaseType("EDAnalyzer");
159 
160  const std::string&
162  return kBaseType;
163  }
164 
165  void
167 
169 
171 
173  regService->watchProductAdditions(callWhenNewProductsRegistered_);
174  }
175  }
176 
177  }
178 }
static const std::string kBaseType("EDAnalyzer")
void doRespondToCloseInputFile(FileBlock const &fb)
void setConsumer(EDConsumerBase const *iConsumer)
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)
void doEndLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
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)
bool doEvent(EventPrincipal &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
SharedResourcesAcquirer resourcesAcquirer_
void callForEachBranch(T const &iFunc)
ModuleDescription moduleDescription_
void doBeginRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
void doRespondToOpenInputFile(FileBlock const &fb)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
void doBeginLuminosityBlock(LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
virtual void preForkReleaseResources()
void doEndRun(RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
void setConsumer(EDConsumerBase const *iConsumer)
Definition: Run.h:48
void doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
Definition: Run.h:41