CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EDProducerBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_stream_EDProducerBase_h
2 #define FWCore_Framework_stream_EDProducerBase_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : EDProducerBase
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
30 
31 // forward declarations
32 namespace edm {
33  template<typename T> class WorkerT;
34  namespace stream {
35  class EDProducerAdaptorBase;
36  template<typename> class ProducingModuleAdaptorBase;
37 
39  {
40  //This needs access to the parentage cache info
41  friend class EDProducerAdaptorBase;
43 
44  public:
46 
48  virtual ~EDProducerBase();
49 
50  static void fillDescriptions(ConfigurationDescriptions& descriptions);
51  static void prevalidate(ConfigurationDescriptions& descriptions);
52  static const std::string& baseType();
53 
54  // Warning: the returned moduleDescription will be invalid during construction
56  return *moduleDescriptionPtr_;
57  }
58  private:
59  EDProducerBase(const EDProducerBase&) = delete; // stop default
60 
61  const EDProducerBase& operator=(const EDProducerBase&) = delete; // stop default
62 
63  virtual void beginStream(StreamID) {}
64  virtual void beginRun(edm::Run const&, edm::EventSetup const&) {}
66  virtual void produce(Event&, EventSetup const&) = 0;
68  virtual void endRun(edm::Run const&, edm::EventSetup const&) {}
69  virtual void endStream(){}
70 
72  moduleDescriptionPtr_ = iDesc;
73  }
74  // ---------- member data --------------------------------
75  std::vector<BranchID> previousParentage_;
78  };
79 
80  }
81 }
82 
83 
84 
85 #endif
virtual void produce(Event &, EventSetup const &)=0
static void prevalidate(ConfigurationDescriptions &descriptions)
std::vector< BranchID > previousParentage_
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
static const std::string & baseType()
const EDProducerBase & operator=(const EDProducerBase &)=delete
void setModuleDescriptionPtr(ModuleDescription const *iDesc)
ModuleDescription const * moduleDescriptionPtr_
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
ModuleDescription const & moduleDescription() const
virtual void endRun(edm::Run const &, edm::EventSetup const &)
EDProducerAdaptorBase ModuleType
virtual void beginStream(StreamID)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: Run.h:41