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_limited_EDAnalyzerBase_h
2 #define FWCore_Framework_limited_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
30 
31 // forward declarations
32 
33 namespace edm {
34  class ModuleCallingContext;
35  class PreallocationConfiguration;
36  class StreamID;
37  class ActivityRegistry;
38  class ThinnedAssociationsHelper;
39 
40  namespace maker {
41  template <typename T>
42  class ModuleHolderT;
43  }
44 
45  namespace limited {
46 
47  class EDAnalyzerBase : public EDConsumerBase {
48  public:
49  template <typename T>
50  friend class edm::WorkerT;
51  template <typename T>
54 
56  ~EDAnalyzerBase() override;
57 
58  static void fillDescriptions(ConfigurationDescriptions& descriptions);
59  static void prevalidate(ConfigurationDescriptions& descriptions);
60  static const std::string& baseType();
61 
62  // Warning: the returned moduleDescription will be invalid during construction
64 
65  virtual bool wantsProcessBlocks() const = 0;
66  virtual bool wantsInputProcessBlocks() const = 0;
67  virtual bool wantsGlobalRuns() const = 0;
68  virtual bool wantsGlobalLuminosityBlocks() const = 0;
69  virtual bool wantsStreamRuns() const = 0;
70  virtual bool wantsStreamLuminosityBlocks() const = 0;
71 
74  }
75 
76  unsigned int concurrencyLimit() const { return queue_.concurrencyLimit(); }
77 
78  LimitedTaskQueue& queue() { return queue_; }
79 
80  private:
82  //For now this is a placeholder
84  ModuleCallingContext const& iModuleCallingContext,
85  Principal const& iPrincipal) const {}
86 
88  void doBeginJob();
89  void doEndJob();
90 
91  void doBeginStream(StreamID id);
92  void doEndStream(StreamID id);
97 
102  void doEndRun(RunTransitionInfo const&, ModuleCallingContext const*);
105 
110 
112  std::string workerType() const { return "WorkerT<EDAnalyzer>"; }
113 
114  virtual void analyze(StreamID, Event const&, EventSetup const&) const = 0;
115  virtual void beginJob() {}
116  virtual void endJob() {}
117 
118  virtual void preallocStreams(unsigned int);
119  virtual void preallocLumis(unsigned int);
120  virtual void preallocLumisSummary(unsigned int);
121  virtual void preallocate(PreallocationConfiguration const&);
122  virtual void doBeginStream_(StreamID id);
123  virtual void doEndStream_(StreamID id);
124  virtual void doStreamBeginRun_(StreamID id, Run const& rp, EventSetup const& c);
125  virtual void doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c);
126  virtual void doStreamEndRunSummary_(StreamID id, Run const& rp, EventSetup const& c);
127  virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c);
128  virtual void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c);
129  virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c);
130 
131  virtual void doBeginProcessBlock_(ProcessBlock const&);
132  virtual void doAccessInputProcessBlock_(ProcessBlock const&);
133  virtual void doEndProcessBlock_(ProcessBlock const&);
134  virtual void doBeginRun_(Run const& rp, EventSetup const& c);
135  virtual void doBeginRunSummary_(Run const& rp, EventSetup const& c);
136  virtual void doEndRunSummary_(Run const& rp, EventSetup const& c);
137  virtual void doEndRun_(Run const& rp, EventSetup const& c);
138  virtual void doBeginLuminosityBlock_(LuminosityBlock const& lbp, EventSetup const& c);
139  virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const& rp, EventSetup const& c);
140  virtual void doEndLuminosityBlockSummary_(LuminosityBlock const& lb, EventSetup const& c);
141  virtual void doEndLuminosityBlock_(LuminosityBlock const& lb, EventSetup const& c);
142 
143  virtual void clearInputProcessBlockCaches();
144 
145  bool hasAcquire() const { return false; }
146  bool hasAccumulator() const { return false; }
147 
150 
151  std::function<void(BranchDescription const&)> callWhenNewProductsRegistered_;
152 
154  };
155 
156  } // namespace limited
157 } // namespace edm
158 
159 #endif
void doStreamEndLuminosityBlock(StreamID, LumiTransitionInfo const &, ModuleCallingContext const *)
const edm::EventSetup & c
virtual void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c)
virtual void doBeginLuminosityBlockSummary_(LuminosityBlock const &rp, EventSetup const &c)
ModuleDescription moduleDescription_
virtual void analyze(StreamID, Event const &, EventSetup const &) const =0
virtual void preallocLumisSummary(unsigned int)
void doStreamBeginRun(StreamID, RunTransitionInfo const &, ModuleCallingContext const *)
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
virtual void preallocStreams(unsigned int)
ModuleDescription const & moduleDescription() const
virtual void doEndStream_(StreamID id)
virtual void doEndProcessBlock_(ProcessBlock const &)
void doRespondToOpenInputFile(FileBlock const &)
void doEndProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
unsigned int concurrencyLimit() const
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual bool wantsGlobalLuminosityBlocks() const =0
void doRespondToCloseInputFile(FileBlock const &)
void doRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
virtual void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c)
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
virtual void doBeginStream_(StreamID id)
virtual void preallocate(PreallocationConfiguration const &)
virtual void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
virtual void clearInputProcessBlockCaches()
virtual void doEndRunSummary_(Run const &rp, EventSetup const &c)
virtual void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
void registerProductsAndCallbacks(EDAnalyzerBase *module, ProductRegistry *reg)
string function
Definition: callgraph.py:50
virtual bool wantsInputProcessBlocks() const =0
virtual void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c)
virtual void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c)
void doBeginProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
virtual bool wantsStreamLuminosityBlocks() const =0
void doAccessInputProcessBlock(ProcessBlockPrincipal const &, ModuleCallingContext const *)
void doStreamEndRun(StreamID, RunTransitionInfo const &, ModuleCallingContext const *)
virtual bool wantsStreamRuns() const =0
virtual void doEndLuminosityBlock_(LuminosityBlock const &lb, EventSetup const &c)
virtual bool wantsProcessBlocks() const =0
virtual bool wantsGlobalRuns() const =0
void doEndRun(RunTransitionInfo const &, ModuleCallingContext const *)
static void prevalidate(ConfigurationDescriptions &descriptions)
virtual void doEndRun_(Run const &rp, EventSetup const &c)
virtual void doAccessInputProcessBlock_(ProcessBlock const &)
EDAnalyzerBase(ParameterSet const &pset)
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
void setModuleDescription(ModuleDescription const &md)
virtual void preallocLumis(unsigned int)
void doBeginLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
virtual void doBeginProcessBlock_(ProcessBlock const &)
void doEndLuminosityBlock(LumiTransitionInfo const &, ModuleCallingContext const *)
virtual void doBeginRunSummary_(Run const &rp, EventSetup const &c)
void preActionBeforeRunEventAsync(WaitingTaskHolder iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const
void doStreamBeginLuminosityBlock(StreamID, LumiTransitionInfo const &, ModuleCallingContext const *)
void doBeginStream(StreamID id)
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
virtual void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c)
std::string workerType() const
void doBeginRun(RunTransitionInfo const &, ModuleCallingContext const *)
void doPreallocate(PreallocationConfiguration const &)
static const std::string & baseType()
LimitedTaskQueue & queue()
Definition: Run.h:45
tuple module
Definition: callgraph.py:69
unsigned int concurrencyLimit() const