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
d3d3d18b
Commit
d3d3d18b
authored
3 years ago
by
Markus Frank
Committed by
MarkusFrankATcernch
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove another occurrency of a call to G4::GetPropertyIndex() with 2nd. argument
parent
9ef9c774
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/src/Geant4Converter.cpp
+15
-3
15 additions, 3 deletions
DDG4/src/Geant4Converter.cpp
with
15 additions
and
3 deletions
DDG4/src/Geant4Converter.cpp
+
15
−
3
View file @
d3d3d18b
...
@@ -385,7 +385,6 @@ void* Geant4Converter::handleMaterial(const string& name, Material medium) const
...
@@ -385,7 +385,6 @@ void* Geant4Converter::handleMaterial(const string& name, Material medium) const
tab
=
new
G4MaterialPropertiesTable
();
tab
=
new
G4MaterialPropertiesTable
();
mat
->
SetMaterialPropertiesTable
(
tab
);
mat
->
SetMaterialPropertiesTable
(
tab
);
}
}
string
err
;
int
idx
=
-
1
;
int
idx
=
-
1
;
try
{
try
{
idx
=
tab
->
GetPropertyIndex
(
named
->
GetName
());
idx
=
tab
->
GetPropertyIndex
(
named
->
GetName
());
...
@@ -1185,6 +1184,7 @@ void* Geant4Converter::handleOpticalSurface(TObject* surface) const {
...
@@ -1185,6 +1184,7 @@ void* Geant4Converter::handleOpticalSurface(TObject* surface) const {
G4MaterialPropertiesTable
*
tab
=
0
;
G4MaterialPropertiesTable
*
tab
=
0
;
TListIter
it
(
&
optSurf
->
GetProperties
());
TListIter
it
(
&
optSurf
->
GetProperties
());
for
(
TObject
*
obj
=
it
.
Next
();
obj
;
obj
=
it
.
Next
())
{
for
(
TObject
*
obj
=
it
.
Next
();
obj
;
obj
=
it
.
Next
())
{
string
exc_str
;
TNamed
*
named
=
(
TNamed
*
)
obj
;
TNamed
*
named
=
(
TNamed
*
)
obj
;
TGDMLMatrix
*
matrix
=
info
.
manager
->
GetGDMLMatrix
(
named
->
GetTitle
());
TGDMLMatrix
*
matrix
=
info
.
manager
->
GetGDMLMatrix
(
named
->
GetTitle
());
if
(
0
==
tab
)
{
if
(
0
==
tab
)
{
...
@@ -1197,9 +1197,21 @@ void* Geant4Converter::handleOpticalSurface(TObject* surface) const {
...
@@ -1197,9 +1197,21 @@ void* Geant4Converter::handleOpticalSurface(TObject* surface) const {
except
(
"Geant4OpticalSurface"
,
"++ Failed to convert opt.surface %s. Property table %s is not defined!"
,
except
(
"Geant4OpticalSurface"
,
"++ Failed to convert opt.surface %s. Property table %s is not defined!"
,
optSurf
->
GetName
(),
named
->
GetTitle
());
optSurf
->
GetName
(),
named
->
GetTitle
());
}
}
int
idx
=
tab
->
GetPropertyIndex
(
named
->
GetName
(),
false
);
int
idx
=
-
1
;
try
{
idx
=
tab
->
GetPropertyIndex
(
named
->
GetName
());
}
catch
(
const
std
::
exception
&
e
)
{
exc_str
=
e
.
what
();
idx
=
-
1
;
}
catch
(...)
{
idx
=
-
1
;
}
if
(
idx
<
0
)
{
if
(
idx
<
0
)
{
printout
(
ERROR
,
"Geant4Converter"
,
"++ UNKNOWN Geant4 Property: %-20s [IGNORED]"
,
named
->
GetName
());
printout
(
ERROR
,
"Geant4Converter"
,
"++ UNKNOWN Geant4 Property: %-20s %s [IGNORED]"
,
exc_str
.
c_str
(),
named
->
GetName
());
continue
;
continue
;
}
}
// We need to convert the property from TGeo units to Geant4 units
// We need to convert the property from TGeo units to Geant4 units
...
...
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