diff --git a/k4EDM4hep2LcioConv/src/k4Lcio2EDM4hepConv.cpp b/k4EDM4hep2LcioConv/src/k4Lcio2EDM4hepConv.cpp index 3266b8ed..19e411e9 100644 --- a/k4EDM4hep2LcioConv/src/k4Lcio2EDM4hepConv.cpp +++ b/k4EDM4hep2LcioConv/src/k4Lcio2EDM4hepConv.cpp @@ -747,8 +747,8 @@ namespace LCIO2EDM4hepConv { for (auto& [lcio, edm] : recoparticlesMap) { edmnum++; - const auto& vertex = lcio->getStartVertex(); - if (vertex != nullptr) { + const auto vertex = lcio->getStartVertex(); + if (vertex) { if (const auto it = vertexMap.find(vertex); it != vertexMap.end()) { edm.setStartVertex(it->second); } diff --git a/tests/src/CompareEDM4hepLCIO.cc b/tests/src/CompareEDM4hepLCIO.cc index e21d9a1c..5ec11710 100644 --- a/tests/src/CompareEDM4hepLCIO.cc +++ b/tests/src/CompareEDM4hepLCIO.cc @@ -3,6 +3,8 @@ #include "IMPL/TrackerHitImpl.h" +#include + /** * The basic implementation of the functionality has been generated via modified * podio templates, employing some handwritten macros to facilitate the task.