CMS 3D CMS Logo

DelayedReader.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_DelayedReader_h
2 #define FWCore_Framework_DelayedReader_h
3 
4 /*----------------------------------------------------------------------
5 
6 DelayedReader: The abstract interface through which the Principal
7 uses input sources to retrieve EDProducts from external storage.
8 
9 ----------------------------------------------------------------------*/
10 
12 
13 #include <memory>
14 #include <mutex>
15 
16 namespace edm {
17 
18  class BranchID;
19  class EDProductGetter;
20  class ModuleCallingContext;
22  class StreamContext;
23 
24  namespace signalslot {
25  template <typename T>
26  class Signal;
27  }
28 
29  class DelayedReader {
30  public:
31  virtual ~DelayedReader();
32  std::shared_ptr<WrapperBase> getProduct(BranchID const& k,
33  EDProductGetter const* ep,
34  ModuleCallingContext const* mcc = nullptr);
35 
37  void reset() { reset_(); }
38 
39  std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> sharedResources() const { return sharedResources_(); }
40 
42  preEventReadFromSourceSignal() const = 0;
45 
46  private:
47  virtual std::shared_ptr<WrapperBase> getProduct_(BranchID const& k, EDProductGetter const* ep) = 0;
48  virtual void mergeReaders_(DelayedReader*) = 0;
49  virtual void reset_() = 0;
50  virtual std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> sharedResources_() const;
51  };
52 } // namespace edm
53 
54 #endif
void mergeReaders(DelayedReader *other)
Definition: DelayedReader.h:36
virtual ~DelayedReader()
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources_() const
virtual void mergeReaders_(DelayedReader *)=0
std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources() const
Definition: DelayedReader.h:39
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
HLT enums.
virtual std::shared_ptr< WrapperBase > getProduct_(BranchID const &k, EDProductGetter const *ep)=0
std::shared_ptr< WrapperBase > getProduct(BranchID const &k, EDProductGetter const *ep, ModuleCallingContext const *mcc=nullptr)
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
virtual void reset_()=0