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 28 of file DelayedReader.h.

Constructor & Destructor Documentation

edm::DelayedReader::~DelayedReader ( )
virtual

Definition at line 16 of file DelayedReader.cc.

16 {}

Member Function Documentation

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

Definition at line 19 of file DelayedReader.cc.

References getProduct_(), edm::ModuleCallingContext::getStreamContext(), postEventReadFromSourceSignal(), and preEventReadFromSourceSignal().

21  {
22 
23  auto preSignal = preEventReadFromSourceSignal();
24  if(mcc and preSignal) {
25  preSignal->emit(*(mcc->getStreamContext()),*mcc);
26  }
27  auto postSignal = postEventReadFromSourceSignal();
28 
29  auto sentryCall = [&postSignal]( ModuleCallingContext const* iContext) {
30  if(postSignal) {
31  postSignal->emit(*(iContext->getStreamContext()),*iContext);
32  }
33  };
34  std::unique_ptr<ModuleCallingContext const, decltype(sentryCall)> sentry(mcc, sentryCall);
35 
36  return getProduct_(k, ep);
37  }
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 35 of file DelayedReader.h.

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

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 36 of file DelayedReader.h.

36 {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 38 of file DelayedReader.h.

References edm::refcore::getProduct_().

38  {
39  return sharedResources_();
40  }
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 40 of file DelayedReader.cc.

40  {
41  return std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(nullptr, nullptr);
42  }