From a5f0fb8d907c3a6cdace465791c627aef6e67597 Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Fri, 25 Oct 2013 10:11:45 +0100 Subject: [PATCH] * Switching Macos64 to clang insteand of g++ in makefile to avoid issue with OS X 10.9 * Remove self assignment warning in TMust2Physics (issue warning, not affecting logic) * Remove self assignment warning in TCatsPhysics, actually correct a potentiatlly nasty bug --- NPLib/CATS/TCATSPhysics.h | 4 ++-- NPLib/MUST2/TMust2Physics.cxx | 18 ------------------ NPLib/Makefile.arch | 4 ++-- NPSimulation/Simulation.cc | 6 ++++-- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/NPLib/CATS/TCATSPhysics.h b/NPLib/CATS/TCATSPhysics.h index 2ea9a762f..9d135fce2 100644 --- a/NPLib/CATS/TCATSPhysics.h +++ b/NPLib/CATS/TCATSPhysics.h @@ -138,8 +138,8 @@ class TCATSPhysics : public TObject, public NPA::VDetector public: // Output data of interest // for a CATS - void SetTargetAngle(double m_TargetAngle) {m_TargetAngle = m_TargetAngle;} - void SetTargetThickness(double m_TargetThickness) {m_TargetThickness = m_TargetThickness;} + void SetTargetAngle(double TargetAngle) {m_TargetAngle = TargetAngle;} + void SetTargetThickness(double TargetThickness) {m_TargetThickness = TargetThickness;} // Remove bad channel, calibrate the data and apply threshold diff --git a/NPLib/MUST2/TMust2Physics.cxx b/NPLib/MUST2/TMust2Physics.cxx index bde3f51fa..8c965891d 100644 --- a/NPLib/MUST2/TMust2Physics.cxx +++ b/NPLib/MUST2/TMust2Physics.cxx @@ -889,13 +889,10 @@ void TMust2Physics::ReadConfiguration(string Path){ check_A = true; ConfigFile >> DataBuffer ; Ax = atof(DataBuffer.c_str()) ; - Ax = Ax ; ConfigFile >> DataBuffer ; Ay = atof(DataBuffer.c_str()) ; - Ay = Ay ; ConfigFile >> DataBuffer ; Az = atof(DataBuffer.c_str()) ; - Az = Az ; A = TVector3(Ax, Ay, Az); cout << "X1 Y1 corner position : (" << A.X() << ";" << A.Y() << ";" << A.Z() << ")" << endl; @@ -907,13 +904,10 @@ void TMust2Physics::ReadConfiguration(string Path){ check_B = true; ConfigFile >> DataBuffer ; Bx = atof(DataBuffer.c_str()) ; - Bx = Bx ; ConfigFile >> DataBuffer ; By = atof(DataBuffer.c_str()) ; - By = By ; ConfigFile >> DataBuffer ; Bz = atof(DataBuffer.c_str()) ; - Bz = Bz ; B = TVector3(Bx, By, Bz); cout << "X128 Y1 corner position : (" << B.X() << ";" << B.Y() << ";" << B.Z() << ")" << endl; @@ -925,13 +919,10 @@ void TMust2Physics::ReadConfiguration(string Path){ check_C = true; ConfigFile >> DataBuffer ; Cx = atof(DataBuffer.c_str()) ; - Cx = Cx ; ConfigFile >> DataBuffer ; Cy = atof(DataBuffer.c_str()) ; - Cy = Cy ; ConfigFile >> DataBuffer ; Cz = atof(DataBuffer.c_str()) ; - Cz = Cz ; C = TVector3(Cx, Cy, Cz); cout << "X1 Y128 corner position : (" << C.X() << ";" << C.Y() << ";" << C.Z() << ")" << endl; @@ -942,13 +933,10 @@ void TMust2Physics::ReadConfiguration(string Path){ check_D = true; ConfigFile >> DataBuffer ; Dx = atof(DataBuffer.c_str()) ; - Dx = Dx ; ConfigFile >> DataBuffer ; Dy = atof(DataBuffer.c_str()) ; - Dy = Dy ; ConfigFile >> DataBuffer ; Dz = atof(DataBuffer.c_str()) ; - Dz = Dz ; D = TVector3(Dx, Dy, Dz); cout << "X128 Y128 corner position : (" << D.X() << ";" << D.Y() << ";" << D.Z() << ")" << endl; @@ -962,7 +950,6 @@ void TMust2Physics::ReadConfiguration(string Path){ check_Theta = true; ConfigFile >> DataBuffer ; Theta = atof(DataBuffer.c_str()) ; - Theta = Theta ; cout << "Theta: " << Theta << endl; } @@ -972,7 +959,6 @@ void TMust2Physics::ReadConfiguration(string Path){ check_Phi = true; ConfigFile >> DataBuffer ; Phi = atof(DataBuffer.c_str()) ; - Phi = Phi ; cout << "Phi: " << Phi << endl; } @@ -982,7 +968,6 @@ void TMust2Physics::ReadConfiguration(string Path){ check_R = true; ConfigFile >> DataBuffer ; R = atof(DataBuffer.c_str()) ; - R = R ; cout << "R: " << R << endl; } @@ -992,13 +977,10 @@ void TMust2Physics::ReadConfiguration(string Path){ check_beta = true; ConfigFile >> DataBuffer ; beta_u = atof(DataBuffer.c_str()) ; - beta_u = beta_u ; ConfigFile >> DataBuffer ; beta_v = atof(DataBuffer.c_str()) ; - beta_v = beta_v ; ConfigFile >> DataBuffer ; beta_w = atof(DataBuffer.c_str()) ; - beta_w = beta_w ; cout << "Beta: " << beta_u << " " << beta_v << " " << beta_w << endl ; } diff --git a/NPLib/Makefile.arch b/NPLib/Makefile.arch index caba32631..ef7c727da 100644 --- a/NPLib/Makefile.arch +++ b/NPLib/Makefile.arch @@ -226,9 +226,9 @@ ifeq ($(ARCH),macosx64) # Only specific option (-m64) comes from root-config MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2) MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR) -CXX = g++ +CXX = clang++ CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual -LD = $(MACOSXTARGET) g++ -m64 +LD = $(MACOSXTARGET) clang++ -m64 LDFLAGS = $(OPT2) -bind_at_load -e start # The SOFLAGS will be used to create the .dylib, # the .so will be created separately diff --git a/NPSimulation/Simulation.cc b/NPSimulation/Simulation.cc index f576c7812..4cf8405d8 100644 --- a/NPSimulation/Simulation.cc +++ b/NPSimulation/Simulation.cc @@ -34,8 +34,10 @@ int main(int argc, char** argv){ // Initialize NPOptionManager object NPOptionManager* OptionManager = NPOptionManager::getInstance(argc, argv); // Test if input files are found. If not, exit - if (OptionManager->IsDefault("EventGenerator")) OptionManager->SendErrorAndExit("EventGenerator"); - if (OptionManager->IsDefault("DetectorConfiguration")) OptionManager->SendErrorAndExit("DetectorConfiguration"); + if (OptionManager->IsDefault("EventGenerator")) + OptionManager->SendErrorAndExit("EventGenerator"); + if (OptionManager->IsDefault("DetectorConfiguration")) + OptionManager->SendErrorAndExit("DetectorConfiguration"); // case when input files are here G4String EventGeneratorFileName = OptionManager->GetReactionFile(); G4String DetectorFileName = OptionManager->GetDetectorFile(); -- GitLab