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
bcc70a30
Commit
bcc70a30
authored
9 years ago
by
Frank Gaede
Browse files
Options
Downloads
Patches
Plain Diff
- added utility DD4hep::XML::setDetectorTypeFlag()
to set the TypeFlag from xml element <type_flag type="0x42"/>
parent
d85269fd
No related branches found
Branches containing commit
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/Utilities.h
+11
-0
11 additions, 0 deletions
DDCore/include/XML/Utilities.h
DDCore/src/XML/Utilities.cpp
+16
-0
16 additions, 0 deletions
DDCore/src/XML/Utilities.cpp
with
27 additions
and
0 deletions
DDCore/include/XML/Utilities.h
+
11
−
0
View file @
bcc70a30
...
@@ -47,6 +47,17 @@ namespace DD4hep {
...
@@ -47,6 +47,17 @@ namespace DD4hep {
Geometry
::
Volume
createPlacedEnvelope
(
DD4hep
::
Geometry
::
LCDD
&
lcdd
,
DD4hep
::
XML
::
Handle_t
e
,
Geometry
::
Volume
createPlacedEnvelope
(
DD4hep
::
Geometry
::
LCDD
&
lcdd
,
DD4hep
::
XML
::
Handle_t
e
,
DD4hep
::
Geometry
::
DetElement
sdet
)
;
DD4hep
::
Geometry
::
DetElement
sdet
)
;
/** Sets the type flag specified in the \<type_flags\> element for the given DetElement, example: <br>
@verbatim
<type_flags type=" DetType_TRACKER + DetType_PIXEL + DetType_VERTEX "/>
@endverbatim
* @author F.Gaede, DESY
*/
void
setDetectorTypeFlag
(
DD4hep
::
XML
::
Handle_t
e
,
DD4hep
::
Geometry
::
DetElement
sdet
)
;
}
/* End namespace XML */
}
/* End namespace XML */
}
/* End namespace DD4hep */
}
/* End namespace DD4hep */
#endif
/* DD4hep_XML_XMLUTILITIES_H */
#endif
/* DD4hep_XML_XMLUTILITIES_H */
This diff is collapsed.
Click to expand it.
DDCore/src/XML/Utilities.cpp
+
16
−
0
View file @
bcc70a30
...
@@ -122,3 +122,19 @@ Geometry::Volume DD4hep::XML::createPlacedEnvelope( DD4hep::Geometry::LCDD& lcdd
...
@@ -122,3 +122,19 @@ Geometry::Volume DD4hep::XML::createPlacedEnvelope( DD4hep::Geometry::LCDD& lcdd
return
envelope
;
return
envelope
;
}
}
void
DD4hep
::
XML
::
setDetectorTypeFlag
(
DD4hep
::
XML
::
Handle_t
e
,
DD4hep
::
Geometry
::
DetElement
sdet
){
xml_det_t
x_det
=
e
;
string
det_name
=
x_det
.
nameStr
();
xml_comp_t
x_dettype
=
x_det
.
child
(
DD4hep
::
XML
::
Strng_t
(
"type_flags"
)
)
;
unsigned
int
typeFlag
=
x_dettype
.
type
()
;
printout
(
DEBUG
,
"Utilities"
,
"+++ setDetectorTypeFlags for detector :%s set to 0x%x"
,
det_name
.
c_str
(),
typeFlag
)
;
sdet
.
setTypeFlag
(
typeFlag
)
;
}
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