Skip to content
Snippets Groups Projects
Commit fcb67bca authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'AtlasErrorReportingPolicy' into 'master'

ATLAS error reporting policy for TrigJetSelectorMT algorithm

See merge request atlas/athena!29076
parents 03457c8d 8e08135e
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,10 @@ StatusCode TrigJetSelectorMT::execute() { ...@@ -75,7 +75,10 @@ StatusCode TrigJetSelectorMT::execute() {
"," << vertex->z() << ")" ); "," << vertex->z() << ")" );
const xAOD::Vertex *primaryVertex = getPrimaryVertex( vertexContainer ); const xAOD::Vertex *primaryVertex = getPrimaryVertex( vertexContainer );
if ( primaryVertex == nullptr ) return StatusCode::FAILURE; if ( primaryVertex == nullptr ) {
ATH_MSG_ERROR( "No primary vertex has been found for this event!" );
return StatusCode::FAILURE;
}
ATH_MSG_DEBUG( " ** PV = (" << primaryVertex->x() << ATH_MSG_DEBUG( " ** PV = (" << primaryVertex->x() <<
"," << primaryVertex->y() << "," << primaryVertex->y() <<
...@@ -152,12 +155,16 @@ StatusCode TrigJetSelectorMT::execute() { ...@@ -152,12 +155,16 @@ StatusCode TrigJetSelectorMT::execute() {
const xAOD::Vertex* TrigJetSelectorMT::getPrimaryVertex( const xAOD::VertexContainer* vertexContainer ) const { const xAOD::Vertex* TrigJetSelectorMT::getPrimaryVertex( const xAOD::VertexContainer* vertexContainer ) const {
// In case we need more complex selection // In case we need more complex selection
if ( vertexContainer->size() == 0 ) return nullptr; if ( vertexContainer->size() == 0 ) {
ATH_MSG_WARNING( "Vertex Container has size 0! This can't be right!" );
return nullptr;
}
for ( const xAOD::Vertex *vertex : *vertexContainer ) { for ( const xAOD::Vertex *vertex : *vertexContainer ) {
if ( vertex->vertexType() != xAOD::VxType::VertexType::PriVtx ) continue; if ( vertex->vertexType() != xAOD::VxType::VertexType::PriVtx ) continue;
return vertex; return vertex;
} }
ATH_MSG_WARNING( "None of the vertexes in the vertex container is a primary vertex!" );
return nullptr; return nullptr;
} }
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