Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Alignment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
Alignment
Merge requests
!191
Fix DD4hep compilation
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix DD4hep compilation
sponce_fixDD4hep
into
master
Overview
14
Commits
1
Pipelines
6
Changes
3
Merged
Sebastien Ponce
requested to merge
sponce_fixDD4hep
into
master
3 years ago
Overview
14
Commits
1
Pipelines
6
Changes
3
Expand
0
0
Merge request reports
Viewing commit
3d487ad0
Show latest version
3 files
+
50
−
41
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
3d487ad0
Fix DD4hep compilation broken by previous commit
· 3d487ad0
Sebastien Ponce
authored
3 years ago
Alignment/AlignKernel/AlignKernel/DetectorElement.h
+
21
−
0
Options
@@ -107,6 +107,27 @@ namespace LHCb::Alignment {
de
.
applyToAllChildren
(
[
&
func
](
LHCb
::
Detector
::
DeIOV
item
)
{
func
(
LHCb
::
Alignment
::
DetectorElement
{
item
}
);
}
)
);
}
LHCb
::
Alignment
::
DetectorElement
getChild
(
const
std
::
string
&
part
)
{
#ifdef USE_DD4HEP
LHCb
::
Detector
::
detail
::
DeIOVObject
*
det
{
nullptr
};
m_data
.
applyToAllChildren
(
[
&
det
,
&
part
](
LHCb
::
Detector
::
DeIOV
item
)
{
if
(
item
.
name
()
==
part
)
det
=
item
.
access
();
}
);
if
(
det
)
return
LHCb
::
Detector
::
DeIOV
(
det
);
#else
auto
it
=
std
::
find_if
(
m_data
->
childBegin
(),
m_data
->
childEnd
(),
[
&
part
](
const
::
IDetectorElement
*
item
)
{
auto
&
name
=
item
->
name
();
return
name
.
length
()
>
part
.
length
()
&&
name
.
substr
(
name
.
length
()
-
part
.
length
()
)
==
part
&&
name
[
name
.
length
()
-
part
.
length
()
-
1
]
==
'/'
;
}
);
if
(
it
!=
m_data
->
childEnd
()
)
return
dynamic_cast
<
const
::
DetectorElement
*>
(
*
it
);
#endif
throw
GaudiException
(
"WriteAlignmentConditions : unable to find requested element : no child named "
+
part
+
" was found in "
+
name
(),
"GetElementsToBeAligned:"
,
StatusCode
::
FAILURE
);
}
auto
size
()
const
{
DELEGATE2
(
de
->
childIDetectorElements
().
size
(),
de
.
size
()
);
}
bool
operator
==
(
const
DetectorElement
&
other
)
const
{
return
m_data
==
other
.
m_data
;
}
Loading