From 4b4e47e7cb4cc9ca1ece776cbb8aa2be66492f6d Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Thu, 8 Feb 2024 09:35:04 +0100
Subject: [PATCH] Remove support for very old versions of ROOT < 6.10.0

---
 DDEve/DDEve/DDEve.C               |   4 -
 DDEve/DDEve/DDEve.cpp             |   2 +-
 DDEve/src/Display.cpp             | 193 +++++++++++++++---------------
 DDEve/src/EventControl.cpp        |  34 +++---
 DDEve/src/GenericEventHandler.cpp |  52 ++++----
 5 files changed, 132 insertions(+), 153 deletions(-)

diff --git a/DDEve/DDEve/DDEve.C b/DDEve/DDEve/DDEve.C
index 061f0456d..1d54daaee 100644
--- a/DDEve/DDEve/DDEve.C
+++ b/DDEve/DDEve/DDEve.C
@@ -32,12 +32,8 @@ void DDEve(const char* xmlConfig=0, const char* evtData=0)  {
   }
   ::snprintf(text,sizeof(text)," -I%s/include -D__DD4HEP_DDEVE_EXCLUSIVE__ -Wno-shadow -g -O0",dd4hep);
   gSystem->AddIncludePath(text);
-#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
   TString fname = "libDDG4IO";
   const char* io_lib = gSystem->FindDynamicLibrary(fname,kTRUE);
