CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
edm::DelayedReader Class Referenceabstract

#include <DelayedReader.h>

Inheritance diagram for edm::DelayedReader:
edm::RepeatingCachedRootSource::RCDelayedReader edm::root::FWLiteDelayedReader edm::RootDelayedReader

Public Member Functions

std::shared_ptr< WrapperBasegetProduct (BranchID const &k, EDProductGetter const *ep, ModuleCallingContext const *mcc=nullptr)
 
void mergeReaders (DelayedReader *other)
 
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal () const =0
 
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal () const =0
 
void reset ()
 
std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources () const
 
virtual ~DelayedReader ()
 

Private Member Functions

virtual std::shared_ptr< WrapperBasegetProduct_ (BranchID const &k, EDProductGetter const *ep)=0
 
virtual void mergeReaders_ (DelayedReader *)=0
 
virtual void reset_ ()=0
 
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources_ () const
 

Detailed Description

Definition at line 29 of file DelayedReader.h.

Constructor & Destructor Documentation

◆ ~DelayedReader()

edm::DelayedReader::~DelayedReader ( )
virtual

Definition at line 15 of file DelayedReader.cc.

15 {}

Member Function Documentation

◆ getProduct()

std::shared_ptr< WrapperBase > edm::DelayedReader::getProduct ( BranchID const &  k,
EDProductGetter const *  ep,
ModuleCallingContext const *  mcc = nullptr 
)

Definition at line 17 of file DelayedReader.cc.

References SiStripBadComponentsDQMServiceTemplate_cfg::ep, getProduct_(), edm::ModuleCallingContext::getStreamContext(), dqmdumpme::k, postEventReadFromSourceSignal(), and preEventReadFromSourceSignal().

19  {
20  auto preSignal = preEventReadFromSourceSignal();
21  if (mcc and preSignal) {
22  preSignal->emit(*(mcc->getStreamContext()), *mcc);
23  }
24  auto postSignal = postEventReadFromSourceSignal();
25 
26  auto sentryCall = [&postSignal](ModuleCallingContext const* iContext) {
27  if (postSignal) {
28  postSignal->emit(*(iContext->getStreamContext()), *iContext);
29  }
30  };
31  std::unique_ptr<ModuleCallingContext const, decltype(sentryCall)> sentry(mcc, sentryCall);
32 
33  return getProduct_(k, ep);
34  }
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
virtual std::shared_ptr< WrapperBase > getProduct_(BranchID const &k, EDProductGetter const *ep)=0
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0

◆ getProduct_()

virtual std::shared_ptr<WrapperBase> edm::DelayedReader::getProduct_ ( BranchID const &  k,
EDProductGetter const *  ep 
)
privatepure virtual

◆ mergeReaders()

void edm::DelayedReader::mergeReaders ( DelayedReader other)
inline

Definition at line 36 of file DelayedReader.h.

References mergeReaders_(), and trackingPlots::other.

Referenced by edm::Principal::recombine().

36 { mergeReaders_(other); }
virtual void mergeReaders_(DelayedReader *)=0

◆ mergeReaders_()

virtual void edm::DelayedReader::mergeReaders_ ( DelayedReader )
privatepure virtual

◆ postEventReadFromSourceSignal()

virtual signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* edm::DelayedReader::postEventReadFromSourceSignal ( ) const
pure virtual

◆ preEventReadFromSourceSignal()

virtual signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* edm::DelayedReader::preEventReadFromSourceSignal ( ) const
pure virtual

◆ reset()

void edm::DelayedReader::reset ( void  )
inline

Definition at line 37 of file DelayedReader.h.

References reset_().

37 { reset_(); }
virtual void reset_()=0

◆ reset_()

virtual void edm::DelayedReader::reset_ ( )
privatepure virtual

◆ sharedResources()

std::pair<SharedResourcesAcquirer*, std::recursive_mutex*> edm::DelayedReader::sharedResources ( ) const
inline

Definition at line 39 of file DelayedReader.h.

References sharedResources_().

39 { return sharedResources_(); }
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources_() const

◆ sharedResources_()

std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > edm::DelayedReader::sharedResources_ ( ) const
privatevirtual

Reimplemented in edm::RootDelayedReader.

Definition at line 36 of file DelayedReader.cc.

Referenced by sharedResources().

36  {
37  return std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(nullptr, nullptr);
38  }