/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/ServiceRegistry/src/ServiceRegistry.cc
93 строки
2 KB
W. David Dagenhart
Remove remnants of SubProcess from Service System
12 июн 2025, 01:11
12 июн 2025, 01:11
7ae4f6e
Код
Авторство
О чём код?
// -*- C++ -*- // // Package: ServiceRegistry // Class : ServiceRegistry // // Implementation: // <Notes on implementation> // // Original Author: Chris Jones // Created: Mon Sep 5 13:33:19 EDT 2005 // // user include files #include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" // system include files namespace edm { // // constants, enums and typedefs // // // static data member definitions // // // constructors and destructor // ServiceRegistry::ServiceRegistry() {} // ServiceRegistry::ServiceRegistry(ServiceRegistry const& rhs) { // // do actual copying here; // } ServiceRegistry::~ServiceRegistry() {} // // assignment operators // // ServiceRegistry const& ServiceRegistry::operator=(ServiceRegistry const& rhs) { // //An exception safe implementation is // ServiceRegistry temp(rhs); // swap(rhs); // // return *this; // } // // member functions // ServiceToken ServiceRegistry::setContext(ServiceToken const& iNewToken) { ServiceToken returnValue(manager_); manager_ = iNewToken.manager_; return returnValue; } void ServiceRegistry::unsetContext(ServiceToken const& iOldToken) { manager_ = iOldToken.manager_; } // // const member functions // ServiceToken ServiceRegistry::presentToken() const { return manager_; } // // static member functions // ServiceToken ServiceRegistry::createServicesFromConfig(std::unique_ptr<ParameterSet> params) { auto serviceSets = params->popVParameterSet(std::string("services")); //create the services return ServiceToken(ServiceRegistry::createSet(serviceSets)); } ServiceToken ServiceRegistry::createSet(std::vector<ParameterSet>& iPS) { using namespace serviceregistry; auto returnValue = std::make_shared<ServicesManager>(iPS); return ServiceToken(returnValue); } ServiceToken ServiceRegistry::createSet(std::vector<ParameterSet>& iPS, ServiceToken iToken, serviceregistry::ServiceLegacy iLegacy) { using namespace serviceregistry; auto returnValue = std::make_shared<ServicesManager>(iToken, iLegacy, iPS); return ServiceToken(returnValue); } ServiceRegistry& ServiceRegistry::instance() { static thread_local ServiceRegistry s_registry; return s_registry; } } // namespace edm