diff --git a/DDCond/src/plugins/ConditionsUserPool.cpp b/DDCond/src/plugins/ConditionsUserPool.cpp index 604107d4d665cf4279c8f12c6203defe7d0fd3cd..d98152a2ae6a8c9931214b550aac5f230252ba0c 100644 --- a/DDCond/src/plugins/ConditionsUserPool.cpp +++ b/DDCond/src/plugins/ConditionsUserPool.cpp @@ -244,12 +244,12 @@ template<typename MAPPING> inline bool ConditionsMappedUserPool<MAPPING>::i_insert(Condition::Object* o) { int ret = m_conditions.emplace(o->hash,o).second; if ( flags&PRINT_INSERT ) { - printout(INFO,"UserPool","++ %s condition [%016llX]: %s [%s].", - ret ? "Successfully inserted" : "FAILED to insert", o->hash, + printout(INFO,"UserPool","++ %s condition [%016llX]" #if defined(DD4HEP_CONDITIONS_HAVE_NAME) - o->GetName(), o->GetTitle()); + ": %s [%s].", ret ? "Successfully inserted" : "FAILED to insert", + o->hash, o->GetName(), o->GetTitle()); #else - "", ""); + , ret ? "Successfully inserted" : "FAILED to insert", o->hash); #endif } return ret; diff --git a/DDCore/include/DD4hep/ConditionDerived.h b/DDCore/include/DD4hep/ConditionDerived.h index 4993b68aa4d071c476ab715751feac883ce07100..a0818bb6cebc01fb1095cdd06d9874714854f9fd 100644 --- a/DDCore/include/DD4hep/ConditionDerived.h +++ b/DDCore/include/DD4hep/ConditionDerived.h @@ -316,10 +316,8 @@ namespace dd4hep { int m_refCount {0}; public: -#ifdef DD4HEP_CONDITIONS_DEBUG /// Reference to the target's detector element DetElement detector; -#endif /// Key to the condition to be updated ConditionKey target {0}; /// Dependency keys this condition depends on @@ -336,14 +334,10 @@ namespace dd4hep { virtual ~ConditionDependency(); public: - /// Initializing constructor used by builder - ConditionDependency(Condition::key_type key, std::shared_ptr<ConditionUpdateCall> call); /// Initializing constructor used by builder ConditionDependency(DetElement de, const std::string& item, std::shared_ptr<ConditionUpdateCall> call); /// Initializing constructor used by builder ConditionDependency(DetElement de, Condition::itemkey_type item_key, std::shared_ptr<ConditionUpdateCall> call); - /// Initializing constructor used by builder - ConditionDependency(Condition::detkey_type det_key, Condition::itemkey_type item_key, std::shared_ptr<ConditionUpdateCall> call); /// Default constructor ConditionDependency(); /// Access the dependency key diff --git a/DDCore/include/DD4hep/config.h b/DDCore/include/DD4hep/config.h index c7b6c361006bee7608d8b02c18b73b6b8d94ae37..e549bc7c55ab2e2d0bbaa73a0671845b87a2813e 100644 --- a/DDCore/include/DD4hep/config.h +++ b/DDCore/include/DD4hep/config.h @@ -23,14 +23,14 @@ #define DD4HEP_CONDITIONS_DEBUG 1 #endif -#if !defined(DD4HEP_CONDITIONS_DEBUG) +#if defined(DD4HEP_CONDITIONS_DEBUG) +/// Enable flag to store conditions names to keys (needs some support from user code!) +#define DD4HEP_CONDITIONS_HAVE_NAME 1 +#else /// Enable this if you want to minimize the footprint of conditions #define DD4HEP_MINIMAL_CONDITIONS 1 #endif -/// Enable flag to store conditions names to keys (needs some support from user code!) -#define DD4HEP_CONDITIONS_HAVE_NAME 1 - /// Valid implementations of the Gaudi plugin service are 1 and 2 #define DD4HEP_PLUGINSVC_VERSION 2 diff --git a/DDCore/src/ConditionDerived.cpp b/DDCore/src/ConditionDerived.cpp index d1ac19fa8d8887e5953ccd222403bb142a87b271..59b87720566a2093e0fd658426b66b0e629b79bd 100644 --- a/DDCore/src/ConditionDerived.cpp +++ b/DDCore/src/ConditionDerived.cpp @@ -131,32 +131,11 @@ void ConditionUpdateContext::accessFailure(const ConditionKey& key_value) const #endif } -/// Initializing constructor -ConditionDependency::ConditionDependency(Condition::key_type key, - std::shared_ptr<ConditionUpdateCall> call) - : m_refCount(0), target(key), callback(std::move(call)) -{ - InstanceCount::increment(this); -} - -/// Initializing constructor -ConditionDependency::ConditionDependency(Condition::detkey_type det_key, - Condition::itemkey_type item_key, - std::shared_ptr<ConditionUpdateCall> call) - : m_refCount(0), target(det_key, item_key), callback(std::move(call)) -{ - InstanceCount::increment(this); -} - /// Initializing constructor ConditionDependency::ConditionDependency(DetElement de, Condition::itemkey_type item_key, std::shared_ptr<ConditionUpdateCall> call) - : m_refCount(0), -#ifdef DD4HEP_CONDITIONS_DEBUG - detector(de), -#endif - target(de, item_key), callback(std::move(call)) + : m_refCount(0), detector(de), target(de, item_key), callback(std::move(call)) { InstanceCount::increment(this); } @@ -166,10 +145,7 @@ ConditionDependency::ConditionDependency(DetElement de, const std::string& item, std::shared_ptr<ConditionUpdateCall> call) : -#ifdef DD4HEP_CONDITIONS_DEBUG - detector(de), -#endif - target(de, item), callback(std::move(call)) + detector(de), target(de, item), callback(std::move(call)) { InstanceCount::increment(this); } diff --git a/DDCore/src/plugins/Compact2Objects.cpp b/DDCore/src/plugins/Compact2Objects.cpp index 4cc038079264a7319832c8cb412da1bdb84a9e7d..ac8d6948c3c50af1c24f957b3d5925e4e7d2dd6a 100644 --- a/DDCore/src/plugins/Compact2Objects.cpp +++ b/DDCore/src/plugins/Compact2Objects.cpp @@ -1517,11 +1517,13 @@ template <> void Converter<Compact>::operator()(xml_h element) const { #if ROOT_VERSION_CODE >= ROOT_VERSION(6,17,0) /// These two must be parsed early, because they are needed by the detector constructors xml_coll_t(compact, _U(properties)).for_each(_U(constant), Converter<PropertyConstant>(description)); - xml_coll_t(compact, _U(properties)).for_each(_U(matrix), Converter<PropertyTable>(description)); + xml_coll_t(compact, _U(properties)).for_each(_U(matrix), Converter<PropertyTable>(description)); + xml_coll_t(compact, _U(properties)).for_each(_U(plugin), Converter<Plugin> (description)); xml_coll_t(compact, _U(surfaces)).for_each(_U(opticalsurface), Converter<OpticalSurface>(description)); #endif - xml_coll_t(compact, _U(materials)).for_each(_U(element), Converter<Atom>(description)); + xml_coll_t(compact, _U(materials)).for_each(_U(element), Converter<Atom>(description)); xml_coll_t(compact, _U(materials)).for_each(_U(material), Converter<Material>(description)); + xml_coll_t(compact, _U(materials)).for_each(_U(plugin), Converter<Plugin> (description)); xml_coll_t(compact, _U(display)).for_each(_U(include), Converter<DetElementInclude>(description)); xml_coll_t(compact, _U(display)).for_each(_U(vis), Converter<VisAttr>(description));