From f4958d68d1a946e73a592fe1b6b74214c8280c85 Mon Sep 17 00:00:00 2001
From: nicolas <nicolas@nptool>
Date: Mon, 21 Jan 2013 18:04:26 +0000
Subject: [PATCH]  * Change configure and makefile_detector.sh scripts    so
 that they are working on Mac OsX platforms

 * Remove compilation warnings in Maya and Tac
---
 NPLib/Maya/TMayaHisto.cxx          |  1 +
 NPLib/Maya/TMayaHisto.h            |  2 +-
 NPLib/Misc/TTacPhysics.cxx         |  1 +
 NPLib/configure                    |  5 +++--
 NPLib/scripts/makefile_detector.sh | 13 +++++++------
 5 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/NPLib/Maya/TMayaHisto.cxx b/NPLib/Maya/TMayaHisto.cxx
index c69b48864..2f02d6bae 100755
--- a/NPLib/Maya/TMayaHisto.cxx
+++ b/NPLib/Maya/TMayaHisto.cxx
@@ -430,6 +430,7 @@ Double_t TMayaHisto::GetCdisp(Double_t C, Double_t R) {
 }
 
 Double_t TMayaHisto::GetRdisp(Double_t C, Double_t R) {
+	C *= 1;
 	return (GetYaxis()->GetNbins() - R) + Yview_corr + 1;
 }
 
diff --git a/NPLib/Maya/TMayaHisto.h b/NPLib/Maya/TMayaHisto.h
index 46f1c27af..a1dba0cd8 100755
--- a/NPLib/Maya/TMayaHisto.h
+++ b/NPLib/Maya/TMayaHisto.h
@@ -85,7 +85,7 @@ public:
    virtual Int_t    GetShiftHexagon(void){ return bShiftHexagon ;};
    virtual Double_t SetHoneyCombSize(Double_t size){ fHoneyCombSize = size ; return fHoneyCombSize ;};
    virtual Int_t    SetShiftHexagon(Int_t shift){
-     if(bShiftHexagon>0) { bShiftHexagon = 1 ; } else {  bShiftHexagon = 0 ;};
+     if(bShiftHexagon>0) { bShiftHexagon = 1 ; } else {  bShiftHexagon = 0 ;}; shift *= 1;
      return bShiftHexagon ;};
    Bool_t    FitTrack(void){return FitTrack("chi2",1,GetXaxis()->GetNbins(),1,GetYaxis()->GetNbins(),NULL,-1,-1); }; // *MENU*
    Bool_t    FitTrack(Option_t *,Int_t,Int_t,Int_t,Int_t,TCutG*,Double_t, Double_t); // *MENU*
diff --git a/NPLib/Misc/TTacPhysics.cxx b/NPLib/Misc/TTacPhysics.cxx
index 46f3d286e..67baa5a18 100644
--- a/NPLib/Misc/TTacPhysics.cxx
+++ b/NPLib/Misc/TTacPhysics.cxx
@@ -73,6 +73,7 @@ void TTacPhysics::Clear()
 ///////////////////////////////////////////////////////////////////////////
 void TTacPhysics::ReadConfiguration(string Path) 
    {
+	   Path = "dummy";
    }
 
 ///////////////////////////////////////////////////////////////////////////
diff --git a/NPLib/configure b/NPLib/configure
index ef30bc00a..46b106452 100755
--- a/NPLib/configure
+++ b/NPLib/configure
@@ -1,3 +1,5 @@
+#! /bin/bash
+
 # *****************************************************************************
 # * Copyright (C) 2009   this file is part of the NPTool Project              *
 # *                                                                           *
@@ -31,7 +33,6 @@
 # *                                                                           *
 # *****************************************************************************
 
-#! /bin/bash
 
 
 # arguments list
@@ -192,7 +193,7 @@ do
    # only build core libraries
    if echo "$corelibs" | grep -q "$lname" ; then
       # print informations
-      echo "\tEntering $name directory..."
+      echo -e "\tEntering $name directory..."
       # add "-C ./" pattern at the beginning of the name
       cmd="-C ./$name"
       # execute make command with target specified on command line
diff --git a/NPLib/scripts/makefile_detector.sh b/NPLib/scripts/makefile_detector.sh
index 93ba57dc3..9c650d3b6 100755
--- a/NPLib/scripts/makefile_detector.sh
+++ b/NPLib/scripts/makefile_detector.sh
@@ -1,3 +1,5 @@
+#! /bin/bash
+
 # *****************************************************************************
 # * Copyright (C) 2009   this file is part of the NPTool Project              *
 # *                                                                           *
@@ -24,18 +26,17 @@
 # *                                                                           *
 # *****************************************************************************
 
-#! /bin/bash
 
 # build message 
-echo "\t@echo \"Entering $1 directory...\"" >> $2
+echo -e "\t@echo \"Entering $1 directory...\"" >> $2
 # execute make command with target specified on command line
-echo "\tmake --silent -C ./$1" >> $2
+echo -e "\tmake --silent -C ./$1" >> $2
 # copy header files
-echo "\tcd $1; cp -f *.h ../include" >> $2
+echo -e "\tcd $1; cp -f *.h ../include" >> $2
 # remove *Dict header files
-echo "\tcd include; rm *Dict.h" >> $2
+echo -e "\tcd include; rm *Dict.h" >> $2
 # copy library files
-echo "\tcd $1; cp -f *.so ../lib" >> $2
+echo -e "\tcd $1; cp -f *.so ../lib" >> $2
 # deal with mac osx dylib files
 #echo "ifeq (\$(findstring macosx, \$(ARCH)), macosx)" >> $2
 #echo "\t@echo \"to be done\""
-- 
GitLab