diff --git a/Calorimeter/CaloRec/src/CaloThinCellsByClusterAlg.cxx b/Calorimeter/CaloRec/src/CaloThinCellsByClusterAlg.cxx index 63ac265fa57a764048fea21053c8cab1382709bb..275e3964e1bdf727262995b31a2efd256639f279 100644 --- a/Calorimeter/CaloRec/src/CaloThinCellsByClusterAlg.cxx +++ b/Calorimeter/CaloRec/src/CaloThinCellsByClusterAlg.cxx @@ -40,6 +40,10 @@ StatusCode CaloThinCellsByClusterAlg::execute (const EventContext& ctx) const cells.thinAll(); SG::ReadHandle<xAOD::CaloClusterContainer> clusters (m_clusters, ctx); + if(!clusters.isValid()){ + ATH_MSG_WARNING( "Collection " << m_clusters.key()<<" is not valid"); + return StatusCode::SUCCESS; + } for (const xAOD::CaloCluster* clust : *clusters) { const CaloClusterCellLink* cellLinks = clust->getCellLinks(); if (!cellLinks) {