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::unique_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
ModuleCallingContext.h
edm::DelayedReader::sharedResources_
virtual std::pair< SharedResourcesAcquirer *, std::recursive_mutex * > sharedResources_() const
Definition:
DelayedReader.cc:36
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::DelayedReader::~DelayedReader
virtual ~DelayedReader()
Definition:
DelayedReader.cc:15
edm::DelayedReader::preEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
DelayedReader.h
edm::DelayedReader::getProduct_
virtual std::unique_ptr< WrapperBase > getProduct_(BranchID const &k, EDProductGetter const *ep)=0
SharedResourcesAcquirer.h
edm::EDProductGetter
Definition:
EDProductGetter.h:41
edm::DelayedReader::getProduct
std::unique_ptr< WrapperBase > getProduct(BranchID const &k, EDProductGetter const *ep, ModuleCallingContext const *mcc=nullptr)
Definition:
DelayedReader.cc:17
edm::BranchID
Definition:
BranchID.h:14
dqmdumpme.k
k
Definition:
dqmdumpme.py:60
edm::DelayedReader::postEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
edm::ModuleCallingContext::getStreamContext
StreamContext const * getStreamContext() const
Definition:
ModuleCallingContext.cc:32
Signal.h
cms::cuda::device::unique_ptr
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
Definition:
device_unique_ptr.h:33
StreamContext.h
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition:
SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::ModuleCallingContext
Definition:
ModuleCallingContext.h:29
Generated for CMSSW Reference Manual by
1.8.16