diff --git a/tests/src/ComparisonUtils.h b/tests/src/ComparisonUtils.h index 267d36d5..2454c4ab 100644 --- a/tests/src/ComparisonUtils.h +++ b/tests/src/ComparisonUtils.h @@ -7,6 +7,12 @@ #include "edm4hep/Vector2i.h" #include "edm4hep/Vector3d.h" #include "edm4hep/Vector3f.h" +#if __has_include("edm4hep/CovMatrix3f.h") +#include +#include +#include +#include +#endif #include "UTIL/LCIterator.h" #include "EVENT/LCCollection.h" @@ -74,9 +80,22 @@ constexpr bool isAnyOf = (std::is_same_v || ...); template bool compareValuesNanSafe(LCIO lcioV, EDM4hepT edm4hepV, const std::string& msg) { - constexpr auto isVectorLike = - has_size_method::value || - isAnyOf; + constexpr auto isVectorLike = has_size_method::value || isAnyOf< + EDM4hepT, + edm4hep::Vector3f, + edm4hep::Vector3d, + edm4hep::Vector2f, + edm4hep::Vector2i +#if __has_include("edm4hep/CovMatrix3f.h") + , + // These also effectively behave like vectors for + // the purposes of this function + edm4hep::CovMatrix2f, + edm4hep::CovMatrix3f, + edm4hep::CovMatrix4f, + edm4hep::CovMatrix6f +#endif + >; if constexpr (isVectorLike) { const auto vecSize = [&edm4hepV]() -> std::size_t {