-#else
-  const char* io_lib = "libDDG4IO";
-#endif
   if ( io_lib )  {
     result = gSystem->Load("libDDG4IO");
     if ( 0 != result )  {
diff --git a/DDEve/DDEve/DDEve.cpp b/DDEve/DDEve/DDEve.cpp
index 13c5f1699..2ae6346e9 100644
--- a/DDEve/DDEve/DDEve.cpp
+++ b/DDEve/DDEve/DDEve.cpp
@@ -16,7 +16,7 @@
 #include <iostream>
 
 // ROOT include files
-#include "TRint.h"
+#include <TRint.h>
 #include "DDEve.C"
 
 int main(int argc, char** argv)    {
diff --git a/DDEve/src/Display.cpp b/DDEve/src/Display.cpp
index 140ce924a..5631b4404 100644
--- a/DDEve/src/Display.cpp
+++ b/DDEve/src/Display.cpp
@@ -12,50 +12,49 @@
 //==========================================================================
 
 // Framework include files
-#include "DDEve/View.h"
-#include "DDEve/Display.h"
-#include "DDEve/ViewMenu.h"
-#include "DDEve/DD4hepMenu.h"
-#include "DDEve/ElementList.h"
-#include "DDEve/GenericEventHandler.h"
-#include "DDEve/EveShapeContextMenu.h"
-#include "DDEve/EvePgonSetProjectedContextMenu.h"
-#include "DDEve/Utilities.h"
-#include "DDEve/DDEveEventData.h"
-#include "DDEve/HitActors.h"
-#include "DDEve/ParticleActors.h"
-
-#include "DD4hep/Detector.h"
-#include "DD4hep/DetectorData.h"
-#include "DD4hep/Printout.h"
+#include <DDEve/View.h>
+#include <DDEve/Display.h>
+#include <DDEve/ViewMenu.h>
+#include <DDEve/DD4hepMenu.h>
+#include <DDEve/ElementList.h>
+#include <DDEve/GenericEventHandler.h>
+#include <DDEve/EveShapeContextMenu.h>
+#include <DDEve/EvePgonSetProjectedContextMenu.h>
+#include <DDEve/Utilities.h>
+#include <DDEve/DDEveEventData.h>
+#include <DDEve/HitActors.h>
+#include <DDEve/ParticleActors.h>
+
+#include <DD4hep/Detector.h>
+#include <DD4hep/DetectorData.h>
+#include <DD4hep/Printout.h>
 
 // ROOT include files
-#include "TROOT.h"
-#include "TH2.h"
-#include "TFile.h"
-#include "TSystem.h"
-#include "TGTab.h"
-#include "TGMsgBox.h"
-#include "TGClient.h"
-#include "TGFileDialog.h"
-#include "TEveScene.h"
-#include "TEveBrowser.h"
-#include "TEveManager.h"
-#include "TEveCaloData.h"
-#include "TEveCalo.h"
-#include "TEveViewer.h"
-#include "TEveCompound.h"
-#include "TEveBoxSet.h"
-#include "TEvePointSet.h"
-#include "TEveGeoShape.h"
-#include "TEveTrackPropagator.h"
-#include "TGeoManager.h"
+#include <TROOT.h>
+#include <TH2.h>
+#include <TFile.h>
+#include <TSystem.h>
+#include <TGTab.h>
+#include <TGMsgBox.h>
+#include <TGClient.h>
+#include <TGFileDialog.h>
+#include <TEveScene.h>
+#include <TEveBrowser.h>
+#include <TEveManager.h>
+#include <TEveCaloData.h>
+#include <TEveCalo.h>
+#include <TEveViewer.h>
+#include <TEveCompound.h>
+#include <TEveBoxSet.h>
+#include <TEvePointSet.h>
+#include <TEveGeoShape.h>
+#include <TEveTrackPropagator.h>
+#include <TGeoManager.h>
 
 // C/C++ include files
 #include <stdexcept>
 #include <climits>
 
-using namespace std;
 using namespace dd4hep;
 using namespace dd4hep::detail;
 
@@ -194,15 +193,15 @@ void Display::ImportConfiguration(const DisplayConfiguration& config)   {
 }
 
 /// Access to calo data histograms by name as defined in the configuration
-Display::CalodataContext& Display::GetCaloHistogram(const string& nam)   {
+Display::CalodataContext& Display::GetCaloHistogram(const std::string& nam)   {
   Calodata::iterator i = m_calodata.find(nam);
   if ( i == m_calodata.end() )  {
     DataConfigurations::const_iterator j = m_calodataConfigs.find(nam);
     if ( j != m_calodataConfigs.end() )   {
       CalodataContext ctx;
       ctx.config = (*j).second;
-      string use = ctx.config.use;
-      string hits = ctx.config.hits;
+      std::string use = ctx.config.use;
+      std::string hits = ctx.config.hits;
       if ( use.empty() )  {
         const char* n = nam.c_str();
         const DisplayConfiguration::Calodata& cd = (*j).second.data.calodata;
@@ -245,13 +244,13 @@ Display::CalodataContext& Display::GetCaloHistogram(const string& nam)   {
 }
 
 /// Access a data filter by name. Data filters are used to customize views
-const Display::ViewConfig* Display::GetViewConfiguration(const string& nam)  const   {
+const Display::ViewConfig* Display::GetViewConfiguration(const std::string& nam)  const   {
   ViewConfigurations::const_iterator i = m_viewConfigs.find(nam);
   return (i == m_viewConfigs.end()) ? 0 : &((*i).second);
 }
 
 /// Access a data filter by name. Data filters are used to customize calodatas
-const Display::DataConfig* Display::GetCalodataConfiguration(const string& nam)  const   {
+const Display::DataConfig* Display::GetCalodataConfiguration(const std::string& nam)  const   {
   DataConfigurations::const_iterator i = m_calodataConfigs.find(nam);
   return (i == m_calodataConfigs.end()) ? 0 : &((*i).second);
 }
@@ -270,12 +269,8 @@ void Display::UnregisterEvents(View* view)   {
 }
 
 /// Open standard message box
-void Display::MessageBox(PrintLevel level, const string& text, const string& title) const   {
-#if ROOT_VERSION_CODE >= ROOT_VERSION(6,9,2)
-  string path = TString::Format("%s/", TROOT::GetIconPath().Data()).Data();
-#else
-  string path = TString::Format("%s/icons/", gSystem->Getenv("ROOTSYS")).Data();
-#endif
+void Display::MessageBox(PrintLevel level, const std::string& text, const std::string& title) const   {
+  std::string path = TString::Format("%s/", TROOT::GetIconPath().Data()).Data();
   const TGPicture* pic = 0;
   if ( level == VERBOSE )
     pic = client().GetPicture((path+"mb_asterisk_s.xpm").c_str());
@@ -294,7 +289,7 @@ void Display::MessageBox(PrintLevel level, const string& text, const string& tit
 }
 
 /// Popup XML file chooser. returns chosen file name; empty on cancel
-string Display::OpenXmlFileDialog(const string& default_dir)   const {
+string Display::OpenXmlFileDialog(const std::string& default_dir)   const {
   static const char *evtFiletypes[] = { 
     "xml files",    "*.xml",
     "XML files",    "*.XML",
@@ -307,7 +302,7 @@ string Display::OpenXmlFileDialog(const string& default_dir)   const {
   fi.fFilename  = 0;
   new TGFileDialog(client().GetRoot(), 0, kFDOpen, &fi);
   if ( fi.fFilename ) {
-    string ret = fi.fFilename;
+    std::string ret = fi.fFilename;
     if ( ret.find("file:") != 0 ) return "file:"+ret;
     return ret;
   }
@@ -315,7 +310,7 @@ string Display::OpenXmlFileDialog(const string& default_dir)   const {
 }
 
 /// Popup ROOT file chooser. returns chosen file name; empty on cancel
-string Display::OpenEventFileDialog(const string& default_dir)   const {
+string Display::OpenEventFileDialog(const std::string& default_dir)   const {
   static const char *evtFiletypes[] = { 
     "ROOT files",    "*.root",
     "SLCIO files",   "*.slcio",
@@ -372,38 +367,38 @@ void Display::OnNewEvent(EventHandler& handler )   {
   for(Types::const_iterator ityp=types.begin(); ityp!=types.end(); ++ityp)  {
     const Collections& colls = (*ityp).second;
     for(Collections::const_iterator j=colls.begin(); j!=colls.end(); ++j)   {
-      size_t len = (*j).second;
+      std::size_t len = (*j).second;
       if ( len > 0 )   {
-	const char* nam = (*j).first;
-	DataConfigurations::const_iterator icfg = m_collectionsConfigs.find(nam);
-	DataConfigurations::const_iterator cfgend = m_collectionsConfigs.end();
+        const char* nam = (*j).first;
+        DataConfigurations::const_iterator icfg = m_collectionsConfigs.find(nam);
+        DataConfigurations::const_iterator cfgend = m_collectionsConfigs.end();
         EventHandler::CollectionType typ = handler.collectionType(nam);
         if ( typ == EventHandler::CALO_HIT_COLLECTION ||
              typ == EventHandler::TRACKER_HIT_COLLECTION )  {
           if ( icfg != cfgend )  {
             const DataConfig& cfg = (*icfg).second;
-	    if ( ::toupper(cfg.use[0]) == 'T' || ::toupper(cfg.use[0]) == 'Y' )  {
-	      if ( cfg.hits == "PointSet" )  {
-		PointsetCreator cr(nam,len,cfg);
-		handler.collectionLoop((*j).first, cr);
-		ImportEvent(cr.element());
-	      }
-	      else if ( cfg.hits == "BoxSet" )  {
-		BoxsetCreator cr(nam,len,cfg);
-		handler.collectionLoop((*j).first, cr);
-		ImportEvent(cr.element());
-	      }
-	      else if ( cfg.hits == "TowerSet" )  {
-		TowersetCreator cr(nam,len,cfg);
-		handler.collectionLoop((*j).first, cr);
-		ImportEvent(cr.element());
-	      }
-	      else {  // Default is point set
-		PointsetCreator cr(nam,len);
-		handler.collectionLoop((*j).first, cr);
-		ImportEvent(cr.element());
-	      }
-	    }
+            if ( ::toupper(cfg.use[0]) == 'T' || ::toupper(cfg.use[0]) == 'Y' )  {
+              if ( cfg.hits == "PointSet" )  {
+                PointsetCreator cr(nam,len,cfg);
+                handler.collectionLoop((*j).first, cr);
+                ImportEvent(cr.element());
+              }
+              else if ( cfg.hits == "BoxSet" )  {
+                BoxsetCreator cr(nam,len,cfg);
+                handler.collectionLoop((*j).first, cr);
+                ImportEvent(cr.element());
+              }
+              else if ( cfg.hits == "TowerSet" )  {
+                TowersetCreator cr(nam,len,cfg);
+                handler.collectionLoop((*j).first, cr);
+                ImportEvent(cr.element());
+              }
+              else {  // Default is point set
+                PointsetCreator cr(nam,len);
+                handler.collectionLoop((*j).first, cr);
+                ImportEvent(cr.element());
+              }
+            }
           }
           else  {
             PointsetCreator cr(nam,len);
@@ -417,21 +412,21 @@ void Display::OnNewEvent(EventHandler& handler )   {
           // last track is gone ie. when we re-initialize the event scene
 
           // $$$ Do not know exactly what the field parameters mean
-	  if ( (icfg=m_collectionsConfigs.find("StartVertexPoints")) != cfgend )   {
-	    StartVertexCreator cr("StartVertexPoints", len, (*icfg).second);
-	    handler.collectionLoop((*j).first, cr);
-	    printout(INFO,"Display","+++ StartVertexPoints: Filled %d start vertex points.....",cr.count);
-	    ImportEvent(cr.element());
-	  }
-	  if ( (icfg=m_collectionsConfigs.find("MCParticles")) != cfgend )   {
-	    MCParticleCreator cr(new TEveTrackPropagator("","",new TEveMagFieldDuo(350, -3.5, 2.0)),
-				 new TEveCompound("MC_Particles","MC_Particles"),
-				 icfg == cfgend ? 0 : &((*icfg).second));
-	    handler.collectionLoop((*j).first, cr);
-	    printout(INFO,"Display","+++ StartVertexPoints: Filled %d patricle tracks.....",cr.count);
-	    cr.close();
-	    particles = cr.particles;
-	  }
+          if ( (icfg=m_collectionsConfigs.find("StartVertexPoints")) != cfgend )   {
+            StartVertexCreator cr("StartVertexPoints", len, (*icfg).second);
+            handler.collectionLoop((*j).first, cr);
+            printout(INFO,"Display","+++ StartVertexPoints: Filled %d start vertex points.....",cr.count);
+            ImportEvent(cr.element());
+          }
+          if ( (icfg=m_collectionsConfigs.find("MCParticles")) != cfgend )   {
+            MCParticleCreator cr(new TEveTrackPropagator("","",new TEveMagFieldDuo(350, -3.5, 2.0)),
+                                 new TEveCompound("MC_Particles","MC_Particles"),
+                                 icfg == cfgend ? 0 : &((*icfg).second));
+            handler.collectionLoop((*j).first, cr);
+            printout(INFO,"Display","+++ StartVertexPoints: Filled %d patricle tracks.....",cr.count);
+            cr.close();
+            particles = cr.particles;
+          }
         }
       }
     }
@@ -442,7 +437,7 @@ void Display::OnNewEvent(EventHandler& handler )   {
     CalodataContext& ctx = (*i).second;
     TH2F* h = ctx.eveHist->GetHist(0);
     EtaPhiHistogramActor actor(h);
-    size_t n = eventHandler().collectionLoop(ctx.config.hits, actor);
+    std::size_t n = eventHandler().collectionLoop(ctx.config.hits, actor);
     ctx.eveHist->DataChanged();
     printout(INFO,"FillEtaPhiHistogram","+++ %s: Filled %ld hits from %s....",
              ctx.calo3D->GetName(), n, ctx.config.hits.c_str());
@@ -467,7 +462,7 @@ TEveElementList& Display::GetGeo()   {
 }
 
 /// Access/Create a topic by name
-TEveElementList& Display::GetGeoTopic(const string& name)    {
+TEveElementList& Display::GetGeoTopic(const std::string& name)    {
   Topics::iterator i=m_geoTopics.find(name);
   if ( i == m_geoTopics.end() )  {
     TEveElementList* topic = new ElementList(name.c_str(), name.c_str(), true, true);
@@ -479,7 +474,7 @@ TEveElementList& Display::GetGeoTopic(const string& name)    {
 }
 
 /// Access/Create a topic by name. Throws exception if the topic does not exist
-TEveElementList& Display::GetGeoTopic(const string& name) const   {
+TEveElementList& Display::GetGeoTopic(const std::string& name) const   {
   Topics::const_iterator i=m_geoTopics.find(name);
   if ( i == m_geoTopics.end() )  {
     throw runtime_error("Display: Attempt to access non-existing geometry topic:"+name);
@@ -488,7 +483,7 @@ TEveElementList& Display::GetGeoTopic(const string& name) const   {
 }
 
 /// Access/Create a topic by name
-TEveElementList& Display::GetEveTopic(const string& name)    {
+TEveElementList& Display::GetEveTopic(const std::string& name)    {
   Topics::iterator i=m_eveTopics.find(name);
   if ( i == m_eveTopics.end() )  {
     TEveElementList* topic = new ElementList(name.c_str(), name.c_str(), true, true);
@@ -500,7 +495,7 @@ TEveElementList& Display::GetEveTopic(const string& name)    {
 }
 
 /// Access/Create a topic by name. Throws exception if the topic does not exist
-TEveElementList& Display::GetEveTopic(const string& name) const   {
+TEveElementList& Display::GetEveTopic(const std::string& name) const   {
   Topics::const_iterator i=m_eveTopics.find(name);
   if ( i == m_eveTopics.end() )  {
     throw runtime_error("Display: Attempt to access non-existing event topic:"+name);
@@ -514,12 +509,12 @@ void Display::ImportGeo(TEveElement* el)   {
 }
 
 /// Call to import geometry elements by topic
-void Display::ImportGeo(const string& topic, TEveElement* el)  { 
+void Display::ImportGeo(const std::string& topic, TEveElement* el)  { 
   GetGeoTopic(topic).AddElement(el);
 }
 
 /// Call to import event elements by topic
-void Display::ImportEvent(const string& topic, TEveElement* el)  { 
+void Display::ImportEvent(const std::string& topic, TEveElement* el)  { 
   GetEveTopic(topic).AddElement(el);
 }
 
diff --git a/DDEve/src/EventControl.cpp b/DDEve/src/EventControl.cpp
index a5c9e4ad9..d7824397b 100644
--- a/DDEve/src/EventControl.cpp
+++ b/DDEve/src/EventControl.cpp
@@ -12,10 +12,10 @@
 //==========================================================================
 
 // Framework include files
-#include "DDEve/Display.h"
-#include "DDEve/EventControl.h"
-#include "DDEve/EventHandler.h"
-#include "DD4hep/InstanceCount.h"
+#include <DDEve/Display.h>
+#include <DDEve/EventControl.h>
+#include <DDEve/EventHandler.h>
+#include <DD4hep/InstanceCount.h>
 
 // ROOT include files
 #include <TROOT.h>
@@ -25,12 +25,11 @@
 #include <TGFrame.h>
 #include <TGButton.h>
 #include <TG3DLine.h>
-#include "TGFileDialog.h"
+#include <TGFileDialog.h>
 
-#include "TTree.h"
+#include <TTree.h>
 #include <libgen.h>
 
-using namespace std;
 using namespace dd4hep;
 
 ClassImp(EventControl)
@@ -117,22 +116,22 @@ void EventControl::OnNewEvent(EventHandler& handler)   {
   typedef EventHandler::TypedEventCollections Types;
   typedef std::vector<EventHandler::Collection> Collections;
   const Types& types = handler.data();
-  size_t cnt = 1;
+  std::size_t cnt = 1;
   m_lines[0].second.first->SetText("Hit collection name");
   m_lines[0].second.second->SetText("No.Hits");
   for(const auto& t : types)  {
     const Collections& colls = t.second;
     Line line  = m_lines[cnt++];
-    string cl  = t.first;
-    size_t idx = cl.rfind("Geant4");
-    if ( idx != string::npos ) { 
+    std::string cl  = t.first;
+    std::size_t idx = cl.rfind("Geant4");
+    if ( idx != std::string::npos ) { 
       cl = cl.substr(idx);
       cl = cl.substr(0,cl.find('*'));
     }
-    else if ( (idx=cl.rfind("::")) != string::npos )  {
+    else if ( (idx=cl.rfind("::")) != std::string::npos )  {
       cl = cl.substr(idx+2);
-      if ( (idx=cl.rfind('*')) != string::npos ) cl = cl.substr(0,idx);
-      if ( (idx=cl.rfind('>')) != string::npos ) cl = cl.substr(0,idx);
+      if ( (idx=cl.rfind('*')) != std::string::npos ) cl = cl.substr(0,idx);
+      if ( (idx=cl.rfind('>')) != std::string::npos ) cl = cl.substr(0,idx);
     }
     line.second.first->SetTextColor(kRed);
     line.second.second->SetTextColor(kRed);
@@ -159,15 +158,12 @@ void EventControl::OnNewEvent(EventHandler& handler)   {
 
 /// User callback to add elements to the control
 void EventControl::OnBuild()   {
-#if ROOT_VERSION_CODE >= ROOT_VERSION(6,9,2)
-  string icondir = TString::Format("%s/", TROOT::GetIconPath().Data()).Data();
-#else
-  string icondir = TString::Format("%s/icons/", gSystem->Getenv("ROOTSYS")).Data();
-#endif
+  std::string icondir = TString::Format("%s/", TROOT::GetIconPath().Data()).Data();
   TGGroupFrame* group = new TGGroupFrame(m_frame,"Event I/O Control");
   TGCompositeFrame* top = new TGHorizontalFrame(group);
   TGPictureButton* b = 0;
   char text[1024];
+
   group->SetTitlePos(TGGroupFrame::kLeft);
   m_frame->AddFrame(group, new TGLayoutHints(kLHintsExpandX|kLHintsCenterX, 2, 2, 2, 2));
   m_eventGroup = group;
diff --git a/DDEve/src/GenericEventHandler.cpp b/DDEve/src/GenericEventHandler.cpp
index fa4f2043b..df213fa74 100644
--- a/DDEve/src/GenericEventHandler.cpp
+++ b/DDEve/src/GenericEventHandler.cpp
@@ -12,16 +12,16 @@
 //==========================================================================
 
 // Framework include files
-#include "DDEve/GenericEventHandler.h"
-#include "DD4hep/Primitives.h"
-#include "DD4hep/Factories.h"
-#include "DD4hep/Plugins.h"
+#include <DDEve/GenericEventHandler.h>
+#include <DD4hep/Primitives.h>
+#include <DD4hep/Factories.h>
+#include <DD4hep/Plugins.h>
 #include <stdexcept>
 
 /// ROOT include files
-#include "TROOT.h"
-#include "TGMsgBox.h"
-#include "TSystem.h"
+#include <TROOT.h>
+#include <TGMsgBox.h>
+#include <TSystem.h>
 #include <climits>
 
 using namespace std;
@@ -74,7 +74,7 @@ string GenericEventHandler::datasourceName() const {
 }
 
 /// Access to the collection type by name
-EventHandler::CollectionType GenericEventHandler::collectionType(const string& collection) const   {
+EventHandler::CollectionType GenericEventHandler::collectionType(const std::string& collection) const   {
   if ( m_current && m_current->hasEvent() )  {
     return m_current->collectionType(collection);
   }
@@ -82,7 +82,7 @@ EventHandler::CollectionType GenericEventHandler::collectionType(const string& c
 }
 
 /// Loop over collection and extract data
-size_t GenericEventHandler::collectionLoop(const string& collection, DDEveHitActor& actor) {
+std::size_t GenericEventHandler::collectionLoop(const std::string& collection, DDEveHitActor& actor) {
   if ( m_current && m_current->hasEvent() )  {
     return m_current->collectionLoop(collection,actor);
   }
@@ -90,7 +90,7 @@ size_t GenericEventHandler::collectionLoop(const string& collection, DDEveHitAct
 }
 
 /// Loop over collection and extract particle data
-size_t GenericEventHandler::collectionLoop(const string& collection, DDEveParticleActor& actor)    {
+std::size_t GenericEventHandler::collectionLoop(const std::string& collection, DDEveParticleActor& actor)    {
   if ( m_current && m_current->hasEvent() )  {
     return m_current->collectionLoop(collection,actor);
   }
@@ -98,23 +98,23 @@ size_t GenericEventHandler::collectionLoop(const string& collection, DDEvePartic
 }
 
 /// Open a new event data file
-bool GenericEventHandler::Open(const string& file_type, const string& file_name)   {
-  size_t idx = file_name.find("lcio");
-  size_t idr = file_name.find("root");
-  string err;
+bool GenericEventHandler::Open(const std::string& file_type, const std::string& file_name)   {
+  std::size_t idx = file_name.find("lcio");
+  std::size_t idr = file_name.find("root");
+  std::string err;
   m_hasFile = false;
   m_hasEvent = false;
   try  {
     detail::deletePtr(m_current);
     //  prefer event handler configured in xml
-    if ( file_type.find("FCC") != string::npos ) {
+    if ( file_type.find("FCC") != std::string::npos ) {
       m_current = (EventHandler*)PluginService::Create<void*>("DD4hep_DDEve_FCCEventHandler",(const char*)0);
     }
     // fall back to defaults according to file ending
-    else if ( idx != string::npos )   {
+    else if ( idx != std::string::npos )   {
       m_current = (EventHandler*)PluginService::Create<void*>("DD4hep_DDEve_LCIOEventHandler",(const char*)0);
     }
-    else if ( idr != string::npos )   {
+    else if ( idr != std::string::npos )   {
       m_current = (EventHandler*)PluginService::Create<void*>("DD4hep_DDEve_DDG4EventHandler",(const char*)0);
     }
     else   {
@@ -135,13 +135,9 @@ bool GenericEventHandler::Open(const string& file_type, const string& file_name)
   }
   catch(const exception& e)  {
     err = "\nAn exception occurred \n"
-      "while opening event data:\n" + string(e.what()) + "\n\n";
+      "while opening event data:\n" + std::string(e.what()) + "\n\n";
   }
-#if ROOT_VERSION_CODE >= ROOT_VERSION(6,9,2)
-  string path = TString::Format("%s/stop_t.xpm", TROOT::GetIconPath().Data()).Data();
-#else
-  string path = TString::Format("%s/icons/stop_t.xpm", gSystem->Getenv("ROOTSYS")).Data();
-#endif
+  std::string path = TString::Format("%s/stop_t.xpm", TROOT::GetIconPath().Data()).Data();
   const TGPicture* pic = gClient->GetPicture(path.c_str());
   new TGMsgBox(gClient->GetRoot(),0,"Failed to open event data",err.c_str(),pic,
                kMBDismiss,0,kVerticalFrame,kTextLeft|kTextCenterY);
@@ -162,13 +158,9 @@ bool GenericEventHandler::NextEvent()   {
     throw runtime_error("+++ EventHandler::readEvent: No file open!");
   }
   catch(const exception& e)  {
-#if ROOT_VERSION_CODE >= ROOT_VERSION(6,9,2)
-    string path = TString::Format("%s/stop_t.xpm", TROOT::GetIconPath().Data()).Data();
-#else
-    string path = TString::Format("%s/icons/stop_t.xpm", gSystem->Getenv("ROOTSYS")).Data();
-#endif
-    string err = "\nAn exception occurred \n"
-      "while reading a new event:\n" + string(e.what()) + "\n\n";
+    std::string path = TString::Format("%s/stop_t.xpm", TROOT::GetIconPath().Data()).Data();
+    std::string err = "\nAn exception occurred \n"
+      "while reading a new event:\n" + std::string(e.what()) + "\n\n";
     const TGPicture* pic = gClient->GetPicture(path.c_str());
     new TGMsgBox(gClient->GetRoot(),0,"Failed to read event", err.c_str(),pic,
                  kMBDismiss,0,kVerticalFrame,kTextLeft|kTextCenterY);
-- 
GitLab