#include <SharedResourcesRegistry.h>
Public Member Functions | |
SharedResourcesAcquirer | createAcquirer (std::vector< std::string > const &) const |
SharedResourcesAcquirer | 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_ |
std::shared_ptr < std::recursive_mutex > | resourceForDelayedReader_ |
std::map< std::string, std::pair< std::shared_ptr < std::recursive_mutex > , unsigned int > > | resourceMap_ |
Friends | |
class | ::testSharedResourcesRegistry |
Definition at line 36 of file SharedResourcesRegistry.h.
|
private |
Definition at line 31 of file SharedResourcesRegistry.cc.
|
privatedefault |
|
privatedelete |
SharedResourcesAcquirer SharedResourcesRegistry::createAcquirer | ( | std::vector< std::string > const & | resourceNames | ) | const |
Definition at line 78 of file SharedResourcesRegistry.cc.
References spr::find(), kLegacyModuleResourceName, mergeVDriftHistosByStation::name, and resourceMap_.
Referenced by edm::one::impl::SharedResourcesUser< T >::createAcquirer(), edm::EDAnalyzer::doBeginJob(), edm::EDProducer::doBeginJob(), edm::EDFilter::doBeginJob(), and edm::OutputModule::doBeginJob().
SharedResourcesAcquirer SharedResourcesRegistry::createAcquirerForSourceDelayedReader | ( | ) |
Definition at line 68 of file SharedResourcesRegistry.cc.
References resourceForDelayedReader_.
Referenced by edm::PoolSource::PoolSource().
|
static |
Definition at line 26 of file SharedResourcesRegistry.cc.
Referenced by edm::one::impl::SharedResourcesUser< T >::createAcquirer(), edm::EDAnalyzer::doBeginJob(), edm::EDProducer::doBeginJob(), edm::EDFilter::doBeginJob(), edm::OutputModule::doBeginJob(), edm::EDAnalyzer::EDAnalyzer(), edm::EDFilter::EDFilter(), edm::EDProducer::EDProducer(), edm::OutputModule::OutputModule(), edm::PoolSource::PoolSource(), 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 35 of file SharedResourcesRegistry.cc.
References kLegacyModuleResourceName, nLegacy_, and resourceMap_.
Referenced by edm::EDAnalyzer::EDAnalyzer(), edm::EDFilter::EDFilter(), edm::EDProducer::EDProducer(), edm::OutputModule::OutputModule(), and edm::one::impl::SharedResourcesUser< T >::usesResource().
|
friend |
Definition at line 41 of file SharedResourcesRegistry.h.
|
static |
All legacy modules share this resource.
Definition at line 51 of file SharedResourcesRegistry.h.
Referenced by createAcquirer(), edm::EDAnalyzer::doBeginJob(), edm::EDProducer::doBeginJob(), edm::EDFilter::doBeginJob(), edm::OutputModule::doBeginJob(), edm::EDAnalyzer::EDAnalyzer(), edm::EDFilter::EDFilter(), edm::EDProducer::EDProducer(), edm::OutputModule::OutputModule(), registerSharedResource(), and edm::one::impl::SharedResourcesUser< T >::usesResource().
|
private |
Definition at line 75 of file SharedResourcesRegistry.h.
Referenced by registerSharedResource().
|
private |
Definition at line 73 of file SharedResourcesRegistry.h.
Referenced by createAcquirerForSourceDelayedReader().
|
private |
Definition at line 71 of file SharedResourcesRegistry.h.
Referenced by createAcquirer(), and registerSharedResource().