From 39dfa38013fe910a6d4b35bfc9be0d7ee8e9cc36 Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Mon, 21 Nov 2016 18:02:42 +0100
Subject: [PATCH] Fix errors for clang compiler

---
 DDCore/src/Alignments.cpp                  |  4 ++--
 DDSegmentation/src/MegatileLayerGridXY.cpp | 10 +++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/DDCore/src/Alignments.cpp b/DDCore/src/Alignments.cpp
index 0fb9eec60..6a05bd070 100644
--- a/DDCore/src/Alignments.cpp
+++ b/DDCore/src/Alignments.cpp
@@ -40,7 +40,7 @@ namespace DD4hep {
     }
 #else
     /// Initializing constructor to create a new object (Specialized for AlignmentNamedObject)
-    template <> Alignment::Alignment<Alignment::Object>(const string& nam) {
+    template <> Alignment::Alignment<AlignmentData>(const string& nam) {
       assign(new Alignment::Object(), nam, "alignment");
     }
     /// Initializing constructor to create a new object (Specialized for AlignmentNamedObject)
@@ -48,7 +48,7 @@ namespace DD4hep {
       assign(new Interna::AlignmentNamedObject(nam, "alignment"), nam, "alignment");
     }
     /// Initializing constructor to create a new object (Specialized for AlignmentConditionObject)
-    template <> AlignmentCondition::AlignmentCondition<AlignmentCondition::Object>(const string& nam) {
+    template <> AlignmentCondition::AlignmentCondition<Interna::AlignmentConditionObject>(const string& nam) {
       assign(new Object(nam, "alignment"), nam, "alignment");
     }
 #endif
diff --git a/DDSegmentation/src/MegatileLayerGridXY.cpp b/DDSegmentation/src/MegatileLayerGridXY.cpp
index 7892d0927..cbe1cebb0 100644
--- a/DDSegmentation/src/MegatileLayerGridXY.cpp
+++ b/DDSegmentation/src/MegatileLayerGridXY.cpp
@@ -73,9 +73,10 @@ namespace DD4hep {
       cellPosition.X = cellIndexX * (_currentSegInfo.megaTileSizeX / _currentSegInfo.nCellsX ) + _currentSegInfo.megaTileOffsetX;
       cellPosition.Y = cellIndexY * (_currentSegInfo.megaTileSizeY / _currentSegInfo.nCellsY ) + _currentSegInfo.megaTileOffsetY;
 
-      if ( abs( cellPosition.X )>10000 || abs( cellPosition.Y )>10000 ) {
+      if ( std::fabs( cellPosition.X )>10000e0 || std::fabs( cellPosition.Y )>10000e0 ) {
         std::cout << "crazy cell position: " << cellPosition.X << " " << cellPosition.Y << std::endl;
-        std::cout << "layer, wafer, cellx,y indices: " << layerIndex << " " << waferIndex << " " << cellIndexX << " " << cellIndexY << std::endl;
+        std::cout << "layer, wafer, cellx,y indices: " << layerIndex << " " << waferIndex
+                  << " " << cellIndexX << " " << cellIndexY << std::endl;
         assert(0 && "crazy cell position?");
       }
 
@@ -84,7 +85,10 @@ namespace DD4hep {
 
 
     /// determine the cell ID based on the position
-    CellID MegatileLayerGridXY::cellID(const Vector3D& localPosition, const Vector3D& /* globalPosition */, const VolumeID& vID) const {
+    CellID MegatileLayerGridXY::cellID(const Vector3D& localPosition,
+                                       const Vector3D& /* globalPosition */,
+                                       const VolumeID& vID) const
+    {
       // this is the local position within a megatile, local coordinates
 
       // get the layer, wafer, module indices from the volumeID
-- 
GitLab