key4hep / EDM4hep

Generic event data model for HEP collider experiments
https://cern.ch/edm4hep
Apache License 2.0
25 stars 36 forks source link

Check for the size of the input for one of the constructors of the covariance matrices #347

Closed jmcarcell closed 4 months ago

jmcarcell commented 4 months ago

currently it's possible to set only the first N elements of the matrix. I think typically this will be mostly a mistake rather than intentionally filling only the first N.

Also static_cast to float, because with older GCC and Clang this is fine, newer GCC throws a warning and newer Clang a compilation error if it's a double. It's already in the name that it's a float in case it's coming from a double (and narrowing happens).

BEGINRELEASENOTES

ENDRELEASENOTES