Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
02b73477
Commit
02b73477
authored
9 years ago
by
Markus Frank
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in display factories
parent
c91826b2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
DDEve/include/DDEve/Factories.h
+1
-1
1 addition, 1 deletion
DDEve/include/DDEve/Factories.h
DDEve/src/MultiView.cpp
+2
-2
2 additions, 2 deletions
DDEve/src/MultiView.cpp
DDEve/src/ViewMenu.cpp
+8
-8
8 additions, 8 deletions
DDEve/src/ViewMenu.cpp
with
11 additions
and
11 deletions
DDEve/include/DDEve/Factories.h
+
1
−
1
View file @
02b73477
...
@@ -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
This diff is collapsed.
Click to expand it.
DDEve/src/MultiView.cpp
+
2
−
2
View file @
02b73477
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
DDEve/src/ViewMenu.cpp
+
8
−
8
View file @
02b73477
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment