/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/PluginManager/src/PresenceFactory.cc
33 строки
1 KB
Chris Jones
Remove DebugMacros.h
12 ноя 2025, 19:26
12 ноя 2025, 19:26
0b6cf47
Код
Авторство
О чём код?
#include "FWCore/PluginManager/interface/PresenceFactory.h" #include "FWCore/Utilities/interface/EDMException.h" #include "FWCore/Utilities/interface/thread_safety_macros.h" #include <iostream> EDM_REGISTER_PLUGINFACTORY(edm::PresencePluginFactory, "CMS EDM Framework Presence"); namespace edm { PresenceFactory::~PresenceFactory() {} PresenceFactory::PresenceFactory() {} PresenceFactory* PresenceFactory::get() { CMS_THREAD_SAFE static PresenceFactory singleInstance_; return &singleInstance_; } std::unique_ptr<Presence> PresenceFactory::makePresence(std::string const& presence_type) const { std::unique_ptr<Presence> sp(PresencePluginFactory::get()->create(presence_type)); if (sp.get() == nullptr) { throw edm::Exception(errors::Configuration, "NoPresenceModule") << "Presence Factory:\n" << "Cannot find presence type: " << presence_type << "\n" << "Perhaps the name is misspelled or is not a Plugin?\n" << "Try running EdmPluginDump to obtain a list of available Plugins."; } return sp; } } // namespace edm