From 1402de9a4b8b7dea2a323471898876f35587e65e Mon Sep 17 00:00:00 2001 From: tmadlener Date: Mon, 5 Feb 2024 15:34:29 +0100 Subject: [PATCH] Make transition transparent --- k4FWCore/components/PodioInput.cpp | 7 +++++++ .../components/ExampleFunctionalConsumerMultiple.cpp | 8 ++++++++ .../components/ExampleFunctionalProducerMultiple.cpp | 8 ++++++++ .../ExampleFunctionalTransformerMultiple.cpp | 8 ++++++++ .../k4FWCoreTest_CheckExampleEventData.cpp | 8 ++++++++ .../components/k4FWCoreTest_CheckExampleEventData.h | 4 ---- .../k4FWCoreTest_CreateExampleEventData.cpp | 1 - .../components/k4FWCoreTest_CreateExampleEventData.h | 12 +++++++++++- 8 files changed, 50 insertions(+), 6 deletions(-) diff --git a/k4FWCore/components/PodioInput.cpp b/k4FWCore/components/PodioInput.cpp index ca141de9..54f44886 100644 --- a/k4FWCore/components/PodioInput.cpp +++ b/k4FWCore/components/PodioInput.cpp @@ -45,7 +45,14 @@ #include "edm4hep/SimTrackerHitCollection.h" #include "edm4hep/TimeSeriesCollection.h" #include "edm4hep/TrackCollection.h" +#if __has_include("edm4hep/TrackerHit3DCollection.h") #include "edm4hep/TrackerHit3DCollection.h" +#else +#include "edm4hep/TrackerHitCollection.h" +namespace edm4hep { + using TrackerHit3DCollection = edm4hep::TrackerHitCollection; +} // namespace edm4hep +#endif #include "edm4hep/TrackerHitPlaneCollection.h" #include "edm4hep/TrackerPulseCollection.h" #include "edm4hep/VertexCollection.h" diff --git a/test/k4FWCoreTest/src/components/ExampleFunctionalConsumerMultiple.cpp b/test/k4FWCoreTest/src/components/ExampleFunctionalConsumerMultiple.cpp index fe6890c7..34ef2588 100644 --- a/test/k4FWCoreTest/src/components/ExampleFunctionalConsumerMultiple.cpp +++ b/test/k4FWCoreTest/src/components/ExampleFunctionalConsumerMultiple.cpp @@ -23,7 +23,15 @@ #include "edm4hep/MCParticleCollection.h" #include "edm4hep/SimTrackerHitCollection.h" #include "edm4hep/TrackCollection.h" +#if __has_include("edm4hep/TrackerHit3DCollection.h") #include "edm4hep/TrackerHit3DCollection.h" +#else +#include "edm4hep/TrackerHitCollection.h" +namespace edm4hep { + using TrackerHit3DCollection = edm4hep::TrackerHitCollection; +} // namespace edm4hep +#endif +#include "edm4hep/TrackerHitPlaneCollection.h" #include "podio/UserDataCollection.h" // Define BaseClass_t diff --git a/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp b/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp index 69b8c8a5..e63f1e64 100644 --- a/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp +++ b/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp @@ -24,7 +24,15 @@ #include "edm4hep/MCParticleCollection.h" #include "edm4hep/SimTrackerHitCollection.h" #include "edm4hep/TrackCollection.h" +#if __has_include("edm4hep/TrackerHit3DCollection.h") #include "edm4hep/TrackerHit3DCollection.h" +#else +#include "edm4hep/TrackerHitCollection.h" +namespace edm4hep { + using TrackerHit3DCollection = edm4hep::TrackerHitCollection; +} // namespace edm4hep +#endif +#include "edm4hep/TrackerHitPlaneCollection.h" #include "podio/UserDataCollection.h" #include diff --git a/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp b/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp index f2bb1f70..e84587fa 100644 --- a/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp +++ b/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp @@ -23,6 +23,14 @@ #include "edm4hep/MCParticleCollection.h" #include "edm4hep/SimTrackerHitCollection.h" #include "edm4hep/TrackCollection.h" +#if __has_include("edm4hep/TrackerHit3DCollection.h") +#include "edm4hep/TrackerHit3DCollection.h" +#else +#include "edm4hep/TrackerHitCollection.h" +namespace edm4hep { + using TrackerHit3DCollection = edm4hep::TrackerHitCollection; +} // namespace edm4hep +#endif #include "edm4hep/TrackerHit3DCollection.h" #include "podio/UserDataCollection.h" diff --git a/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.cpp b/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.cpp index 78d675a8..38be7565 100644 --- a/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.cpp +++ b/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.cpp @@ -23,7 +23,15 @@ #include "edm4hep/MCParticleCollection.h" #include "edm4hep/SimTrackerHitCollection.h" #include "edm4hep/TrackCollection.h" +#if __has_include("edm4hep/TrackerHit3DCollection.h") #include "edm4hep/TrackerHit3DCollection.h" +#else +#include "edm4hep/TrackerHitCollection.h" +namespace edm4hep { + using TrackerHit3DCollection = edm4hep::TrackerHitCollection; +} // namespace edm4hep +#endif +#include "edm4hep/TrackerHitPlaneCollection.h" DECLARE_COMPONENT(k4FWCoreTest_CheckExampleEventData) diff --git a/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.h b/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.h index 7c507d4b..92fe7ba0 100644 --- a/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.h +++ b/test/k4FWCoreTest/src/components/k4FWCoreTest_CheckExampleEventData.h @@ -29,10 +29,6 @@ // datamodel namespace edm4hep { class MCParticleCollection; - class SimTrackerHitCollection; - class TrackerHitCollection; - class SimCaloHitCollection; - class TrackCollection; } // namespace edm4hep class k4FWCoreTest_CheckExampleEventData : public GaudiAlgorithm { diff --git a/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.cpp b/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.cpp index 88d869b5..aac738e9 100644 --- a/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.cpp +++ b/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.cpp @@ -24,7 +24,6 @@ #include "edm4hep/MCParticleCollection.h" #include "edm4hep/SimTrackerHitCollection.h" #include "edm4hep/TrackCollection.h" -#include "edm4hep/TrackerHit3DCollection.h" #if __has_include("edm4hep/EDM4hepVersion.h") #include "edm4hep/EDM4hepVersion.h" #else diff --git a/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h b/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h index 7d260743..71431a6f 100644 --- a/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h +++ b/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h @@ -25,6 +25,17 @@ // key4hep #include "k4FWCore/DataHandle.h" +// edm4hep +#if __has_include("edm4hep/TrackerHit3DCollection.h") +#include "edm4hep/TrackerHit3DCollection.h" +#else +#include "edm4hep/TrackerHitCollection.h" +namespace edm4hep { + using TrackerHit3DCollection = edm4hep::TrackerHitCollection; +} // namespace edm4hep +#endif +#include "edm4hep/TrackerHitPlaneCollection.h" + // podio #include "podio/UserDataCollection.h" @@ -32,7 +43,6 @@ namespace edm4hep { class MCParticleCollection; class SimTrackerHitCollection; - class TrackerHit3DCollection; class SimCaloHitCollection; class TrackCollection; } // namespace edm4hep