/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/Framework/src/InputSourceFactory.cc
43 строки
1 KB
Chris Jones
Remove DebugMacros.h
12 ноя 2025, 19:26
12 ноя 2025, 19:26
0b6cf47
Код
Авторство
О чём код?
#include "FWCore/Framework/interface/maker/InputSourceFactory.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/EDMException.h" #include <iostream> EDM_REGISTER_PLUGINFACTORY(edm::InputSourcePluginFactory, "CMS EDM Framework InputSource"); namespace edm { InputSourceFactory::~InputSourceFactory() {} InputSourceFactory::InputSourceFactory() {} InputSourceFactory const InputSourceFactory::singleInstance_; InputSourceFactory const* InputSourceFactory::get() { // will not work with plugin factories //static InputSourceFactory f; //return &f; return &singleInstance_; } std::unique_ptr<InputSource> InputSourceFactory::makeInputSource(ParameterSet const& conf, InputSourceDescription const& desc) const { std::string modtype = conf.getParameter<std::string>("@module_type"); auto wm = InputSourcePluginFactory::get()->create(modtype, conf, desc); if (wm.get() == nullptr) { throw edm::Exception(errors::Configuration, "NoSourceModule") << "InputSource Factory:\n" << "Cannot find source type from ParameterSet: " << modtype << "\n" << "Perhaps your source type is misspelled or is not an EDM Plugin?\n" << "Try running EdmPluginDump to obtain a list of available Plugins."; } wm->registerProducts(); return wm; } } // namespace edm