39 resource.second.first = std::make_shared<SerialTaskQueue>();
45 ++queueAndCounter.second;
49 if (queueAndCounter.second == 1) {
51 queueAndCounter.first = std::make_shared<SerialTaskQueue>();
57 }
else if (queueAndCounter.second == 2) {
58 queueAndCounter.first = std::make_shared<SerialTaskQueue>();
63 std::pair<SharedResourcesAcquirer, std::shared_ptr<std::recursive_mutex>>
67 std::make_shared<std::recursive_mutex>();
89 std::map<std::pair<unsigned int, std::string>, std::shared_ptr<SerialTaskQueue>> sortedResources;
100 if (
resource.first.substr(0, 3) ==
"es_")
104 sortedResources.insert(
110 for (
auto const&
name : resourceNames) {
115 sortedResources.insert(
121 std::vector<std::shared_ptr<SerialTaskQueue>> queues;
122 queues.reserve(sortedResources.size());
123 for (
auto const&
resource : sortedResources) {
126 if (queues.empty()) {
129 queues.push_back(std::make_shared<SerialTaskQueue>());
edm::propagate_const< std::shared_ptr< SerialTaskQueue > > queueForDelayedReader_
SharedResourcesRegistry()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static SharedResourcesRegistry * instance()
std::map< std::string, std::pair< std::shared_ptr< SerialTaskQueue >, unsigned int > > resourceMap_
edm::propagate_const< std::shared_ptr< std::recursive_mutex > > resourceForDelayedReader_
void registerSharedResource(const std::string &)
A resource name must be registered before it can be used in the createAcquirer call.
constexpr T & get_underlying(propagate_const< T > &)
static const std::string kLegacyModuleResourceName
All legacy modules share this resource.
std::pair< SharedResourcesAcquirer, std::shared_ptr< std::recursive_mutex > > createAcquirerForSourceDelayedReader()
SharedResourcesAcquirer createAcquirer(std::vector< std::string > const &) const