From 84ae9582b503780603a5432fa7981b418c0157f2 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Wed, 22 Nov 2023 09:29:20 +0100 Subject: [PATCH 1/2] Fix missing include --- Utilities/DataHelper/src/TrackExtended.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/DataHelper/src/TrackExtended.cc b/Utilities/DataHelper/src/TrackExtended.cc index edf9d43bb..8a8ce6284 100644 --- a/Utilities/DataHelper/src/TrackExtended.cc +++ b/Utilities/DataHelper/src/TrackExtended.cc @@ -2,6 +2,7 @@ #include "DataHelper/TrackerHitExtended.h" #include "DataHelper/TrackExtended.h" #include +#include TrackExtended::TrackExtended( ) { _track = NULL; From e3a5e4741d49e73b7aaf78f0038434756b5f9500 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Wed, 22 Nov 2023 09:43:36 +0100 Subject: [PATCH 2/2] Make sure things work without a public constructor from Obj* That has been removed in AIDASoft/podio#514 and the makeEmpty factory method has been introduced instead. --- Analysis/TrackInspect/src/TrackInspectAlg.cpp | 6 ++++++ Reconstruction/PFA/Arbor/src/ArborToolLCIO.cc | 7 +++++++ .../Tracking/src/Clupatra/clupatra_new.cpp | 13 ++++++++++++- Reconstruction/Tracking/src/Clupatra/clupatra_new.h | 6 ++++++ Service/TrackSystemSvc/src/MarlinKalTestTrack.cc | 10 ++++++++-- Service/TrackSystemSvc/src/MarlinTrkUtils.cc | 7 +++++++ Utilities/DataHelper/src/TrackExtended.cc | 11 +++++++++++ 7 files changed, 57 insertions(+), 3 deletions(-) diff --git a/Analysis/TrackInspect/src/TrackInspectAlg.cpp b/Analysis/TrackInspect/src/TrackInspectAlg.cpp index 281df767c..2c41f2a98 100644 --- a/Analysis/TrackInspect/src/TrackInspectAlg.cpp +++ b/Analysis/TrackInspect/src/TrackInspectAlg.cpp @@ -39,6 +39,8 @@ #include "DataHelper/HelixClass.h" +#include "podio/podioVersion.h" + #include "CLHEP/Units/SystemOfUnits.h" #include #include @@ -179,7 +181,11 @@ StatusCode TrackInspectAlg::execute(){ if (theTracks.size() == 0) { totalCandidates[m_nParticles] = 0; nCandidate[m_nParticles] = -1; +#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4) Fill(particle, edm4hep::Track(nullptr)); +#else + Fill(particle, edm4hep::Track::makeEmpty()); +#endif m_nParticles++; } else { diff --git a/Reconstruction/PFA/Arbor/src/ArborToolLCIO.cc b/Reconstruction/PFA/Arbor/src/ArborToolLCIO.cc index d97a82d6e..6a1e0cc20 100644 --- a/Reconstruction/PFA/Arbor/src/ArborToolLCIO.cc +++ b/Reconstruction/PFA/Arbor/src/ArborToolLCIO.cc @@ -35,6 +35,8 @@ #include #include "DetInterface/IGeomSvc.h" +#include "podio/podioVersion.h" + using namespace std; /* void ClusterBuilding( LCEvent * evtPP, std::string Name, std::vector Hits, std::vector< std::vector > BranchOrder, int DHCALFlag ) @@ -859,7 +861,12 @@ edm4hep::ClusterCollection* ArborToolLCIO::ClusterVecMerge( std::vectorgetTrackState( lHit, tsLH, chi2, ndf ) ; #else // get the track state at the last hit by propagating from the last(first) constrained fit position (a la MarlinTrkUtils) +#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4) edm4hep::TrackerHit last_constrained_hit(0); +#else + auto last_constrained_hit = edm4hep::TrackerHit::makeEmpty(); +#endif code = mtrk->getTrackerHitAtPositiveNDF( last_constrained_hit ); //code = mtrk->smooth() ; if( code != MarlinTrk::IMarlinTrack::success ){ diff --git a/Reconstruction/Tracking/src/Clupatra/clupatra_new.h b/Reconstruction/Tracking/src/Clupatra/clupatra_new.h index 6ace630a7..af946bf25 100644 --- a/Reconstruction/Tracking/src/Clupatra/clupatra_new.h +++ b/Reconstruction/Tracking/src/Clupatra/clupatra_new.h @@ -30,6 +30,8 @@ #include "TrackSystemSvc/IMarlinTrack.h" #include "TrackSystemSvc/IMarlinTrkSystem.h" +#include "podio/podioVersion.h" + // ----- include for verbosity dependend logging --------- // #include "marlin/VerbosityLevels.h" @@ -57,7 +59,11 @@ namespace clupatra_new{ ClupaHit() :layer(-1), zIndex(-1), phiIndex(-1), +#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4) edm4hepHit(0), +#else + edm4hepHit(edm4hep::TrackerHit::makeEmpty()), +#endif pos(0.,0.,0.) {} int layer ; int zIndex ; diff --git a/Service/TrackSystemSvc/src/MarlinKalTestTrack.cc b/Service/TrackSystemSvc/src/MarlinKalTestTrack.cc index ffedd64ed..3ca601461 100644 --- a/Service/TrackSystemSvc/src/MarlinKalTestTrack.cc +++ b/Service/TrackSystemSvc/src/MarlinKalTestTrack.cc @@ -26,6 +26,8 @@ #include "gear/GEAR.h" #include "gear/BField.h" +#include "podio/podioVersion.h" + //#include "streamlog/streamlog.h" @@ -76,8 +78,12 @@ namespace MarlinTrk { MarlinKalTestTrack::MarlinKalTestTrack(MarlinKalTest* ktest) - : _ktest(ktest), _trackHitAtPositiveNDF(edm4hep::TrackerHit(0)) { - + : _ktest(ktest), +#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4) + _trackHitAtPositiveNDF(edm4hep::TrackerHit(0)) { +#else + _trackHitAtPositiveNDF(edm4hep::TrackerHit::makeEmpty()) { +#endif _kaltrack = new TKalTrack() ; _kaltrack->SetOwner() ; diff --git a/Service/TrackSystemSvc/src/MarlinTrkUtils.cc b/Service/TrackSystemSvc/src/MarlinTrkUtils.cc index 1e0372d3f..fcacb19cf 100644 --- a/Service/TrackSystemSvc/src/MarlinTrkUtils.cc +++ b/Service/TrackSystemSvc/src/MarlinTrkUtils.cc @@ -33,6 +33,8 @@ #include "TMatrixD.h" +#include "podio/podioVersion.h" + #define MIN_NDF 6 namespace MarlinTrk { @@ -492,9 +494,14 @@ namespace MarlinTrk { /////////////////////////////////////////////////////// edm4hep::TrackState* trkStateAtLastHit = new edm4hep::TrackState() ; + edm4hep::TrackerHit lastHit = hits_in_fit.front().first; +#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4) edm4hep::TrackerHit last_constrained_hit(0);// = 0 ; +#else + auto last_constrained_hit = edm4hep::TrackerHit::makeEmpty(); +#endif marlintrk->getTrackerHitAtPositiveNDF(last_constrained_hit); return_error = marlintrk->smooth(lastHit); diff --git a/Utilities/DataHelper/src/TrackExtended.cc b/Utilities/DataHelper/src/TrackExtended.cc index 8a8ce6284..7a2bf72dd 100644 --- a/Utilities/DataHelper/src/TrackExtended.cc +++ b/Utilities/DataHelper/src/TrackExtended.cc @@ -1,11 +1,18 @@ #include "DataHelper/ClusterExtended.h" #include "DataHelper/TrackerHitExtended.h" #include "DataHelper/TrackExtended.h" + +#include "podio/podioVersion.h" + #include #include TrackExtended::TrackExtended( ) { +#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4) _track = NULL; +#else + _track = edm4hep::Track::makeEmpty(); +#endif _superCluster = NULL; _trackerHitVector.clear(); _clusterVec.clear(); @@ -24,7 +31,11 @@ TrackExtended::TrackExtended(Track track) { TrackExtended::TrackExtended( TrackerHitExtended * trackerhit) { _trackerHitVector.clear(); _trackerHitVector.push_back(trackerhit); +#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4) _track = NULL; +#else + _track = edm4hep::Track::makeEmpty(); +#endif _superCluster = NULL; _clusterVec.clear(); _group = NULL;