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::unique_ptr<WrapperBase> getProduct(BranchID const& k,
33  EDProductGetter const* ep,
34  ModuleCallingContext const* mcc = nullptr);
35 
36  void mergeReaders(DelayedReader* other) { mergeReaders_(other); }
37  void reset() { reset_(); }
38 
39  std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> sharedResources() const { return sharedResources_(); }
40 
42  preEventReadFromSourceSignal() const = 0;
44  postEventReadFromSourceSignal() const = 0;
45 
46  private:
47  virtual std::unique_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
T const * getProduct_(RefCore const &ref, const EDProductGetter *prodGetter)
Definition: RefCoreGet.h:23
void mergeReaders(DelayedReader *other)
Definition: DelayedReader.h:36
T const * getProduct(RefCore const &ref)
Definition: RefCoreGet.h:41
std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources() const
Definition: DelayedReader.h:39
int k[5][pyjets_maxn]
HLT enums.