From 87aa82fb04912b9b04239f07951d069254adca96 Mon Sep 17 00:00:00 2001 From: Adrien Matta <matta@lpccaen.in2p3.fr> Date: Fri, 4 Jun 2021 09:46:08 +0200 Subject: [PATCH] * Modifying build_dict.sh to handle corretly MT options - The NPMULTITHREADING flag is now pass to rootcint when building the dictionnaries - This is done by generating the macro via cmake --- NPLib/CMakeLists.txt | 3 +++ NPLib/Detectors/Samurai/TSamuraiFDC0Physics.h | 26 +++++++++---------- .../{build_dict.sh => build_dict.sh.in} | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) rename NPLib/scripts/{build_dict.sh => build_dict.sh.in} (89%) diff --git a/NPLib/CMakeLists.txt b/NPLib/CMakeLists.txt index 6f39ad175..e8cfdd815 100644 --- a/NPLib/CMakeLists.txt +++ b/NPLib/CMakeLists.txt @@ -32,6 +32,9 @@ if(NPMULTITHREADING) message("Building application with no MutilThreading Support") endif() +configure_file(scripts/build_dict.sh.in scripts/build_dict.sh @ONLY) + + configure_file(Core/NPLibVersion.h.in Core/NPLibVersion.h @ONLY) set(DETLIST ${ETLIST}) diff --git a/NPLib/Detectors/Samurai/TSamuraiFDC0Physics.h b/NPLib/Detectors/Samurai/TSamuraiFDC0Physics.h index bb17e6e52..e28c34596 100644 --- a/NPLib/Detectors/Samurai/TSamuraiFDC0Physics.h +++ b/NPLib/Detectors/Samurai/TSamuraiFDC0Physics.h @@ -36,11 +36,11 @@ #include "NPInputParser.h" #include "NPXmlParser.h" -#if __cplusplus > 199711L && NPMULTITHREADING -#include "NPDCReconstructionMT.h" -#else -#include "NPDCReconstruction.h" -#endif + #if __cplusplus > 199711L && NPMULTITHREADING + #include "NPDCReconstructionMT.h" + #else + #include "NPDCReconstruction.h" + #endif // ROOT #include "TVector3.h" @@ -48,8 +48,6 @@ // Forward declaration //class TSamuraiFDC0Spectra; - - class TSamuraiFDC0Physics : public TObject, public NPL::VDetector{ public: TSamuraiFDC0Physics(); @@ -89,10 +87,6 @@ class TSamuraiFDC0Physics : public TObject, public NPL::VDetector{ bool m_invertD;//! - public: - // Projected position at given Z plan - TVector3 ProjectedPosition(double Z); - private: // Charateristic of the DC void AddDC(std::string name, NPL::XmlParser&);//! take the XML file and fill in Wire_X and Layer_Angle std::map<SamuraiDCIndex,double> Wire_X;//! X position of the wires @@ -110,12 +104,12 @@ class TSamuraiFDC0Physics : public TObject, public NPL::VDetector{ // Construct the 2D track and ref position at Z=0 and Z=100 based on X,Z and Radius provided // Object use to perform the DC reconstruction - #if __cplusplus > 199711L && NPMULTITHREADING + #if __cplusplus > 199711L && NPMULTITHREADING NPL::DCReconstructionMT m_reconstruction;//! #else NPL::DCReconstruction m_reconstruction;//! #endif - + public: // Innherited from VDetector Class // Read stream at ConfigFile to pick-up parameters of detector (Position,...) using Token @@ -189,6 +183,12 @@ class TSamuraiFDC0Physics : public TObject, public NPL::VDetector{ TSamuraiFDC0Data* m_PreTreatedData;//! TSamuraiFDC0Physics* m_EventPhysics;//! + + public: + // Projected position at given Z plan + TVector3 ProjectedPosition(double Z){return TVector3(0,0,0);/*FIXME*/}; + + private: // Spectra Class // TSamuraiFDC0Spectra* m_Spectra; // ! diff --git a/NPLib/scripts/build_dict.sh b/NPLib/scripts/build_dict.sh.in similarity index 89% rename from NPLib/scripts/build_dict.sh rename to NPLib/scripts/build_dict.sh.in index c8ee5388c..a182332eb 100755 --- a/NPLib/scripts/build_dict.sh +++ b/NPLib/scripts/build_dict.sh.in @@ -59,7 +59,7 @@ fi # Version 6 or more : generate both at once if [ $version_major -gt 5 ] then - rootcint -f $2 -rmf $3 -rml $lib_name -I../Core -I../Physics -I../../Core -I../../Physics -I../TrackReconstruction -I../../TrackReconstruction $1 $5 + rootcint -f $2 -rmf $3 -rml $lib_name -DNPMULTITHREADING=@NPMULTITHREADING@ -I../Core -I../Physics -I../../Core -I../../Physics -I../TrackReconstruction -I../../TrackReconstruction $1 $5 fi -- GitLab