CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< WrapperBase
getProduct_ (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

edm::DelayedReader::~DelayedReader ( )
virtual

Definition at line 15 of file DelayedReader.cc.

15 {}

Member Function Documentation

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 getProduct_(), edm::ModuleCallingContext::getStreamContext(), 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
virtual std::shared_ptr<WrapperBase> edm::DelayedReader::getProduct_ ( BranchID const &  k,
EDProductGetter const *  ep 
)
privatepure virtual
void edm::DelayedReader::mergeReaders ( DelayedReader other)
inline

Definition at line 36 of file DelayedReader.h.

References mergeReaders_().

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

36 { mergeReaders_(other); }
virtual void mergeReaders_(DelayedReader *)=0
virtual void edm::DelayedReader::mergeReaders_ ( DelayedReader )
privatepure virtual
virtual signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* edm::DelayedReader::postEventReadFromSourceSignal ( ) const
pure virtual
virtual signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* edm::DelayedReader::preEventReadFromSourceSignal ( ) const
pure virtual
void edm::DelayedReader::reset ( void  )
inline

Definition at line 37 of file DelayedReader.h.

References reset_().

37 { reset_(); }
virtual void reset_()=0
virtual void edm::DelayedReader::reset_ ( )
privatepure virtual
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
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  }