Skip to content
Snippets Groups Projects
Commit 02b73477 authored by Markus Frank's avatar Markus Frank
Browse files

Fix bug in display factories

parent c91826b2
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,6 @@ namespace { ...@@ -43,6 +43,6 @@ namespace {
}; };
} }
#define DECLARE_VIEW_FACTORY(x) DD4HEP_PLUGINSVC_FACTORY(x,x,DD4hep::View*(DD4hep::Display*, const char*),__LINE__) #define DECLARE_VIEW_FACTORY(x) DD4HEP_PLUGINSVC_FACTORY(x,DD4hep_DDEve_##x,DD4hep::View*(DD4hep::Display*, const char*),__LINE__)
#endif // DD4HEP_DDEVE_FACTORIES_H #endif // DD4HEP_DDEVE_FACTORIES_H
...@@ -72,7 +72,7 @@ View& MultiView::Build(TEveWindow* slot) { ...@@ -72,7 +72,7 @@ View& MultiView::Build(TEveWindow* slot) {
v = PluginService::Create<View*>(typ.c_str(),m_eve,cfg.name.c_str()); v = PluginService::Create<View*>(typ.c_str(),m_eve,cfg.name.c_str());
} }
else { else {
v = PluginService::Create<View*>("DD4hep__RhoZProjection",m_eve,(m_name+" - RhoZ View").c_str()); v = PluginService::Create<View*>("DD4hep_DDEve_RhoZProjection",m_eve,(m_name+" - RhoZ View").c_str());
} }
(new_slot = pack->NewSlot())->MakeCurrent(); (new_slot = pack->NewSlot())->MakeCurrent();
_build(m_eve,v,new_slot); _build(m_eve,v,new_slot);
...@@ -84,7 +84,7 @@ View& MultiView::Build(TEveWindow* slot) { ...@@ -84,7 +84,7 @@ View& MultiView::Build(TEveWindow* slot) {
v = PluginService::Create<View*>(typ.c_str(),m_eve,cfg.name.c_str()); v = PluginService::Create<View*>(typ.c_str(),m_eve,cfg.name.c_str());
} }
else { else {
v = PluginService::Create<View*>("DD4hep__RhoPhiProjection",m_eve,(m_name+" - RPhi View").c_str()); v = PluginService::Create<View*>("DD4hep_DDEve_RhoPhiProjection",m_eve,(m_name+" - RPhi View").c_str());
} }
(new_slot = pack->NewSlot())->MakeCurrent(); (new_slot = pack->NewSlot())->MakeCurrent();
_build(m_eve,v,new_slot); _build(m_eve,v,new_slot);
......
...@@ -51,13 +51,13 @@ ViewMenu::~ViewMenu() { ...@@ -51,13 +51,13 @@ ViewMenu::~ViewMenu() {
void ViewMenu::Build(TGMenuBar* bar, int hints) { void ViewMenu::Build(TGMenuBar* bar, int hints) {
pair<string,string>* p = 0; pair<string,string>* p = 0;
PopupMenu* view_menu = this; PopupMenu* view_menu = this;
view_menu->AddEntry("3&D View", this, &ViewMenu::CreateView, p=new pair<string,string>("DD4hep__View3D","3D")); view_menu->AddEntry("3&D View", this, &ViewMenu::CreateView, p=new pair<string,string>("DD4hep_DDEve_View3D","3D"));
view_menu->AddEntry("Rho-&Z Projection", this, &ViewMenu::CreateView, p=new pair<string,string>("DD4hep__RhoZProjection","Rho-Z")); view_menu->AddEntry("Rho-&Z Projection", this, &ViewMenu::CreateView, p=new pair<string,string>("DD4hep_DDEve_RhoZProjection","Rho-Z"));
view_menu->AddEntry("Rho-&Phi Projection",this, &ViewMenu::CreateView, p=new pair<string,string>("DD4hep__RhoPhiProjection","Rho-Phi")); view_menu->AddEntry("Rho-&Phi Projection",this, &ViewMenu::CreateView, p=new pair<string,string>("DD4hep_DDEve_RhoPhiProjection","Rho-Phi"));
const Display::ViewConfigurations& vc = m_display->viewConfigurations(); const Display::ViewConfigurations& vc = m_display->viewConfigurations();
for(Display::ViewConfigurations::const_iterator i=vc.begin(); i!=vc.end(); ++i) { for(Display::ViewConfigurations::const_iterator i=vc.begin(); i!=vc.end(); ++i) {
const Display::ViewConfig& v = (*i).second; const Display::ViewConfig& v = (*i).second;
view_menu->AddEntry(v.name.c_str(), this, &ViewMenu::CreateView,p=new pair<string,string>("DD4hep__"+v.type,v.name)); view_menu->AddEntry(v.name.c_str(), this, &ViewMenu::CreateView,p=new pair<string,string>("DD4hep_DDEve_"+v.type,v.name));
} }
bar->AddPopup(m_title.c_str(),*view_menu, new TGLayoutHints(hints, 0, 4, 0, 0)); bar->AddPopup(m_title.c_str(),*view_menu, new TGLayoutHints(hints, 0, 4, 0, 0));
} }
...@@ -69,7 +69,7 @@ void ViewMenu::CreateView(TGMenuEntry*, void* ud) { ...@@ -69,7 +69,7 @@ void ViewMenu::CreateView(TGMenuEntry*, void* ud) {
} }
View* ViewMenu::CreateView(const std::string& type, const std::string& title) { View* ViewMenu::CreateView(const std::string& type, const std::string& title) {
pair<string,string> args("DD4hep__"+type,title); pair<string,string> args("DD4hep_DDEve_"+type,title);
View* v = PluginService::Create<View*>(type.c_str(),m_display,title.c_str()); View* v = PluginService::Create<View*>(type.c_str(),m_display,title.c_str());
BuildView(v); BuildView(v);
return v; return v;
...@@ -77,17 +77,17 @@ View* ViewMenu::CreateView(const std::string& type, const std::string& title) ...@@ -77,17 +77,17 @@ View* ViewMenu::CreateView(const std::string& type, const std::string& title)
/// Create a new 3D view /// Create a new 3D view
View* ViewMenu::CreateView3D(const std::string& title) { View* ViewMenu::CreateView3D(const std::string& title) {
return CreateView("DD4hep__View3D",title.c_str()); return CreateView("DD4hep_DDEve_View3D",title.c_str());
} }
/// Create a new R-Z view /// Create a new R-Z view
View* ViewMenu::CreateRhoZProjection(const std::string& title ) { View* ViewMenu::CreateRhoZProjection(const std::string& title ) {
return CreateView("DD4hep__RhoZProjection",title.c_str()); return CreateView("DD4hep_DDEve_RhoZProjection",title.c_str());
} }
/// Create a new R-Phi view /// Create a new R-Phi view
View* ViewMenu::CreateRhoPhiProjection(const std::string& title ) { View* ViewMenu::CreateRhoPhiProjection(const std::string& title ) {
return CreateView("DD4hep__RhoPhiProjection",title.c_str()); return CreateView("DD4hep_DDEve_RhoPhiProjection",title.c_str());
} }
/// Import Geometry data /// Import Geometry data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment