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  bool
51  ActivityRegistry* act,
52  ModuleCallingContext const* mcc) {
53  Event e(ep, moduleDescription_, mcc);
54  e.setConsumer(this);
55  {
56  std::lock_guard<std::mutex> guard(mutex_);
57  std::lock_guard<SharedResourcesAcquirer> guardResources(resourcesAcquirer_);
58  EventSignalsSentry sentry(act,mcc);
59  this->analyze(e, c);
60  }
61  return true;
62  }
63 
65  return SharedResourcesAcquirer{};
66  }
67 
68  void
71 
72  this->beginJob();
73  }
74 
75  void
77  this->endJob();
78  }
79 
80  void
82  ModuleCallingContext const* mcc) {
83  Run r(rp, moduleDescription_, mcc);
84  r.setConsumer(this);
85  Run const& cnstR = r;
86  this->doBeginRun_(cnstR, c);
87  }
88 
89  void
91  ModuleCallingContext const* mcc) {
92  Run r(rp, moduleDescription_, mcc);
93  r.setConsumer(this);
94  Run const& cnstR = r;
95  this->doEndRun_(cnstR, c);
96  }
97 
98  void
100  ModuleCallingContext const* mcc) {
101  LuminosityBlock lb(lbp, moduleDescription_, mcc);
102  lb.setConsumer(this);
103  LuminosityBlock const& cnstLb = lb;
104  this->doBeginLuminosityBlock_(cnstLb, c);
105  }
106 
107  void
109  ModuleCallingContext const* mcc) {
110  LuminosityBlock lb(lbp, moduleDescription_, mcc);
111  lb.setConsumer(this);
112  LuminosityBlock const& cnstLb = lb;
113  this->doEndLuminosityBlock_(cnstLb, c);
114  }
115 
116  void
118  //respondToOpenInputFile(fb);
119  }
120 
121  void
123  //respondToCloseInputFile(fb);
124  }
125 
126  void
129  }
130 
131  void
132  EDAnalyzerBase::doPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren) {
133  postForkReacquireResources(iChildIndex, iNumberOfChildren);
134  }
135 
136  void EDAnalyzerBase::doBeginRun_(Run const& rp, EventSetup const& c) {}
137  void EDAnalyzerBase::doEndRun_(Run const& rp, EventSetup const& c) {}
140 
141  void
144  desc.setUnknown();
145  descriptions.addDefault(desc);
146  }
147 
148  void
150  edmodule_mightGet_config(iConfig);
151  }
152 
153  static const std::string kBaseType("EDAnalyzer");
154 
155  const std::string&
157  return kBaseType;
158  }
159 
160  void
162 
164 
166 
168  regService->watchProductAdditions(callWhenNewProductsRegistered_);
169  }
170  }
171 
172  }
173 }
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_
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
bool doEvent(EventPrincipal &ep, EventSetup const &c, ActivityRegistry *, ModuleCallingContext const *)
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