diff --git a/UtilityApps/src/run_plugin.h b/UtilityApps/src/run_plugin.h index a62a84890..a0c2cf274 100644 --- a/UtilityApps/src/run_plugin.h +++ b/UtilityApps/src/run_plugin.h @@ -220,11 +220,11 @@ namespace { std::cout << "]" << std::endl << std::flush; } if ( name && name[0] ) { - result = run_plugin(description, name, a.first, a.second); - return result; + result = run_plugin(description, name, a.first, a.second); + return result; } std::cout << "WARNING: run_plugin: No plugin name supplied. " - << "Implicitly assuming execution steered by XML." << std::endl; + << "Implicitly assuming execution steered by XML." << std::endl; return ENOENT; } }; @@ -279,7 +279,7 @@ namespace dd4hep { } else { result = args.run(description, name); - } + } if ( result == EINVAL ) usage_default(name); } else { @@ -329,7 +329,7 @@ namespace dd4hep { !arguments.ui && !arguments.interpreter && arguments.plugins.empty() && - arguments.geo_files.empty() ) + arguments.geo_files.empty() ) { usage_plugin_runner(); } diff --git a/UtilityApps/src/teve_display.cpp b/UtilityApps/src/teve_display.cpp index 962997988..4272f279c 100644 --- a/UtilityApps/src/teve_display.cpp +++ b/UtilityApps/src/teve_display.cpp @@ -65,21 +65,32 @@ TEveStraightLineSet* getSurfaceVectors(bool addO=true, bool addU= true, bool add //===================================================================================== -static long teve_display(Detector& description, int /* argc */, char** /* argv */) { +static long teve_display(Detector& description, int argc, char** argv) { + int level = 4, visopt = 0, help = 0; + for( int i=0; i Visualization level [TGeoManager::SetVisLevel] Default: 4 \n" + " -visopt Visualization option [TGeoManager::SetVisOption] Default: 0 \n" + " -help Print this help output" << std::endl << std::flush; + ::exit(EINVAL); + } + TGeoManager* mgr = &description.manager(); mgr->SetNsegments(100); // Increase the visualization resolution. TEveManager::Create(); - // mgr->SetVisOption(1) ; - // mgr->SetVisLevel(4) ; - - // gEve->fGeometries->Add(new TObjString("DefaultGeometry"),mgr); - TEveGeoTopNode* tn = new TEveGeoTopNode(mgr, mgr->GetTopNode()); // option 0 in TEve seems to correspond to option 1 in TGeo ( used in geoDisplay ...) - tn->SetVisOption(0) ; - tn->SetVisLevel(4); + tn->SetVisOption(visopt) ; + tn->SetVisLevel(level); // // ---- try to set transparency - does not seem to work ... // TGeoNode* node1 = gGeoManager->GetTopNode(); @@ -130,13 +141,9 @@ static long teve_display(Detector& description, int /* argc */, char** /* argv * MultiView::instance()->ImportGeomRPhi( helperSurfaces ); MultiView::instance()->ImportGeomRhoZ( helperSurfaces ) ; - make_gui(); - next_event(); - gEve->FullRedraw3D(kTRUE); - return 1; } DECLARE_APPLY(DD4hepTEveDisplay,teve_display) @@ -145,18 +152,31 @@ DECLARE_APPLY(DD4hepTEveDisplay,teve_display) //===================================================================================================================== int main(int argc,char** argv) { - return dd4hep::execute::main_default("DD4hepTEveDisplay",argc,argv); + std::vector av; + std::string level, visopt, opt; + bool help = false; + for( int i=0; i