test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDAnalyzerBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_stream_EDAnalyzerBase_h
2 #define FWCore_Framework_stream_EDAnalyzerBase_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : EDAnalyzerBase
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Fri, 02 Aug 2013 00:11:27 GMT
19 //
20 
21 // system include files
22 
23 // user include files
29 
30 // forward declarations
31 namespace edm {
32  namespace stream {
33  class EDAnalyzerAdaptorBase;
34 
36  {
37  //This needs access to the parentage cache info
38  friend class EDAnalyzerAdaptorBase;
39 
40  public:
42 
43 
45  virtual ~EDAnalyzerBase();
46 
47  static void fillDescriptions(ConfigurationDescriptions& descriptions);
48  static void prevalidate(ConfigurationDescriptions& descriptions);
49  static const std::string& baseType();
50 
51  // Warning: the returned moduleDescription will be invalid during construction
53  return *moduleDescriptionPtr_;
54  }
55 
57 
58  private:
59  EDAnalyzerBase(const EDAnalyzerBase&) = delete; // stop default
60 
61  const EDAnalyzerBase& operator=(const EDAnalyzerBase&) = delete; // stop default
62 
64 
65  virtual void beginStream(StreamID) {}
66  virtual void beginRun(edm::Run const&, edm::EventSetup const&) {}
68  virtual void analyze(Event const&, EventSetup const&) = 0;
70  virtual void endRun(edm::Run const&, edm::EventSetup const&) {}
71  virtual void endStream(){}
72 
73  virtual void preForkReleaseResources() {}
74  virtual void postForkReacquireResources(unsigned int /*iChildIndex*/, unsigned int /*iNumberOfChildren*/) {}
75 
76 
78  moduleDescriptionPtr_ = iDesc;
79  }
80  // ---------- member data --------------------------------
81  std::function<void(BranchDescription const&)> callWhenNewProductsRegistered_;
83  };
84 
85  }
86 }
87 
88 
89 
90 #endif
virtual void preForkReleaseResources()
void registerProductsAndCallbacks(EDAnalyzerBase const *, ProductRegistry *reg)
ModuleDescription const & moduleDescription() const
static void prevalidate(ConfigurationDescriptions &descriptions)
virtual void postForkReacquireResources(unsigned int, unsigned int)
void callWhenNewProductsRegistered(std::function< void(BranchDescription const &)> const &func)
ModuleDescription const * moduleDescriptionPtr_
virtual void analyze(Event const &, EventSetup const &)=0
virtual void beginStream(StreamID)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
static const std::string & baseType()
static void fillDescriptions(ConfigurationDescriptions &descriptions)
helper::RootFunctionHelper< F, args >::root_function function(F &f)
Definition: rootFunction.h:14
const EDAnalyzerBase & operator=(const EDAnalyzerBase &)=delete
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
EDAnalyzerAdaptorBase ModuleType
void setModuleDescriptionPtr(ModuleDescription const *iDesc)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
virtual void endRun(edm::Run const &, edm::EventSetup const &)
Definition: Run.h:43