From 3eb1707806b172a0ef3f3032c800d723b1e95d4d Mon Sep 17 00:00:00 2001
From: Andrii Verbytskyi <averbyts@cern.ch>
Date: Fri, 4 Dec 2020 16:35:50 +0100
Subject: [PATCH] Use HepMC3 compatible types for the recently created
 interfaces

---
 .../GenInterfaces/GenInterfaces/IxAODtoHepMCTool.h       | 9 +++------
 .../TruthConverters/TruthConverters/xAODtoHepMCTool.h    | 6 +++---
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/Generators/GenInterfaces/GenInterfaces/IxAODtoHepMCTool.h b/Generators/GenInterfaces/GenInterfaces/IxAODtoHepMCTool.h
index 2045eee2f55..c673f6da67a 100644
--- a/Generators/GenInterfaces/GenInterfaces/IxAODtoHepMCTool.h
+++ b/Generators/GenInterfaces/GenInterfaces/IxAODtoHepMCTool.h
@@ -25,13 +25,10 @@
 #include "xAODEventInfo/EventInfo.h"
 #include "xAODTruth/TruthEventContainer.h"
 
-#include "HepMC/GenEvent.h"
+#include "AtlasHepMC/GenEvent.h"
+#include "AtlasHepMC/GenParticle.h"
+#include "AtlasHepMC/GenVertex.h"
 
-namespace HepMC {
-  class GenEvent;
-  class GenParticle;
-  class GenVertex;
-}
 
 class IxAODtoHepMCTool : public virtual asg::IAsgTool {
  public:
diff --git a/Generators/TruthConverters/TruthConverters/xAODtoHepMCTool.h b/Generators/TruthConverters/TruthConverters/xAODtoHepMCTool.h
index 15aa09edbef..c81acb12dcb 100644
--- a/Generators/TruthConverters/TruthConverters/xAODtoHepMCTool.h
+++ b/Generators/TruthConverters/TruthConverters/xAODtoHepMCTool.h
@@ -33,9 +33,9 @@ class xAODtoHepMCTool: public asg::AsgTool, public virtual IxAODtoHepMCTool {
 
  private:
    HepMC::GenEvent createHepMCEvent(const xAOD::TruthEvent* xEvt, const xAOD::EventInfo* eventInfo) const;
-   HepMC::GenVertex* vertexHelper(const xAOD::TruthVertex*,std::map<const xAOD::TruthVertex*,HepMC::GenVertex*>&,bool&) const;
-   HepMC::GenParticle* createHepMCParticle(const xAOD::TruthParticle*) const;
-   HepMC::GenVertex* createHepMCVertex(const xAOD::TruthVertex*) const;
+   HepMC::GenVertexPtr vertexHelper(const xAOD::TruthVertex*,std::map<const xAOD::TruthVertex*,HepMC::GenVertexPtr>&,bool&) const;
+   HepMC::GenParticlePtr createHepMCParticle(const xAOD::TruthParticle*) const;
+   HepMC::GenVertexPtr createHepMCVertex(const xAOD::TruthVertex*) const;
    void printxAODEvent(const xAOD::TruthEvent* event, const xAOD::EventInfo* eventInfo) const;
    
  private:
-- 
GitLab