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
31 
32 // forward declarations
33 namespace edm {
34  template <typename T>
35  class WorkerT;
36  class ProductRegistry;
37  class ThinnedAssociationsHelper;
38  class WaitingTaskWithArenaHolder;
39  class EventForTransformer;
40 
41  namespace stream {
42  class EDProducerAdaptorBase;
43  template <typename>
44  class ProducingModuleAdaptorBase;
45 
47  //This needs access to the parentage cache info
48  friend class EDProducerAdaptorBase;
50 
51  public:
53 
55  EDProducerBase(const EDProducerBase&) = delete; // stop default
56  const EDProducerBase& operator=(const EDProducerBase&) = delete; // stop default
57  ~EDProducerBase() override;
58 
59  static void fillDescriptions(ConfigurationDescriptions& descriptions);
60  static void prevalidate(ConfigurationDescriptions& descriptions);
61  static const std::string& baseType();
62 
63  // Warning: the returned moduleDescription will be invalid during construction
65 
66  private:
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 
76 
77  virtual void doAcquire_(Event const&, EventSetup const&, WaitingTaskWithArenaHolder&) = 0;
78  virtual size_t transformIndex_(edm::BranchDescription const& iBranch) const;
79  virtual ProductResolverIndex transformPrefetch_(std::size_t iIndex) const;
80  virtual void transformAsync_(WaitingTaskHolder iTask,
81  std::size_t iIndex,
84  ServiceWeakToken const& iToken) const;
85 
87  // ---------- member data --------------------------------
88  std::vector<BranchID> previousParentage_;
89  std::vector<BranchID> gotBranchIDsFromAcquire_;
92  };
93 
94  } // namespace stream
95 } // namespace edm
96 
97 #endif
unsigned int ProductResolverIndex
virtual ProductResolverIndex transformPrefetch_(std::size_t iIndex) const
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
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
int iEvent
Definition: GenABIO.cc:224
void setModuleDescriptionPtr(ModuleDescription const *iDesc)
std::vector< BranchID > gotBranchIDsFromAcquire_
ModuleDescription const * moduleDescriptionPtr_
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
virtual void registerThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)
virtual void endRun(edm::Run const &, edm::EventSetup const &)
virtual size_t transformIndex_(edm::BranchDescription const &iBranch) const
EDProducerAdaptorBase ModuleType
HLT enums.
virtual void transformAsync_(WaitingTaskHolder iTask, std::size_t iIndex, edm::EventForTransformer &iEvent, edm::ActivityRegistry *iAct, ServiceWeakToken const &iToken) const
virtual void beginStream(StreamID)
ModuleDescription const & moduleDescription() const
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: Run.h:45