src
FWCore
Framework
src
DelayedReader.cc
Go to the documentation of this file.
1
#include "
FWCore/Framework/interface/DelayedReader.h
"
2
#include "
FWCore/Framework/interface/SharedResourcesAcquirer.h
"
3
#include "
FWCore/ServiceRegistry/interface/ModuleCallingContext.h
"
4
#include "
FWCore/ServiceRegistry/interface/StreamContext.h
"
5
#include "
FWCore/Utilities/interface/Signal.h
"
6
7
#include <mutex>
8
#include <cassert>
9
/*----------------------------------------------------------------------
10
11
12
----------------------------------------------------------------------*/
13
14
namespace
edm
{
15
DelayedReader::~DelayedReader
() {}
16
17
std::shared_ptr<WrapperBase>
DelayedReader::getProduct
(
BranchID
const
&
k
,
18
EDProductGetter
const
*
ep
,
19
ModuleCallingContext
const
* mcc) {
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
}
35
36
std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>
DelayedReader::sharedResources_
()
const
{
37
return
std::pair<SharedResourcesAcquirer*, std::recursive_mutex*>(
nullptr
,
nullptr
);
38
}
39
}
// namespace edm
edm::EDProductGetter
Definition:
EDProductGetter.h:41
edm::ModuleCallingContext
Definition:
ModuleCallingContext.h:33
SharedResourcesAcquirer.h
StreamContext.h
edm::DelayedReader::~DelayedReader
virtual ~DelayedReader()
Definition:
DelayedReader.cc:15
edm::BranchID
Definition:
BranchID.h:14
edm::DelayedReader::sharedResources_
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources_() const
Definition:
DelayedReader.cc:36
ecalHexDisplay_cfg.ep
ep
Definition:
ecalHexDisplay_cfg.py:34
DelayedReader.h
Signal.h
edm::DelayedReader::preEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
edm::ModuleCallingContext::getStreamContext
StreamContext const * getStreamContext() const noexcept(false)
Definition:
ModuleCallingContext.cc:40
edm
HLT enums.
Definition:
AlignableModifier.h:19
isotrackApplyRegressor.k
k
Definition:
isotrackApplyRegressor.py:90
edm::DelayedReader::getProduct_
virtual std::shared_ptr< WrapperBase > getProduct_(BranchID const &k, EDProductGetter const *ep)=0
edm::DelayedReader::getProduct
std::shared_ptr< WrapperBase > getProduct(BranchID const &k, EDProductGetter const *ep, ModuleCallingContext const *mcc=nullptr)
Definition:
DelayedReader.cc:17
ModuleCallingContext.h
edm::DelayedReader::postEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
Generated for CMSSW Reference Manual by
1.8.14