From a2c19c0a9a345405fffeafd9b5fc1caed527ead6 Mon Sep 17 00:00:00 2001 From: Ivan Razumov <ivan.razumov@cern.ch> Date: Thu, 16 Jan 2020 11:45:46 +0100 Subject: [PATCH 1/2] Update DD4hep to 01.11 to solve compilation issues and add it to Python3 toolchains --- cmake/toolchain/heptools-dev-base.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/toolchain/heptools-dev-base.cmake b/cmake/toolchain/heptools-dev-base.cmake index 19c7108cb8..b0819b725e 100644 --- a/cmake/toolchain/heptools-dev-base.cmake +++ b/cmake/toolchain/heptools-dev-base.cmake @@ -38,7 +38,6 @@ else() LCG_external_package(rpy2 2.8.6 ) LCG_external_package(networkx 2.2 ) LCG_external_package(matplotlib 2.2.4 ) - LCG_AA_project(DD4hep 01-10 ) LCG_external_package(4suite 1.0.2p1 ) LCG_external_package(astroid 1.6.6p1 author=1.6.6 ) LCG_external_package(contextlib2 0.5.5 ) @@ -90,6 +89,7 @@ if(${LCG_OS}${LCG_OSVERS} MATCHES centos7 AND ${LCG_COMP}${LCG_COMPVERS} MATCHES LCG_AA_project(Gaudi v32r2 GIT=https://gitlab.cern.ch/gaudi/Gaudi.git) endif() +LCG_AA_project(DD4hep 01-11 ) # Externals LCG_external_package(lcgenv 1.3.8 ) -- GitLab From a5d483284f86e525f25bcfb9c4145a8f77df25e4 Mon Sep 17 00:00:00 2001 From: Ivan Razumov <ivan.razumov@cern.ch> Date: Thu, 16 Jan 2020 11:56:51 +0100 Subject: [PATCH 2/2] Add patch for DD4hep 01-11 (only needed for macos?) --- projects/patches/DD4hep-01-11.patch | 70 +++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 projects/patches/DD4hep-01-11.patch diff --git a/projects/patches/DD4hep-01-11.patch b/projects/patches/DD4hep-01-11.patch new file mode 100644 index 0000000000..bdebe4b787 --- /dev/null +++ b/projects/patches/DD4hep-01-11.patch @@ -0,0 +1,70 @@ +--- GaudiPluginService/src/PluginService.cpp.orig 2019-08-26 17:23:22.000000000 +0200 ++++ GaudiPluginService/src/PluginService.cpp 2019-08-26 17:45:56.000000000 +0200 +@@ -42,29 +42,22 @@ + #define SINGLETON_LOCK + #endif + +-// string trimming functions taken from +-// http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring + #include <algorithm> + // trim from start +-static inline std::string <rim(std::string &s) { +- s.erase(s.begin(), +- std::find_if(s.begin(), s.end(), +- std::not1(std::ptr_fun<int, int>(std::isspace)))); +- return s; ++static inline std::string& ltrim(std::string& s) { ++ s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) {return !std::isspace(ch);})); ++ return s; + } + + // trim from end +-static inline std::string &rtrim(std::string &s) { +- s.erase(std::find_if(s.rbegin(), s.rend(), +- std::not1(std::ptr_fun<int, int>(std::isspace))) +- .base(), +- s.end()); +- return s; ++static inline std::string& rtrim(std::string& s) { ++ s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) {return !std::isspace(ch);}).base(), s.end()); ++ return s; + } ++ + // trim from both ends +-static inline std::string &trim(std::string &s) { +- return ltrim(rtrim(s)); +-} ++static inline std::string& trim( std::string& s ) { return ltrim( rtrim( s ) ); } ++ + + namespace { + /// Helper function used to set values in FactoryInfo data members only +--- DDCore/src/DetectorImp.cpp.orig 2019-08-26 17:58:05.000000000 +0200 ++++ DDCore/src/DetectorImp.cpp 2019-08-26 18:01:07.000000000 +0200 +@@ -104,7 +104,6 @@ + << "**************************************************** \n" + << endl ; + +- set_unexpected(std::unexpected); + set_terminate(std::terminate); + // this provokes ROOT seg fault and stack trace (comment out to avoid it) + exit(1) ; +@@ -153,7 +152,6 @@ + : TNamed(), DetectorData(), DetectorLoad(this), m_buildType(BUILD_NONE) + { + SetTitle("DD4hep detector description object"); +- set_unexpected( description_unexpected ) ; + set_terminate( description_unexpected ) ; + InstanceCount::increment(this); + //if ( gGeoManager ) delete gGeoManager; +--- DDCore/include/DD4hep/Memory.h.orig 2019-08-26 17:50:49.000000000 +0200 ++++ DDCore/include/DD4hep/Memory.h 2019-08-26 17:53:09.000000000 +0200 +@@ -30,7 +30,7 @@ + #include <memory> + + // Use std::auto_ptr<T> instead of std::unique_ptr<T> +-#define DD4HEP_DD4HEP_PTR_AUTO ++//#define DD4HEP_DD4HEP_PTR_AUTO + + /// Namespace for the AIDA detector description toolkit + namespace dd4hep { -- GitLab