Skip to content
Snippets Groups Projects
Commit 8a2e1a4f authored by Andre Gunther's avatar Andre Gunther :island:
Browse files

Merge branch 'gunther-IR-parent-nullptr' into 'master'

InteractionRegion check if parent is nullptr before deref

See merge request !4495
parents 46330d46 47620044
No related branches found
No related tags found
1 merge request!4495InteractionRegion check if parent is nullptr before deref
Pipeline #7110344 passed
......@@ -49,7 +49,7 @@ namespace LHCb::Conditions {
InteractionRegion( const DeVP& vp, const Gaudi::Algorithm* parent = nullptr ) : m_parent{parent} {
// Set the interaction region from the position of the VeLo
// resolvers
if ( m_parent->msgLevel( MSG::DEBUG ) ) {
if ( m_parent && m_parent->msgLevel( MSG::DEBUG ) ) {
m_parent->debug() << "DetDesc: Using beamSpot from DeVP to set position of InteractionRegion." << endmsg;
}
avgPosition = vp.beamSpot();
......@@ -60,7 +60,7 @@ namespace LHCb::Conditions {
/// for use with DetDesc.
InteractionRegion( const YAML::Node& region, const Gaudi::Algorithm* parent = nullptr ) : m_parent{parent} {
//
if ( m_parent->msgLevel( MSG::DEBUG ) ) {
if ( m_parent && m_parent->msgLevel( MSG::DEBUG ) ) {
m_parent->debug() << "DetDesc: Using InteractionRegion condition." << endmsg;
}
......@@ -84,13 +84,13 @@ namespace LHCb::Conditions {
//
auto ir = lhcb.interactionRegion();
if ( ir ) {
if ( m_parent->msgLevel( MSG::DEBUG ) ) {
if ( m_parent && m_parent->msgLevel( MSG::DEBUG ) ) {
m_parent->debug() << "DD4HEP: Using InteractionRegion from DeLHCb." << endmsg;
}
avgPosition = ir->avgPosition;
spread = ir->spread;
} else {
if ( m_parent->msgLevel( MSG::DEBUG ) ) {
if ( m_parent && m_parent->msgLevel( MSG::DEBUG ) ) {
m_parent->debug() << "DD4HEP: Using beamSpot from DeVP to set position of InteractionRegion." << endmsg;
}
avgPosition = vp.beamSpot();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment