/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DetectorDescription/RegressionTest/test/algorithm_plugin_test.cpp
30 строк
1 KB
Cms Build
Clang-Format
20 июн 2019, 23:56
20 июн 2019, 23:56
7faa7c0
Код
Авторство
О чём код?
#include <iostream> #include <string> #include "DetectorDescription/Core/interface/DDAlgorithm.h" #include "DetectorDescription/Core/interface/DDAlgorithmFactory.h" #include "DetectorDescription/Core/interface/DDCompactView.h" #include "FWCore/PluginManager/interface/PluginFactory.h" #include "FWCore/PluginManager/interface/PluginManager.h" #include "FWCore/PluginManager/interface/standard.h" int main(int, char **argv) { DDCompactView cpv; edmplugin::PluginManager::configure(edmplugin::standard::config()); std::string name("test:DDTestAlgorithm"); std::unique_ptr<DDAlgorithm> algo{DDAlgorithmFactory::get()->create(name)}; if (algo) { const DDNumericArguments nArgs; const DDVectorArguments vArgs; const DDMapArguments mArgs; const DDStringArguments sArgs; const DDStringVectorArguments vsArgs; algo->initialize(nArgs, vArgs, mArgs, sArgs, vsArgs); algo->execute(cpv); std::cout << "OK\n"; } else { std::cout << "SEVERE ERROR: algorithm not found in registered plugins!" << std::endl; std::cout << " name=" << name << std::endl; } return 0; }