FWCore
Framework
interface
ESSourceDataProxyBase.h
Go to the documentation of this file.
1
#ifndef FWCore_Framework_ESSourceDataProxyBase_h
2
#define FWCore_Framework_ESSourceDataProxyBase_h
3
// -*- C++ -*-
4
//
5
// Package: FWCore/Framework
6
// Class : ESSourceDataProxyBase
7
//
21
//
22
// Original Author: Chris Jones
23
// Created: 14/05/2020
24
//
25
26
// system include files
27
#include <mutex>
28
#include <atomic>
29
30
// user include files
31
#include "
FWCore/Framework/interface/DataProxy.h
"
32
#include "
FWCore/Framework/interface/EventSetupRecordDetails.h
"
33
#include "
FWCore/Concurrency/interface/WaitingTaskList.h
"
34
#include "
FWCore/Concurrency/interface/SerialTaskQueue.h
"
35
36
// forward declarations
37
38
namespace
edm::eventsetup
{
39
class
ESSourceDataProxyBase
:
public
DataProxy
{
40
public
:
41
ESSourceDataProxyBase
(
edm::SerialTaskQueue
* iQueue,
std::mutex
* iMutex)
42
:
m_queue
(iQueue),
m_mutex
(iMutex),
m_prefetching
{
false
} {}
43
44
edm::SerialTaskQueue
*
queue
()
const
{
return
m_queue
; }
45
std::mutex
*
mutex
()
const
{
return
m_mutex
; }
46
47
protected
:
48
void
invalidateCache
()
override
{
49
m_waitingList
.
reset
();
50
m_prefetching
=
false
;
51
}
52
void
invalidateTransientCache
()
override
{}
53
54
virtual
void
prefetch
(
edm::eventsetup::DataKey
const
& iKey,
EventSetupRecordDetails
) = 0;
55
56
private
:
57
void
prefetchAsyncImpl
(
edm::WaitingTask
* iTask,
58
edm::eventsetup::EventSetupRecordImpl
const
&,
59
edm::eventsetup::DataKey
const
& iKey,
60
edm::EventSetupImpl
const
*,
61
edm::ServiceToken
const
&)
final
;
62
63
// ---------- member data --------------------------------
64
65
edm::WaitingTaskList
m_waitingList
;
66
edm::SerialTaskQueue
*
m_queue
;
67
std::mutex
*
m_mutex
;
68
std::atomic<bool>
m_prefetching
;
69
};
70
}
// namespace edm::eventsetup
71
#endif
edm::eventsetup::ESSourceDataProxyBase::invalidateCache
void invalidateCache() override
Definition:
ESSourceDataProxyBase.h:48
edm::EventSetupImpl
Definition:
EventSetupImpl.h:48
edm::eventsetup::ESSourceDataProxyBase::m_mutex
std::mutex * m_mutex
Definition:
ESSourceDataProxyBase.h:67
EventSetupRecordDetails.h
edm::eventsetup::DataKey
Definition:
DataKey.h:29
edm::SerialTaskQueue
Definition:
SerialTaskQueue.h:67
DataProxy.h
edm::WaitingTaskList::reset
void reset()
Resets access to the resource so that added tasks will wait.
Definition:
WaitingTaskList.cc:52
edm::WaitingTaskList
Definition:
WaitingTaskList.h:101
edm::eventsetup::ESSourceDataProxyBase::ESSourceDataProxyBase
ESSourceDataProxyBase(edm::SerialTaskQueue *iQueue, std::mutex *iMutex)
Definition:
ESSourceDataProxyBase.h:41
edm::ServiceToken
Definition:
ServiceToken.h:40
SerialTaskQueue.h
edm::eventsetup::ESSourceDataProxyBase::m_queue
edm::SerialTaskQueue * m_queue
Definition:
ESSourceDataProxyBase.h:66
edm::eventsetup::ESSourceDataProxyBase
Definition:
ESSourceDataProxyBase.h:39
edm::EventSetupRecordDetails
Definition:
EventSetupRecordDetails.h:29
edm::eventsetup::EventSetupRecordImpl
Definition:
EventSetupRecordImpl.h:76
mutex
static std::mutex mutex
Definition:
Proxy.cc:8
edm::eventsetup::DataProxy
Definition:
DataProxy.h:41
edm::eventsetup::ESSourceDataProxyBase::m_waitingList
edm::WaitingTaskList m_waitingList
Definition:
ESSourceDataProxyBase.h:65
edm::WaitingTask
Definition:
WaitingTask.h:36
edm::eventsetup::ESSourceDataProxyBase::prefetchAsyncImpl
void prefetchAsyncImpl(edm::WaitingTask *iTask, edm::eventsetup::EventSetupRecordImpl const &, edm::eventsetup::DataKey const &iKey, edm::EventSetupImpl const *, edm::ServiceToken const &) final
Definition:
ESSourceDataProxyBase.cc:23
edm::eventsetup::ESSourceDataProxyBase::mutex
std::mutex * mutex() const
Definition:
ESSourceDataProxyBase.h:45
edm::eventsetup::ESSourceDataProxyBase::prefetch
virtual void prefetch(edm::eventsetup::DataKey const &iKey, EventSetupRecordDetails)=0
edm::eventsetup::ESSourceDataProxyBase::queue
edm::SerialTaskQueue * queue() const
Definition:
ESSourceDataProxyBase.h:44
WaitingTaskList.h
edm::eventsetup
Definition:
ES_DDDetector.cc:16
edm::eventsetup::ESSourceDataProxyBase::m_prefetching
std::atomic< bool > m_prefetching
Definition:
ESSourceDataProxyBase.h:68
edm::eventsetup::ESSourceDataProxyBase::invalidateTransientCache
void invalidateTransientCache() override
Definition:
ESSourceDataProxyBase.h:52
Generated for CMSSW Reference Manual by
1.8.16