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::root::FWLiteDelayedReader edm::RootDelayedReader

Public Member Functions

std::unique_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::unique_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

edm::DelayedReader::~DelayedReader ( )
virtual

Definition at line 15 of file DelayedReader.cc.

15 {}

Member Function Documentation

std::unique_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 * postEventReadFromSourceSignal() const =0
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
int k[5][pyjets_maxn]
virtual std::unique_ptr< WrapperBase > getProduct_(BranchID const &k, EDProductGetter const *ep)=0
virtual std::unique_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.

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.

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 edm::refcore::getProduct_().

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.

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