18 int main(
int argc,
char** argv) {
19 std::vector<const char*> av;
20 std::string level, visopt, opt, detector;
21 bool dry =
false,
help =
false;
22 for(
int i=0; i<argc; ++i) {
23 if ( i==1 && argv[i][0] !=
'-' ) av.emplace_back(
"-input");
24 if ( strncmp(argv[i],
"-load-only",4) == 0 ) dry =
true, av.emplace_back(argv[i]);
25 else if ( strncmp(argv[i],
"-dry-run",4) == 0 ) dry =
true, av.emplace_back(argv[i]);
26 else if ( strncmp(argv[i],
"-help",4) == 0 )
help =
true, av.emplace_back(argv[i]);
27 else if ( strncmp(argv[i],
"-visopt",4) == 0 ) visopt = argv[++i];
28 else if ( strncmp(argv[i],
"-level", 4) == 0 ) level = argv[++i];
29 else if ( strncmp(argv[i],
"-option",4) == 0 ) opt = argv[++i];
30 else if ( strncmp(argv[i],
"-detector",4) == 0 ) detector = argv[++i];
31 else av.emplace_back(argv[i]);
34 av.emplace_back(
"-interactive");
35 av.emplace_back(
"-plugin");
36 av.emplace_back(
"DD4hep_GeometryDisplay");
37 if (
help ) av.emplace_back(
"-help");
38 if ( !opt.empty() ) av.emplace_back(
"-opt"), av.emplace_back(opt.c_str());
39 if ( !level.empty() ) av.emplace_back(
"-level"), av.emplace_back(level.c_str());
40 if ( !visopt.empty() ) av.emplace_back(
"-visopt"), av.emplace_back(visopt.c_str());
41 if ( !detector.empty() ) av.emplace_back(
"-detector"), av.emplace_back(detector.c_str());