Warning, file /DD4hep/UtilityApps/src/display.cpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "run_plugin.h"
0016
0017
0018 int main(int argc,char** argv) {
0019 std::vector<const char*> av;
0020 std::string level, visopt, opt, detector;
0021 bool dry = false, help = false;
0022 for(int i=0; i<argc; ++i) {
0023 if ( i==1 && argv[i][0] != '-' ) av.emplace_back("-input");
0024 if ( strncmp(argv[i],"-load-only",4) == 0 ) dry = true, av.emplace_back(argv[i]);
0025 else if ( strncmp(argv[i],"-dry-run",4) == 0 ) dry = true, av.emplace_back(argv[i]);
0026 else if ( strncmp(argv[i],"-h",2) == 0 ) help = true;
0027 else if ( strncmp(argv[i],"-help",4) == 0 ) help = true;
0028 else if ( strncmp(argv[i],"--help",4) == 0 ) help = true;
0029 else if ( strncmp(argv[i],"-visopt",4) == 0 ) visopt = argv[++i];
0030 else if ( strncmp(argv[i],"-level", 4) == 0 ) level = argv[++i];
0031 else if ( strncmp(argv[i],"-option",4) == 0 ) opt = argv[++i];
0032 else if ( strncmp(argv[i],"-detector",4) == 0 ) detector = argv[++i];
0033 else av.emplace_back(argv[i]);
0034 }
0035 if ( !dry ) {
0036 av.emplace_back("-interactive");
0037 av.emplace_back("-plugin");
0038 av.emplace_back("DD4hep_GeometryDisplay");
0039 if ( help ) av.emplace_back("-help");
0040 if ( !opt.empty() ) av.emplace_back("-opt"), av.emplace_back(opt.c_str());
0041 if ( !level.empty() ) av.emplace_back("-level"), av.emplace_back(level.c_str());
0042 if ( !visopt.empty() ) av.emplace_back("-visopt"), av.emplace_back(visopt.c_str());
0043 if ( !detector.empty() ) av.emplace_back("-detector"), av.emplace_back(detector.c_str());
0044 }
0045 return dd4hep::execute::main_plugins("DD4hep_GeometryDisplay", av.size(), (char**)&av[0]);
0046 }