diff --git a/GaudiPluginService/CMakeLists.txt b/GaudiPluginService/CMakeLists.txt index 1099b76b8d3282610772b397ed468cd2657c10fe..277e55d95325b274f4c495b2ecbc8a5b1b7fca40 100644 --- a/GaudiPluginService/CMakeLists.txt +++ b/GaudiPluginService/CMakeLists.txt @@ -9,9 +9,9 @@ add_definitions(-DGaudi=DD4hep_Flavor -DUSE_BOOST_FILESYSTEM) if( APPLE ) add_definitions( -DAPPLE) endif() -#target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-unused-function) +target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-unused) target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-deprecated) -#target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-shadow) +target_compile_options(DD4hepGaudiPluginMgr PRIVATE -Wno-shadow) target_link_libraries(DD4hepGaudiPluginMgr ${CMAKE_DL_LIBS} ${Boost_FILESYSTEM_LIBRARY} ) SET_TARGET_PROPERTIES(DD4hepGaudiPluginMgr PROPERTIES VERSION ${DD4hep_VERSION} SOVERSION ${DD4hep_SOVERSION}) diff --git a/GaudiPluginService/interface/DD4hep.cpp b/GaudiPluginService/interface/DD4hep.cpp index 7660cbf6dfe3ed507041ef9220525cdae57a4a90..c87c2c755a024027c130cfdd7a0777d2055a3ad2 100644 --- a/GaudiPluginService/interface/DD4hep.cpp +++ b/GaudiPluginService/interface/DD4hep.cpp @@ -27,32 +27,19 @@ namespace std { } // namespace std #endif -#define Gaudi DD4hep_Flavor - #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wkeyword-macro" +#pragma clang diagnostic pop #endif - #define GAUDI_PLUGIN_SERVICE_V2 1 -#ifndef GAUDI_PLUGIN_SERVICE_V2 -#define private public -#endif // This define will give us a version of the gaudi plugin manager, // which will NOT clash with Gaudi! It of course has a correspondance in the // compiler options of the GaudiPluginService package. #include <Gaudi/PluginService.h> -#ifndef GAUDI_PLUGIN_SERVICE_V2 -#undef private -#endif - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - #ifdef GAUDI_PLUGIN_SERVICE_USE_V2 using namespace Gaudi::PluginService::v2; #endif @@ -69,7 +56,7 @@ extern "C" { return debug; } /// Access factory by name - std::any dd4hep_pluginmgr_create(const char* id, const char* sig) { + std::any dd4hep_pluginmgr_create(const char* id, const char* /* sig */) { #ifdef GAUDI_PLUGIN_SERVICE_USE_V2 const Details::Registry::FactoryInfo& info = Details::Registry::instance().getInfo(id, true); return info.factory; @@ -79,7 +66,7 @@ extern "C" { } #ifdef GAUDI_PLUGIN_SERVICE_USE_V2 /// Add a new factory to the registry - void dd4hep_pluginmgr_add_factory(const char* id, std::any&& stub, const char* sig, const char* ret) { + void dd4hep_pluginmgr_add_factory(const char* id, std::any&& stub, const char* /* sig */, const char* /* ret */) { Details::Registry::Properties props = {}; std::string lib_name = ""; Details::Registry::instance().add( id, {lib_name, std::move( stub ), std::move( props )} ); diff --git a/examples/CLICSiD/scripts/CLICSiDAClick.C b/examples/CLICSiD/scripts/CLICSiDAClick.C index 8a8c085ffe5d6ab70e7f509d13530d69d6cd33d1..9cc3ff7db0d9c3cbfb411efb5c170aa1f64af9c1 100644 --- a/examples/CLICSiD/scripts/CLICSiDAClick.C +++ b/examples/CLICSiD/scripts/CLICSiDAClick.C @@ -53,7 +53,7 @@ int setupG4_CINT(bool interactive) { string install_dir = getenv("DD4hepExamplesINSTALL"); Phase p; - kernel.loadGeometry(("file:"+install_dir+"/DDDetectors/compact/SiD.xml").c_str()); + kernel.loadGeometry(("file:"+det_dir+"/DDDetectors/compact/SiD.xml").c_str()); kernel.loadXML(("file:"+install_dir+"/examples/CLICSiD/sim/field.xml").c_str()); if ( interactive ) { diff --git a/examples/OpticalSurfaces/CMakeLists.txt b/examples/OpticalSurfaces/CMakeLists.txt index c8ac2be725fe960398fdf8a1105713fa9bec55eb..9870821abe5096cd2d86382cde69444bffb0eae8 100644 --- a/examples/OpticalSurfaces/CMakeLists.txt +++ b/examples/OpticalSurfaces/CMakeLists.txt @@ -69,15 +69,19 @@ dd4hep_add_test_reg( Surfaces_OpNovice_write_gdml REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) # -#---Testing: Load GDML and dump volumes -dd4hep_add_test_reg( Surfaces_OpNovice_read_gdml - COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_OpticalSurfaces.sh" - EXEC_ARGS geoPluginRun -volmgr -destroy - -compact file:${OpticalSurfaces_INSTALL}/compact/OpNovice_gdml.xml - -print INFO -destroy -volmgr - -plugin DD4hep_ROOTGDMLParse -input OpNovice.gdml -path /world/BubbleDevice - -plugin DD4hep_VolumeDump - REGEX_PASS "\\+\\+\\+ Checked 5 physical volume placements." - REGEX_FAIL " ERROR ;EXCEPTION;Exception" - ) +# +if ( "${ROOT_VERSION}" VERSION_GREATER "6.19.00" ) + # + #---Testing: Load GDML and dump volumes + dd4hep_add_test_reg( Surfaces_OpNovice_read_gdml + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_OpticalSurfaces.sh" + EXEC_ARGS geoPluginRun -volmgr -destroy + -compact file:${OpticalSurfaces_INSTALL}/compact/OpNovice_gdml.xml + -print INFO -destroy -volmgr + -plugin DD4hep_ROOTGDMLParse -input OpNovice.gdml -path /world/BubbleDevice + -plugin DD4hep_VolumeDump + REGEX_PASS "\\+\\+\\+ Checked 5 physical volume placements." + REGEX_FAIL " ERROR ;EXCEPTION;Exception" + ) +endif() # diff --git a/examples/Persistency/CMakeLists.txt b/examples/Persistency/CMakeLists.txt index 872e21ebae0617df70d2016db52f2ca3df186040..6af45d2ff04e529333c42a1bde77c83bf5df930d 100644 --- a/examples/Persistency/CMakeLists.txt +++ b/examples/Persistency/CMakeLists.txt @@ -121,7 +121,7 @@ dd4hep_add_test_reg( Persist_MiniTel_Restore_Readouts_LONGTEST dd4hep_add_test_reg( Persist_CLICSiD_Save_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Persistency.sh" EXEC_ARGS geoPluginRun - -volmgr -destroy -input file:${CMAKE_CURRENT_SOURCE_DIR}/../CLICSiD/compact/compact.xml + -volmgr -destroy -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -plugin DD4hep_Geometry2ROOT -output CLICSiD_geometry.root REGEX_PASS "\\+\\+\\+ Successfully saved geometry data to file." REGEX_FAIL " ERROR ;EXCEPTION;Exception;FAILED;WriteObjectAny"