Skip to content

Commit 294d546

Browse files
author
Dmitry Kalinkin
committed
src/tests: fix for EDM4hep 00-99-02
1 parent 592518f commit 294d546

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

src/tests/algorithms_test/calorimetry_CalorimeterClusterRecoCoG.cc

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
#include <edm4eic/ProtoClusterCollection.h>
1212
#include <edm4eic/unit_system.h>
1313
#include <edm4hep/CaloHitContributionCollection.h>
14+
#include <edm4hep/EDM4hepVersion.h>
1415
#include <edm4hep/MCParticleCollection.h>
1516
#include <edm4hep/RawCalorimeterHitCollection.h>
1617
#include <edm4hep/SimCalorimeterHitCollection.h>
18+
#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 2)
1719
#include <edm4hep/Vector2i.h>
20+
#endif
1821
#include <edm4hep/Vector3d.h>
1922
#include <edm4hep/Vector3f.h>
2023
#include <spdlog/common.h>
@@ -88,8 +91,10 @@ TEST_CASE("the calorimeter CoG algorithm runs", "[CalorimeterClusterRecoCoG]") {
8891
edm4hep::Vector3d(), // edm4hep::Vector3d endpoint
8992
edm4hep::Vector3f(), // edm4hep::Vector3f momentum
9093
edm4hep::Vector3f(), // edm4hep::Vector3f momentumAtEndpoint
91-
edm4hep::Vector3f(), // edm4hep::Vector3f spin
92-
edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
94+
edm4hep::Vector3f() // edm4hep::Vector3f spin
95+
#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 2)
96+
,edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
97+
#endif
9398
);
9499

95100
auto mcpart12 = mcparts_coll.create(
@@ -103,8 +108,10 @@ TEST_CASE("the calorimeter CoG algorithm runs", "[CalorimeterClusterRecoCoG]") {
103108
edm4hep::Vector3d(), // edm4hep::Vector3d endpoint
104109
edm4hep::Vector3f(), // edm4hep::Vector3f momentum
105110
edm4hep::Vector3f(), // edm4hep::Vector3f momentumAtEndpoint
106-
edm4hep::Vector3f(), // edm4hep::Vector3f spin
107-
edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
111+
edm4hep::Vector3f() // edm4hep::Vector3f spin
112+
#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 2)
113+
,edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
114+
#endif
108115
);
109116

110117
mcpart12.addToParents(mcpart11);
@@ -161,8 +168,10 @@ TEST_CASE("the calorimeter CoG algorithm runs", "[CalorimeterClusterRecoCoG]") {
161168
edm4hep::Vector3d(), // edm4hep::Vector3d endpoint
162169
edm4hep::Vector3f(), // edm4hep::Vector3f momentum
163170
edm4hep::Vector3f(), // edm4hep::Vector3f momentumAtEndpoint
164-
edm4hep::Vector3f(), // edm4hep::Vector3f spin
165-
edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
171+
edm4hep::Vector3f() // edm4hep::Vector3f spin
172+
#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 2)
173+
,edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
174+
#endif
166175
);
167176

168177
auto contrib2 = contribs_coll.create(0, // int32_t PDG

src/tests/algorithms_test/pid_lut_PIDLookup.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
#include <edm4eic/Cov4f.h>
77
#include <edm4eic/MCRecoParticleAssociationCollection.h>
88
#include <edm4eic/ReconstructedParticleCollection.h>
9+
#include <edm4hep/EDM4hepVersion.h>
910
#include <edm4hep/EventHeaderCollection.h>
1011
#include <edm4hep/MCParticleCollection.h>
1112
#include <edm4hep/ParticleIDCollection.h>
13+
#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 2)
1214
#include <edm4hep/Vector2i.h>
15+
#endif
1316
#include <edm4hep/Vector3d.h>
1417
#include <edm4hep/Vector3f.h>
1518
#include <spdlog/common.h>
@@ -72,8 +75,10 @@ TEST_CASE("particles acquire PID", "[PIDLookup]") {
7275
edm4hep::Vector3d(), // edm4hep::Vector3d endpoint
7376
edm4hep::Vector3f(), // edm4hep::Vector3f momentum
7477
edm4hep::Vector3f(), // edm4hep::Vector3f momentumAtEndpoint
75-
edm4hep::Vector3f(), // edm4hep::Vector3f spin
76-
edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
78+
edm4hep::Vector3f() // edm4hep::Vector3f spin
79+
#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 2)
80+
,edm4hep::Vector2i() // edm4hep::Vector2i colorFlow
81+
#endif
7782
);
7883

7984
auto assoc_in = assocs_in->create();

0 commit comments

Comments
 (0)