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 
41  virtual signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const*
42  preEventReadFromSourceSignal() const = 0;
43  virtual signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const*
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
edm::DelayedReader::mergeReaders_
virtual void mergeReaders_(DelayedReader *)=0
edm::DelayedReader::reset
void reset()
Definition: DelayedReader.h:37
edm::DelayedReader::sharedResources_
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources_() const
Definition: DelayedReader.cc:36
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::DelayedReader::~DelayedReader
virtual ~DelayedReader()
Definition: DelayedReader.cc:15
edm::DelayedReader::preEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
edm::DelayedReader::reset_
virtual void reset_()=0
edm::DelayedReader::mergeReaders
void mergeReaders(DelayedReader *other)
Definition: DelayedReader.h:36
edm::EDProductGetter
Definition: EDProductGetter.h:41
edm::StreamContext
Definition: StreamContext.h:31
edm::BranchID
Definition: BranchID.h:14
trackingPlots.other
other
Definition: trackingPlots.py:1460
dqmdumpme.k
k
Definition: dqmdumpme.py:60
WrapperBase.h
SharedResourcesAcquirer
edm::DelayedReader::getProduct
std::shared_ptr< WrapperBase > getProduct(BranchID const &k, EDProductGetter const *ep, ModuleCallingContext const *mcc=nullptr)
Definition: DelayedReader.cc:17
edm::DelayedReader::postEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
edm::DelayedReader::getProduct_
virtual std::shared_ptr< WrapperBase > getProduct_(BranchID const &k, EDProductGetter const *ep)=0
EDProductGetter
edm::DelayedReader::sharedResources
std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources() const
Definition: DelayedReader.h:39
edm::DelayedReader
Definition: DelayedReader.h:29
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
edm::signalslot::Signal
Definition: DelayedReader.h:26
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29