From c0fb8a85837f3a429760ebd15ee4f23fcc8bda58 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Fri, 25 Sep 2020 18:28:30 +0200 Subject: [PATCH] Fix tests --- DDCond/src/Type1/Manager_Type1.cpp | 7 +++++-- DDCond/src/plugins/ConditionsUserPool.cpp | 2 +- DDCore/include/DD4hep/config.h | 6 +++--- examples/AlignDet/CMakeLists.txt | 2 +- examples/Conditions/CMakeLists.txt | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/DDCond/src/Type1/Manager_Type1.cpp b/DDCond/src/Type1/Manager_Type1.cpp index 3920bd77b..a4491d751 100644 --- a/DDCond/src/Type1/Manager_Type1.cpp +++ b/DDCond/src/Type1/Manager_Type1.cpp @@ -246,12 +246,15 @@ bool Manager_Type1::registerUnlocked(ConditionsPool& pool, Condition cond) { cond->iov = pool.iov; cond->setFlag(Condition::ACTIVE); pool.insert(cond); -#if !defined(DD4HEP_MINIMAL_CONDITIONS) +#if !defined(DD4HEP_MINIMAL_CONDITIONS) && defined(DD4HEP_CONDITIONS_HAVE_NAME) printout(DEBUG,"ConditionsMgr","Register condition %016lX %s [%s] IOV:%s", cond.key(), cond.name(), cond->address.c_str(), pool.iov->str().c_str()); -#else +#elif defined(DD4HEP_CONDITIONS_HAVE_NAME) printout(DEBUG,"ConditionsMgr","Register condition %016lX %s IOV:%s", cond.key(), cond.name(), pool.iov->str().c_str()); +#else + printout(DEBUG,"ConditionsMgr","Register condition %016lX IOV:%s", + cond.key(), pool.iov->str().c_str()); #endif if ( !m_onRegister.empty() ) { __callListeners(m_onRegister, &ConditionsListener::onRegisterCondition, cond); diff --git a/DDCond/src/plugins/ConditionsUserPool.cpp b/DDCond/src/plugins/ConditionsUserPool.cpp index 23227b1ca..604107d4d 100644 --- a/DDCond/src/plugins/ConditionsUserPool.cpp +++ b/DDCond/src/plugins/ConditionsUserPool.cpp @@ -249,7 +249,7 @@ ConditionsMappedUserPool<MAPPING>::i_insert(Condition::Object* o) { #if defined(DD4HEP_CONDITIONS_HAVE_NAME) o->GetName(), o->GetTitle()); #else - ""); + "", ""); #endif } return ret; diff --git a/DDCore/include/DD4hep/config.h b/DDCore/include/DD4hep/config.h index 2e7579bdd..2a3a2b3fd 100644 --- a/DDCore/include/DD4hep/config.h +++ b/DDCore/include/DD4hep/config.h @@ -23,12 +23,12 @@ #define DD4HEP_CONDITIONS_DEBUG 1 #endif -/// Enable flag to store conditions names to keys (needs some support from user code!) -#define DD4HEP_CONDITIONS_HAVE_NAME 1 - #if !defined(DD4HEP_CONDITIONS_DEBUG) /// Enable this if you want to minimize the footprint of conditions #define DD4HEP_MINIMAL_CONDITIONS 1 +#else +/// Enable flag to store conditions names to keys (needs some support from user code!) +#define DD4HEP_CONDITIONS_HAVE_NAME 1 #endif /// Valid implementations of the Gaudi plugin service are 1 and 2 diff --git a/examples/AlignDet/CMakeLists.txt b/examples/AlignDet/CMakeLists.txt index 1c626dea6..1be5d87b1 100644 --- a/examples/AlignDet/CMakeLists.txt +++ b/examples/AlignDet/CMakeLists.txt @@ -115,7 +115,7 @@ dd4hep_add_test_reg( AlignDet_Telescope_readback_xml EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml -input file:${AlignDet_INSTALL}/compact/Telescope.xml -deltas file:./new_cond.xml - REGEX_PASS "52 conditions in slice. \\(T:33,S:33,L:0,C:0,M:0\\) Alignments accessed: 20 \\(A:19,M:0\\) for IOV:run\\(1\\)" + REGEX_PASS "40 conditions in slice. \\(T:21,S:21,L:0,C:0,M:0\\) Alignments accessed: 20 \\(A:19,M:0\\) for IOV:run\\(1\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) # diff --git a/examples/Conditions/CMakeLists.txt b/examples/Conditions/CMakeLists.txt index dbc58ed17..5a5244cf1 100644 --- a/examples/Conditions/CMakeLists.txt +++ b/examples/Conditions/CMakeLists.txt @@ -54,7 +54,7 @@ dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_detelement -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml -plugin DD4hep_DetElementConditionsDump - REGEX_PASS "Key\\:FA708B8A8CDE3019 Type\\:dd4hep\\:\\:Delta" + REGEX_PASS "Key\\:FA708B8A6E87AB8E Type\\:dd4hep\\:\\:Delta" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) # -- GitLab