From 03eb1a11c3583ced9abe796c9784767d0d1173ec Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Fri, 16 Mar 2018 21:22:20 +0100 Subject: [PATCH] Add study for new Velo-Pixel Detector element conditions. Include fixes from Chris Burr for alignment computations --- DDCond/include/DDCond/ConditionsDependencyHandler.h | 6 +++--- DDCore/include/DD4hep/detail/ConditionsInterna.h | 4 ++++ DDDB/include/Detector/DetectorElement.h | 4 ++-- DDDB/src/Detector/DeHandles.cpp | 4 ++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/DDCond/include/DDCond/ConditionsDependencyHandler.h b/DDCond/include/DDCond/ConditionsDependencyHandler.h index c535a3b78..17f651d67 100644 --- a/DDCond/include/DDCond/ConditionsDependencyHandler.h +++ b/DDCond/include/DDCond/ConditionsDependencyHandler.h @@ -82,8 +82,6 @@ namespace dd4hep { ConditionUpdateUserContext* user_param); /// Default destructor ~ConditionsDependencyHandler(); - /// ConditionResolver implementation: Access to the detector description instance - Detector& detectorDescription() const; /// Access the conditions created during processing const CreatedConditions& created() const { return m_created; } @@ -93,7 +91,9 @@ namespace dd4hep { void resolve(); /** ConditionResolver interface implementation */ - /// ConditionResolver implementation: Access to the conditions manager + /// Access to the detector description instance + virtual Detector& detectorDescription() const override; + /// Access to the conditions manager virtual Ref_t manager() const override { return m_manager; } /// Access to pool IOV virtual const IOV& requiredValidity() const override { return m_pool.validity(); } diff --git a/DDCore/include/DD4hep/detail/ConditionsInterna.h b/DDCore/include/DD4hep/detail/ConditionsInterna.h index 846a6e009..4401410ec 100644 --- a/DDCore/include/DD4hep/detail/ConditionsInterna.h +++ b/DDCore/include/DD4hep/detail/ConditionsInterna.h @@ -80,10 +80,14 @@ namespace dd4hep { int refCount = 1; /// Default constructor ConditionObject(); + /// No copy constructor + ConditionObject(const ConditionObject&) = delete; /// Standard constructor ConditionObject(const std::string& nam,const std::string& tit=""); /// Standard Destructor virtual ~ConditionObject(); + /// No assignment operation + ConditionObject& operator=(const ConditionObject&) = delete; /// Increase reference counter (Used by persistency mechanism) ConditionObject* addRef() { ++refCount; return this; } /// Release object (Used by persistency mechanism) diff --git a/DDDB/include/Detector/DetectorElement.h b/DDDB/include/Detector/DetectorElement.h index 3ffbc7fd0..57df6c0c1 100644 --- a/DDDB/include/Detector/DetectorElement.h +++ b/DDDB/include/Detector/DetectorElement.h @@ -59,9 +59,9 @@ namespace gaudi { #define DE_CTORS_DEFAULT(X) \ X() = default; \ - X(const X& c) = default; \ + X(const X& c) = delete; \ virtual ~X() = default; \ - X& operator=(const X& c) = default + X& operator=(const X& c) = delete #define DE_CTORS_HANDLE(X,B) \ X() = default; \ diff --git a/DDDB/src/Detector/DeHandles.cpp b/DDDB/src/Detector/DeHandles.cpp index a0998e9da..a0d7dc3fa 100644 --- a/DDDB/src/Detector/DeHandles.cpp +++ b/DDDB/src/Detector/DeHandles.cpp @@ -33,6 +33,9 @@ DD4HEP_INSTANTIATE_HANDLE_UNNAMED(DeVPSensorObject,DeIOVObject,ConditionObject); DD4HEP_INSTANTIATE_HANDLE_UNNAMED(DeVPGenericObject,DeIOVObject,ConditionObject); DD4HEP_INSTANTIATE_HANDLE_UNNAMED(DeVPObject,DeVPGenericObject,DeIOVObject,ConditionObject); +// These folks are not really conditions. Condition::get<T>() is never called for these types. +#if 0 + inline std::ostream& operator << (std::ostream& s, const DeVPStaticObject&) { return s; } inline std::ostream& operator << (std::ostream& s, const DeVPSensorStaticObject&) { return s; } inline std::ostream& operator << (std::ostream& s, const DeVPGenericStaticObject&) { return s; } @@ -63,3 +66,4 @@ DD4HEP_DEFINE_CONDITIONS_TYPE(DeVPGenericStaticObject) DD4HEP_DEFINE_CONDITIONS_TYPE(DeVPObject) DD4HEP_DEFINE_CONDITIONS_TYPE(DeVPSensorObject) DD4HEP_DEFINE_CONDITIONS_TYPE(DeVPGenericObject) +#endif -- GitLab