#include <SharedResourcesRegistry.h>
Public Member Functions | |
SharedResourcesAcquirer | createAcquirer (std::vector< std::string > const &) const |
std::pair< SharedResourcesAcquirer, std::shared_ptr< std::recursive_mutex > > | createAcquirerForSourceDelayedReader () |
void | registerSharedResource (const std::string &) |
A resource name must be registered before it can be used in the createAcquirer call. More... | |
Static Public Member Functions | |
static SharedResourcesRegistry * | instance () |
Static Public Attributes | |
static const std::string | kLegacyModuleResourceName {"__legacy__"} |
All legacy modules share this resource. More... | |
Private Member Functions | |
const SharedResourcesRegistry & | operator= (const SharedResourcesRegistry &)=delete |
SharedResourcesRegistry () | |
SharedResourcesRegistry (const SharedResourcesRegistry &)=delete | |
~SharedResourcesRegistry ()=default | |
Private Attributes | |
unsigned int | nLegacy_ |
edm::propagate_const< std::shared_ptr< SerialTaskQueue > > | queueForDelayedReader_ |
edm::propagate_const< std::shared_ptr< std::recursive_mutex > > | resourceForDelayedReader_ |
std::map< std::string, std::pair< std::shared_ptr< SerialTaskQueue >, unsigned int > > | resourceMap_ |
Friends | |
class | ::testSharedResourcesRegistry |
Definition at line 39 of file SharedResourcesRegistry.h.
|
private |
Definition at line 30 of file SharedResourcesRegistry.cc.
|
privatedefault |
|
privatedelete |
SharedResourcesAcquirer SharedResourcesRegistry::createAcquirer | ( | std::vector< std::string > const & | resourceNames | ) | const |
Definition at line 75 of file SharedResourcesRegistry.cc.
References cms::cuda::assert(), spr::find(), kLegacyModuleResourceName, eostools::move(), Skims_PA_cff::name, and resourceMap_.
Referenced by edm::one::impl::SharedResourcesUser< T >::createAcquirer(), edm::EDAnalyzer::doBeginJob(), edm::EDProducer::doBeginJob(), and edm::EDFilter::doBeginJob().
std::pair< SharedResourcesAcquirer, std::shared_ptr< std::recursive_mutex > > SharedResourcesRegistry::createAcquirerForSourceDelayedReader | ( | ) |
Definition at line 64 of file SharedResourcesRegistry.cc.
References edm::get_underlying(), eostools::move(), queueForDelayedReader_, and resourceForDelayedReader_.
Referenced by edm::PoolSource::PoolSource(), and edm::RootDelayedReader::RootDelayedReader().
|
static |
Definition at line 25 of file SharedResourcesRegistry.cc.
Referenced by edm::one::impl::SharedResourcesUser< T >::createAcquirer(), edm::EDAnalyzer::doBeginJob(), edm::EDProducer::doBeginJob(), edm::EDFilter::doBeginJob(), edm::EDAnalyzer::EDAnalyzer(), edm::EDFilter::EDFilter(), edm::EDProducer::EDProducer(), edm::PoolSource::PoolSource(), edm::RootDelayedReader::RootDelayedReader(), and edm::one::impl::SharedResourcesUser< T >::usesResource().
|
privatedelete |
void SharedResourcesRegistry::registerSharedResource | ( | const std::string & | resourceName | ) |
A resource name must be registered before it can be used in the createAcquirer call.
Definition at line 32 of file SharedResourcesRegistry.cc.
References kLegacyModuleResourceName, nLegacy_, resourceMap_, and mitigatedMETSequence_cff::U.
Referenced by edm::EDAnalyzer::EDAnalyzer(), edm::EDFilter::EDFilter(), edm::EDProducer::EDProducer(), and edm::one::impl::SharedResourcesUser< T >::usesResource().
|
friend |
Definition at line 42 of file SharedResourcesRegistry.h.
|
static |
All legacy modules share this resource.
Definition at line 53 of file SharedResourcesRegistry.h.
Referenced by createAcquirer(), edm::EDAnalyzer::doBeginJob(), edm::EDProducer::doBeginJob(), edm::EDFilter::doBeginJob(), edm::EDAnalyzer::EDAnalyzer(), edm::EDFilter::EDFilter(), edm::EDProducer::EDProducer(), registerSharedResource(), and edm::one::impl::SharedResourcesUser< T >::usesResource().
|
private |
Definition at line 81 of file SharedResourcesRegistry.h.
Referenced by registerSharedResource().
|
private |
Definition at line 79 of file SharedResourcesRegistry.h.
Referenced by createAcquirerForSourceDelayedReader().
|
private |
Definition at line 77 of file SharedResourcesRegistry.h.
Referenced by createAcquirerForSourceDelayedReader().
|
private |
Definition at line 75 of file SharedResourcesRegistry.h.
Referenced by createAcquirer(), and registerSharedResource().