From 67cf222efd0388c2099708b4a27531b3942ed5a1 Mon Sep 17 00:00:00 2001
From: Paul Gessinger <paul.gessinger@cern.ch>
Date: Fri, 14 Jun 2019 17:49:29 +0200
Subject: [PATCH] Add overload of processSpecialAlignment which...

...accepts a GeoAlignmentStore. Changes it to be pure virtual in
InDetDetectorManager, meaning Pixel, SCT and TRT have to implement it
explicitly. This overload does nothing in any of them as of now.
---
 .../InDetReadoutGeometry/InDetDetectorManager.h     |  9 +++++++--
 .../InDetReadoutGeometry/PixelDetectorManager.h     |  6 +++++-
 .../InDetReadoutGeometry/SCT_DetectorManager.h      | 13 +++++++++++--
 .../InDetReadoutGeometry/TRT_DetectorManager.h      | 13 +++++++++----
 .../src/InDetDetectorManager.cxx                    |  4 ++++
 .../src/PixelDetectorManager.cxx                    |  6 ++++++
 .../src/SCT_DetectorManager.cxx                     | 11 +++++++++++
 .../src/TRT_DetectorManager.cxx                     |  6 ++++++
 8 files changed, 59 insertions(+), 9 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h
index 5765370a8b2..ec30e328f79 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/InDetDetectorManager.h
@@ -169,8 +169,13 @@ namespace InDetDD {
                                               const Amg::Transform3D & delta,
                                               FrameType frame,
                                               GeoVAlignmentStore* alignStore=nullptr) const = 0;
-    
-      virtual bool processSpecialAlignment(const std::string & key, InDetDD::AlignFolderType alignfolder) const;
+
+      virtual bool processSpecialAlignment(const std::string & key,
+                                           InDetDD::AlignFolderType alignfolder) const = 0;
+
+      virtual bool processSpecialAlignment(const std::string& key,
+                                           const CondAttrListCollection* obj=nullptr,
+                                           GeoVAlignmentStore* alignStore=nullptr) const = 0;
 
       bool processGlobalAlignmentContainer(const std::string & key,
                                            const CondAttrListCollection* obj=nullptr,
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h
index 7d42b82f07c..9f3cadbcda5 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/PixelDetectorManager.h
@@ -128,7 +128,11 @@ namespace InDetDD {
       virtual const PixelModuleDesign * getPixelDesign(int i) const;
 
       /** Process new IBLDist DB folder **/
-      bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) const;
+      bool processSpecialAlignment(const std::string &, InDetDD::AlignFolderType) const override;
+
+      bool processSpecialAlignment(const std::string& key,
+                                   const CondAttrListCollection* obj=nullptr,
+                                   GeoVAlignmentStore* alignStore=nullptr) const override;
 
       /** Process new global DB folders for L1 and L2 **/
       bool processGlobalAlignment(const std::string &, int level, FrameType frame,
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h
index bf936f02197..93e6c5d3d1f 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SCT_DetectorManager.h
@@ -114,8 +114,17 @@ namespace InDetDD {
       bool processGlobalAlignment(const std::string &, int level, FrameType frame,
                                   const CondAttrListCollection* obj,
                                   GeoVAlignmentStore* alignStore) const;
-    
-    private:  
+
+      // comply with InDetDetectorManager interface
+      bool processSpecialAlignment(const std::string & key,
+                                   InDetDD::AlignFolderType alignfolder) const override;
+
+      bool processSpecialAlignment(const std::string& key,
+                                   const CondAttrListCollection* obj=nullptr,
+                                   GeoVAlignmentStore* alignStore=nullptr) const override;
+
+
+    private:
       /** implements the main alignment update for delta transforms in different frames,
           it translates into the LocalDelta or GlobalDelta function of SiDetectorManager
       */
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h
index b79ad864f28..d4c64548cce 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/TRT_DetectorManager.h
@@ -219,9 +219,15 @@ namespace InDetDD {
     bool processGlobalAlignment(const std::string &, int level, FrameType frame,
                                 const CondAttrListCollection* obj,
                                 GeoVAlignmentStore* alignStore) const;
- 
- private:  
-  
+
+    bool processSpecialAlignment(const std::string & key, InDetDD::AlignFolderType dummy) const override;
+
+    bool processSpecialAlignment(const std::string& key,
+                                 const CondAttrListCollection* obj=nullptr,
+                                 GeoVAlignmentStore* alignStore=nullptr) const override;
+
+ private:
+
 
     // Illegal operations:---------------------------------------------------------//
     //                                                                             //
@@ -262,7 +268,6 @@ namespace InDetDD {
 
     // here temporarily
     virtual const TRT_ID *getIdHelper() const;                                             //
-    virtual bool processSpecialAlignment(const std::string & key, InDetDD::AlignFolderType dummy) const;
 
     //-----------------------------------------------------------------------------//
   };
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx
index ae8514eb2ce..214a0feb404 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/InDetDetectorManager.cxx
@@ -251,6 +251,10 @@ namespace InDetDD
             } 
             else if(m_specialFolders.find(key)!=m_specialFolders.end()) {
                 // To Do: do we really need this?
+                // => Yes, this is where the IBL bowing is handled
+
+                ATH_MSG_FATAL("Special folder " << key << " handling requested, but not currently implemented!");
+                return StatusCode::FAILURE;
 
                 /*
                   try {
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx
index 9139354154e..166c1047215 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/PixelDetectorManager.cxx
@@ -458,6 +458,12 @@ namespace InDetDD {
   return alignmentChange;
   }
 
+  bool PixelDetectorManager::processSpecialAlignment(const std::string& /*key*/,
+                                                     const CondAttrListCollection* /*obj*/,
+                                                     GeoVAlignmentStore* /*alignStore*/) const {
+    return false;
+  }
+
   // New global alignment folders
   bool PixelDetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame, const CondAttrListCollection* /*obj*/, GeoVAlignmentStore* alignStore) const
   {
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx
index 4ac1b74552a..4a78fe55b95 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SCT_DetectorManager.cxx
@@ -393,5 +393,16 @@ namespace InDetDD {
     return alignmentChange;
   }
 
+bool SCT_DetectorManager::processSpecialAlignment(
+    const std::string &, InDetDD::AlignFolderType) const {
+  return false;
+}
+
+bool SCT_DetectorManager::processSpecialAlignment(const std::string& /*key*/,
+                                                  const CondAttrListCollection* /*obj*/,
+                                                  GeoVAlignmentStore* /*alignStore*/) const {
+  return false;
+
+}
 
 } // namespace InDetDD
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx
index 43f1ab2de47..3d3417d1d20 100755
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/TRT_DetectorManager.cxx
@@ -630,6 +630,12 @@ namespace InDetDD {
         }
     }
 
+    bool TRT_DetectorManager::processSpecialAlignment(const std::string& /*key*/,
+                                                      const CondAttrListCollection* /*obj*/,
+                                                      GeoVAlignmentStore* /*alignStore*/) const {
+      return false;
+    }
+
 
     void TRT_DetectorManager::setConditions(TRT_Conditions * conditions)
     {
-- 
GitLab