Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:05:35

0001 #include <iostream>
0002 #include <string>
0003 
0004 #include "DetectorDescription/Core/interface/DDAlgorithm.h"
0005 #include "DetectorDescription/Core/interface/DDAlgorithmFactory.h"
0006 #include "DetectorDescription/Core/interface/DDCompactView.h"
0007 #include "FWCore/PluginManager/interface/PluginFactory.h"
0008 #include "FWCore/PluginManager/interface/PluginManager.h"
0009 #include "FWCore/PluginManager/interface/standard.h"
0010 
0011 int main(int, char **argv) {
0012   DDCompactView cpv;
0013   edmplugin::PluginManager::configure(edmplugin::standard::config());
0014   std::string name("test:DDTestAlgorithm");
0015   std::unique_ptr<DDAlgorithm> algo{DDAlgorithmFactory::get()->create(name)};
0016   if (algo) {
0017     const DDNumericArguments nArgs;
0018     const DDVectorArguments vArgs;
0019     const DDMapArguments mArgs;
0020     const DDStringArguments sArgs;
0021     const DDStringVectorArguments vsArgs;
0022     algo->initialize(nArgs, vArgs, mArgs, sArgs, vsArgs);
0023     algo->execute(cpv);
0024     std::cout << "OK\n";
0025   } else {
0026     std::cout << "SEVERE ERROR: algorithm not found in registered plugins!" << std::endl;
0027     std::cout << "              name=" << name << std::endl;
0028   }
0029   return 0;
0030 }