00001 #ifndef FWCore_Framework_DelayedReader_h 00002 #define FWCore_Framework_DelayedReader_h 00003 00004 /*---------------------------------------------------------------------- 00005 00006 DelayedReader: The abstract interface through which the EventPrincipal 00007 uses input sources to retrieve EDProducts from external storage. 00008 00009 ----------------------------------------------------------------------*/ 00010 00011 #include "DataFormats/Common/interface/WrapperOwningHolder.h" 00012 00013 #include <memory> 00014 00015 namespace edm { 00016 struct BranchKey; 00017 class EDProductGetter; 00018 class WrapperInterfaceBase; 00019 class DelayedReader { 00020 public: 00021 virtual ~DelayedReader(); 00022 WrapperOwningHolder getProduct(BranchKey const& k, WrapperInterfaceBase const* interface, EDProductGetter const* ep) { 00023 return getProduct_(k, interface, ep); 00024 } 00025 void mergeReaders(DelayedReader* other) {mergeReaders_(other);} 00026 void reset() {reset_();} 00027 private: 00028 virtual WrapperOwningHolder getProduct_(BranchKey const& k, WrapperInterfaceBase const* interface, EDProductGetter const* ep) const = 0; 00029 virtual void mergeReaders_(DelayedReader*) = 0; 00030 virtual void reset_() = 0; 00031 }; 00032 } 00033 00034 #endif