From 53946d567d2f11acbae65daf2d12e76a14e80727 Mon Sep 17 00:00:00 2001 From: Joe Osborn Date: Thu, 14 Dec 2023 13:13:25 -0500 Subject: [PATCH] add 4 vector object --- edm4hep.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/edm4hep.yaml b/edm4hep.yaml index 8cd26e84a..6c4a458ca 100644 --- a/edm4hep.yaml +++ b/edm4hep.yaml @@ -6,6 +6,22 @@ options: includeSubfolder: True components: + + #Vector4f with floats + edm4eic::Vector4f: + Members: + - float x + - float y + - float z + - float t + ExtraCode: + declaration: " + constexpr Vector4f() : x(0),y(0),z(0),t(0) {}\n + constexpr Vector4f(float xx, float yy, float zz, float tt) : x(xx),y(yy),z(zz),t(tt) {}\n + constexpr Vector4f(const float* v) : x(v[0]),y(v[1]),z(v[2]),t(v[3]) {}\n + constexpr bool operator==(const Vector4f& v) const { return (x==v.x&&y==v.y&&z==v.z&&t==v.t) ; }\n + constexpr float operator[](unsigned i) const { return *( &x + i ) ; }\n + " # Vector3D with floats edm4hep::Vector3f: