CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EDAnalyzerBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_global_EDAnalyzerBase_h
2 #define FWCore_Framework_global_EDAnalyzerBase_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : EDAnalyzerBase
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Thu, 18 Jul 2013 11:51:14 GMT
19 //
20 
21 // system include files
22 
23 // user include files
29 
30 // forward declarations
31 
32 namespace edm {
33  class ModuleCallingContext;
34  class PreallocationConfiguration;
35  class StreamID;
36  class ActivityRegistry;
37  class ThinnedAssociationsHelper;
38 
39  namespace maker {
40  template <typename T>
41  class ModuleHolderT;
42  }
43 
44  namespace global {
45 
46  class EDAnalyzerBase : public EDConsumerBase {
47  public:
48  template <typename T>
49  friend class edm::WorkerT;
50  template <typename T>
53 
55  ~EDAnalyzerBase() override;
56 
57  static void fillDescriptions(ConfigurationDescriptions& descriptions);
58  static void prevalidate(ConfigurationDescriptions& descriptions);
59  static const std::string& baseType();
60 
61  // Warning: the returned moduleDescription will be invalid during construction
63 
64  virtual bool wantsProcessBlocks() const = 0;
65  virtual bool wantsInputProcessBlocks() const = 0;
66  virtual bool wantsGlobalRuns() const = 0;
67  virtual bool wantsGlobalLuminosityBlocks() const = 0;
68  virtual bool wantsStreamRuns() const = 0;
69  virtual bool wantsStreamLuminosityBlocks() const = 0;
70 
73  }
74 
75  private:
77  //For now this is a placeholder
79  ModuleCallingContext const&,
80  Principal const&) const {}
81 
83  void doBeginJob();
84  void doEndJob();
85 
86  void doBeginStream(StreamID id);
87  void doEndStream(StreamID id);
92 
97  void doEndRun(RunTransitionInfo const&, ModuleCallingContext const*);
100 
105 
107  std::string workerType() const { return "WorkerT<EDAnalyzer>"; }
108 
109  virtual void analyze(StreamID, Event const&, EventSetup const&) const = 0;
110  virtual void beginJob() {}
111  virtual void endJob() {}
112 
113  virtual void preallocStreams(unsigned int);
114  virtual void preallocLumis(unsigned int);
115  virtual void preallocLumisSummary(unsigned int);
116  virtual void preallocate(PreallocationConfiguration const&);
117  virtual void doBeginStream_(StreamID id);
118  virtual void doEndStream_(StreamID id);
119  virtual void doStreamBeginRun_(StreamID id, Run const& rp, EventSetup const& c);
120  virtual void doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c);
121  virtual void doStreamEndRunSummary_(StreamID id, Run const& rp, EventSetup const& c);
122  virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c);
123  virtual void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c);
124  virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c);
125 
126  virtual void doBeginProcessBlock_(ProcessBlock const&);
127  virtual void doAccessInputProcessBlock_(ProcessBlock const&);
128  virtual void doEndProcessBlock_(ProcessBlock const&);
129  virtual void doBeginRun_(Run const& rp, EventSetup const& c);
130  virtual void doBeginRunSummary_(Run const& rp, EventSetup const& c);
131  virtual void doEndRunSummary_(Run const& rp, EventSetup const& c);
132  virtual void doEndRun_(Run const& rp, EventSetup const& c);
133  virtual void doBeginLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
134  virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const& rp, EventSetup const& c);
135  virtual void doEndLuminosityBlockSummary_(LuminosityBlock const& lb, EventSetup const& c);
136  virtual void doEndLuminosityBlock_(LuminosityBlock const& lb, EventSetup const& c);
137 
138  virtual void clearInputProcessBlockCaches();
139 
140  bool hasAcquire() const { return false; }
141  bool hasAccumulator() const { return false; }
142 
145 
146  std::function<void(BranchDescription const&)> callWhenNewProductsRegistered_;
147  };
148 
149  } // namespace global
150 } // namespace edm
151 
152 #endif
virtual void doAccessInputProcessBlock_(ProcessBlock const &)
virtual void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c)
void doEndRun(RunTransitionInfo const &, ModuleCallingContext const *)
const edm::EventSetup & c
virtual void doEndLuminosityBlock_(LuminosityBlock const &lb, EventSetup const &c)
virtual void analyze(StreamID, Event const &, EventSetup const &) const =0
static const std::string & baseType()
virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
void doEndProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
void doStreamBeginLuminosityBlock(StreamID, LumiTransitionInfo const &, ModuleCallingContext const *)
virtual void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c)
void doBeginProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
void doStreamBeginRun(StreamID, RunTransitionInfo const &, ModuleCallingContext const *)
virtual void doBeginRunSummary_(Run const &rp, EventSetup const &c)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
virtual void doEndProcessBlock_(ProcessBlock const &)
virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const &rp, EventSetup const &c)
void doRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
virtual void preallocLumis(unsigned int)
virtual void preallocLumisSummary(unsigned int)
virtual void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c)
virtual bool wantsStreamLuminosityBlocks() const =0
void doStreamEndLuminosityBlock(StreamID, LumiTransitionInfo const &, ModuleCallingContext const *)
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
virtual bool wantsProcessBlocks() const =0
virtual void doEndRun_(Run const &rp, EventSetup const &c)
virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
void preActionBeforeRunEventAsync(WaitingTaskHolder, ModuleCallingContext const &, Principal const &) const
string function
Definition: callgraph.py:50
ModuleDescription moduleDescription_
virtual void preallocate(PreallocationConfiguration const &)
void registerProductsAndCallbacks(EDAnalyzerBase *module, ProductRegistry *reg)
virtual void doEndRunSummary_(Run const &rp, EventSetup const &c)
virtual bool wantsInputProcessBlocks() const =0
void doAccessInputProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
void doEndStream(StreamID id)
void doPreallocate(PreallocationConfiguration const &)
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
std::string workerType() const
void setModuleDescription(ModuleDescription const &md)
virtual void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void doEndStream_(StreamID id)
static void prevalidate(ConfigurationDescriptions &descriptions)
virtual void preallocStreams(unsigned int)
virtual bool wantsGlobalRuns() const =0
virtual bool wantsStreamRuns() const =0
virtual bool wantsGlobalLuminosityBlocks() const =0
void doBeginRun(RunTransitionInfo const &, ModuleCallingContext const *)
void doRespondToOpenInputFile(FileBlock const &)
virtual void clearInputProcessBlockCaches()
void doBeginStream(StreamID id)
virtual void doBeginProcessBlock_(ProcessBlock const &)
void doRespondToCloseInputFile(FileBlock const &)
void doEndLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
void doBeginLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
virtual void doBeginStream_(StreamID id)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: Run.h:45
tuple module
Definition: callgraph.py:69
ModuleDescription const & moduleDescription() const
void doStreamEndRun(StreamID, RunTransitionInfo const &, ModuleCallingContext const *)