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
d5a4b3c8
Commit
d5a4b3c8
authored
10 months ago
by
Thomas Latham
Committed by
MarkusFrankATcernch
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Enhance handling of transformations in VolumeBuilder
parent
da374acf
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DDCore/include/XML/VolumeBuilder.h
+2
-0
2 additions, 0 deletions
DDCore/include/XML/VolumeBuilder.h
DDCore/src/XML/VolumeBuilder.cpp
+10
-0
10 additions, 0 deletions
DDCore/src/XML/VolumeBuilder.cpp
with
12 additions
and
0 deletions
DDCore/include/XML/VolumeBuilder.h
+
2
−
0
View file @
d5a4b3c8
...
@@ -187,6 +187,8 @@ namespace dd4hep {
...
@@ -187,6 +187,8 @@ namespace dd4hep {
/// Collect a set of materials from the leafs of an xml tag
/// Collect a set of materials from the leafs of an xml tag
size_t
collectMaterials
(
Handle_t
element
);
size_t
collectMaterials
(
Handle_t
element
);
/// Access element from transformation cache by name
Transform3D
getTransform
(
const
std
::
string
&
nam
)
const
;
/// Access element from shape cache by name. Invalid returns means 'veto'. Otherwise exception
/// Access element from shape cache by name. Invalid returns means 'veto'. Otherwise exception
Solid
getShape
(
const
std
::
string
&
nam
)
const
;
Solid
getShape
(
const
std
::
string
&
nam
)
const
;
/// Create a new shape from the information given in the xml handle
/// Create a new shape from the information given in the xml handle
...
...
This diff is collapsed.
Click to expand it.
DDCore/src/XML/VolumeBuilder.cpp
+
10
−
0
View file @
d5a4b3c8
...
@@ -94,6 +94,15 @@ dd4hep::Volume VolumeBuilder::volume(const std::string& nam) const {
...
@@ -94,6 +94,15 @@ dd4hep::Volume VolumeBuilder::volume(const std::string& nam) const {
return
vol
;
return
vol
;
}
}
/// Access element from transformation cache by name
dd4hep
::
Transform3D
VolumeBuilder
::
getTransform
(
const
std
::
string
&
nam
)
const
{
auto
it
=
transformations
.
find
(
nam
);
if
(
it
==
transformations
.
end
()
)
{
except
(
"VolumeBuilder"
,
"+++ Tranformation %s is not known to this builder unit. "
,
nam
.
c_str
());
}
return
(
*
it
).
second
.
second
;
}
/// Access element from shape cache by name. Invalid returns means 'veto'. Otherwise exception
/// Access element from shape cache by name. Invalid returns means 'veto'. Otherwise exception
dd4hep
::
Solid
VolumeBuilder
::
getShape
(
const
std
::
string
&
nam
)
const
{
dd4hep
::
Solid
VolumeBuilder
::
getShape
(
const
std
::
string
&
nam
)
const
{
auto
is
=
shapes
.
find
(
nam
);
auto
is
=
shapes
.
find
(
nam
);
...
@@ -434,6 +443,7 @@ std::size_t VolumeBuilder::load(xml_h element, const std::string& tag) {
...
@@ -434,6 +443,7 @@ std::size_t VolumeBuilder::load(xml_h element, const std::string& tag) {
"++ Processing xml document %s."
,
doc
->
uri
().
c_str
());
"++ Processing xml document %s."
,
doc
->
uri
().
c_str
());
included_docs
[
ref
]
=
std
::
unique_ptr
<
xml
::
DocumentHolder
>
(
doc
.
release
());
included_docs
[
ref
]
=
std
::
unique_ptr
<
xml
::
DocumentHolder
>
(
doc
.
release
());
buildShapes
(
vols
);
buildShapes
(
vols
);
buildTransformations
(
vols
);
buildVolumes
(
vols
);
buildVolumes
(
vols
);
++
count
;
++
count
;
}
}
...
...
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