Commit 46844776 authored by Patrick Koppenburg's avatar Patrick Koppenburg 🍃 Committed by Patrick Koppenburg
Browse files

GaudiExcpetion instead of crash when outside of a DVAlgorithm

parent c91a6ed0
Pipeline #3284699 passed with stages
in 23 seconds
...@@ -34,11 +34,21 @@ bool LoKi::AuxDesktopBase::allow_late_desktop_acquire( const bool allow ) { ...@@ -34,11 +34,21 @@ bool LoKi::AuxDesktopBase::allow_late_desktop_acquire( const bool allow ) {
} }
// constructor from the desktop // constructor from the desktop
LoKi::AuxDesktopBase::AuxDesktopBase( const IDVAlgorithm* desktop ) : LoKi::AuxFunBase(), m_desktop( desktop ) {} LoKi::AuxDesktopBase::AuxDesktopBase( const IDVAlgorithm* desktop ) : LoKi::AuxFunBase(), m_desktop( desktop ) {
if ( !desktop )
throw GaudiException( "\n### No IDVAlgorithm.\n### You cannot use this function from outside of a "
"DVAlgorithm.\n### Are you in FunTuple or an Hlt selection?",
"LoKi::AuxDesktopBase::AuxDesktopBase", StatusCode::FAILURE );
}
// constructor from the desktop // constructor from the desktop
LoKi::AuxDesktopBase::AuxDesktopBase( const LoKi::Interface<IDVAlgorithm>& desktop ) LoKi::AuxDesktopBase::AuxDesktopBase( const LoKi::Interface<IDVAlgorithm>& desktop )
: LoKi::AuxFunBase(), m_desktop( desktop ) {} : LoKi::AuxFunBase(), m_desktop( desktop ) {
if ( !desktop )
throw GaudiException( "\n### No IDVAlgorithm.\n### You cannot use this function from outside of a "
"DVAlgorithm.\n### Are you in FunTuple or an Hlt selection?",
"LoKi::AuxDesktopBase::AuxDesktopBase", StatusCode::FAILURE );
}
// copy constructor // copy constructor
LoKi::AuxDesktopBase::AuxDesktopBase( const LoKi::AuxDesktopBase& right ) LoKi::AuxDesktopBase::AuxDesktopBase( const LoKi::AuxDesktopBase& right )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment