CMS 3D CMS Logo

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  class ProductRegistry;
35  class ThinnedAssociationsHelper;
36  class WaitingTaskWithArenaHolder;
37 
38  namespace stream {
39  class EDProducerAdaptorBase;
40  template<typename> class ProducingModuleAdaptorBase;
41 
43  {
44  //This needs access to the parentage cache info
45  friend class EDProducerAdaptorBase;
47 
48  public:
50 
52  ~EDProducerBase() override;
53 
54  static void fillDescriptions(ConfigurationDescriptions& descriptions);
55  static void prevalidate(ConfigurationDescriptions& descriptions);
56  static const std::string& baseType();
57 
58  // Warning: the returned moduleDescription will be invalid during construction
60  return *moduleDescriptionPtr_;
61  }
62  private:
63  EDProducerBase(const EDProducerBase&) = delete; // stop default
64 
65  const EDProducerBase& operator=(const EDProducerBase&) = delete; // stop default
66 
67  virtual void beginStream(StreamID) {}
68  virtual void beginRun(edm::Run const&, edm::EventSetup const&) {}
70  virtual void produce(Event&, EventSetup const&) = 0;
72  virtual void endRun(edm::Run const&, edm::EventSetup const&) {}
73  virtual void endStream(){}
74 
77 
78  virtual void doAcquire_(Event const&,
79  EventSetup const&,
81 
83  moduleDescriptionPtr_ = iDesc;
84  }
85  // ---------- member data --------------------------------
86  std::vector<BranchID> previousParentage_;
87  std::vector<BranchID> gotBranchIDsFromAcquire_;
90  };
91 
92  }
93 }
94 
95 
96 
97 #endif
virtual void doAcquire_(Event const &, EventSetup const &, WaitingTaskWithArenaHolder &)=0
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)
std::vector< BranchID > gotBranchIDsFromAcquire_
ModuleDescription const * moduleDescriptionPtr_
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
ModuleDescription const & moduleDescription() const
virtual void registerThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
virtual void endRun(edm::Run const &, edm::EventSetup const &)
EDProducerAdaptorBase ModuleType
HLT enums.
virtual void beginStream(StreamID)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: Run.h:43