FWCore
Framework
interface
SharedResourcesAcquirer.h
Go to the documentation of this file.
1
#ifndef FWCore_Framework_SharedResourcesAcquirer_h
2
#define FWCore_Framework_SharedResourcesAcquirer_h
3
// -*- C++ -*-
4
//
5
// Package: FWCore/Framework
6
// Class : SharedResourcesAcquirer
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Sun, 06 Oct 2013 19:43:26 GMT
19
//
20
21
// system include files
22
#include "
FWCore/Concurrency/interface/SerialTaskQueueChain.h
"
23
#include "
FWCore/Utilities/interface/thread_safety_macros.h
"
24
25
// user include files
26
27
// forward declarations
28
class
testSharedResourcesRegistry;
29
30
namespace
edm
{
31
class
SerialTaskQueueChain
;
32
class
SerialTaskQueue
;
33
34
class
SharedResourcesAcquirer
{
35
public
:
36
friend
class ::testSharedResourcesRegistry;
37
38
SharedResourcesAcquirer
() =
default
;
39
explicit
SharedResourcesAcquirer
(std::vector<std::shared_ptr<SerialTaskQueue>> iQueues)
40
:
m_queues
(
std
::
move
(iQueues)) {}
41
42
SharedResourcesAcquirer
(
SharedResourcesAcquirer
&&) =
default
;
43
SharedResourcesAcquirer
(
const
SharedResourcesAcquirer
&) =
delete
;
44
SharedResourcesAcquirer
&
operator=
(
const
SharedResourcesAcquirer
&) =
delete
;
45
46
SharedResourcesAcquirer
&
operator=
(
SharedResourcesAcquirer
&&) =
default
;
47
~SharedResourcesAcquirer
() =
default
;
48
49
// ---------- member functions ---------------------------
50
52
size_t
numberOfResources
()
const
{
return
m_queues
.
numberOfQueues
(); }
53
54
SerialTaskQueueChain
&
serialQueueChain
()
const
{
return
m_queues
; }
55
56
private
:
57
// ---------- member data --------------------------------
58
//The class is thread safe even for non const functions
59
CMS_THREAD_SAFE
mutable
SerialTaskQueueChain
m_queues
;
60
};
61
}
// namespace edm
62
63
#endif
edm::SharedResourcesAcquirer::serialQueueChain
SerialTaskQueueChain & serialQueueChain() const
Definition:
SharedResourcesAcquirer.h:54
edm::SharedResourcesAcquirer
Definition:
SharedResourcesAcquirer.h:34
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::SharedResourcesAcquirer::numberOfResources
size_t numberOfResources() const
The number returned may be less than the number of resources requested if a resource is only used by ...
Definition:
SharedResourcesAcquirer.h:52
edm::SharedResourcesAcquirer::SharedResourcesAcquirer
SharedResourcesAcquirer()=default
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition:
thread_safety_macros.h:4
edm::SerialTaskQueueChain::numberOfQueues
std::size_t numberOfQueues() const
Definition:
SerialTaskQueueChain.h:71
thread_safety_macros.h
SerialTaskQueue
edm::SharedResourcesAcquirer::SharedResourcesAcquirer
SharedResourcesAcquirer(std::vector< std::shared_ptr< SerialTaskQueue >> iQueues)
Definition:
SharedResourcesAcquirer.h:39
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
SerialTaskQueueChain
edm::SharedResourcesAcquirer::~SharedResourcesAcquirer
~SharedResourcesAcquirer()=default
edm::SharedResourcesAcquirer::m_queues
SerialTaskQueueChain m_queues
Definition:
SharedResourcesAcquirer.h:59
edm::SharedResourcesAcquirer::operator=
SharedResourcesAcquirer & operator=(const SharedResourcesAcquirer &)=delete
SerialTaskQueueChain.h
edm::SerialTaskQueueChain
Definition:
SerialTaskQueueChain.h:32
Generated for CMSSW Reference Manual by
1.8.16