From 1ed87af653beac90f123378475d8727961a9eb20 Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Sat, 13 Apr 2024 20:15:23 +0200 Subject: [PATCH] Typename: do not inherit from std::pair because ROOT stopped working for this construct for some reason --- DDDigi/include/DDDigi/DigiAction.h | 8 +++++--- DDG4/include/DDG4/Geant4Action.h | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/DDDigi/include/DDDigi/DigiAction.h b/DDDigi/include/DDDigi/DigiAction.h index cccef3471..11ab4fd59 100644 --- a/DDDigi/include/DDDigi/DigiAction.h +++ b/DDDigi/include/DDDigi/DigiAction.h @@ -53,18 +53,20 @@ namespace dd4hep { * \version 1.0 * \ingroup DD4HEP_DIGITIZATION */ - class TypeName : public std::pair<std::string, std::string> { + class TypeName { public: + std::string first; + std::string second; /// Default constructor TypeName() = default; /// Copy constructor TypeName(const TypeName& copy) = default; /// Copy constructor from pair TypeName(const std::pair<std::string, std::string>& c) - : std::pair<std::string, std::string>(c) { } + : first(c.first), second(c.second) { } /// Initializing constructor TypeName(const std::string& typ, const std::string& nam) - : std::pair<std::string, std::string>(typ, nam) { } + : first(typ), second(nam) { } /// Assignment operator TypeName& operator=(const TypeName& copy) = default; /// Split string pair according to default delimiter ('/') diff --git a/DDG4/include/DDG4/Geant4Action.h b/DDG4/include/DDG4/Geant4Action.h index 289aed8e6..7e8f74f49 100644 --- a/DDG4/include/DDG4/Geant4Action.h +++ b/DDG4/include/DDG4/Geant4Action.h @@ -79,18 +79,20 @@ namespace dd4hep { * \version 1.0 * \ingroup DD4HEP_SIMULATION */ - class TypeName : public std::pair<std::string, std::string> { + class TypeName { public: + std::string first; + std::string second; /// Default constructor TypeName() = default; /// Copy constructor TypeName(const TypeName& copy) = default; /// Copy constructor from pair TypeName(const std::pair<std::string, std::string>& c) - : std::pair<std::string, std::string>(c) { } + : first(c.first), second(c.second) { } /// Initializing constructor TypeName(const std::string& typ, const std::string& nam) - : std::pair<std::string, std::string>(typ, nam) { } + : first(typ), second(nam) { } /// Assignment operator TypeName& operator=(const TypeName& copy) = default; /// Split string pair according to default delimiter ('/') -- GitLab