diff --git a/Benchmarks/cats/ShowResults.C b/Benchmarks/cats/ShowResults.C index a77765fb2d24269c3458eaeb302241c97b74e00c..d2a3412b22066c6ae9ac295ba1be4eb83896ea33 100644 --- a/Benchmarks/cats/ShowResults.C +++ b/Benchmarks/cats/ShowResults.C @@ -9,7 +9,7 @@ void LoadChain() } //////////////////////////////////////////////////////////////////////////////// -void ShowResult() +void ShowResults() { // load chain from result LoadChain(); diff --git a/Benchmarks/gaspard/ShowResults.C b/Benchmarks/gaspard/ShowResults.C index 78d970325d6cee73e8184770a9b832cd6f7fcc17..3088fb57b1c8e39cdce9270d5ec728bdd8aaedef 100644 --- a/Benchmarks/gaspard/ShowResults.C +++ b/Benchmarks/gaspard/ShowResults.C @@ -43,7 +43,8 @@ TCanvas* canvas1 ; TCanvas* canvas2 ; -void ControlSimu(const char * fname = "benchmark_gaspard"){ +void ShowResults(const char * fname = "benchmark_gaspard") +{ // for the style gROOT->SetStyle("nptool"); gROOT->ForceStyle(false); diff --git a/Examples/Example1/ShowResults.C b/Examples/Example1/ShowResults.C index 0a734b2a1a9c5f772af4201ec44b935a9cb34182..6c2d5867b0550fafc5bc08cc53d8a0a17037d5cb 100644 --- a/Examples/Example1/ShowResults.C +++ b/Examples/Example1/ShowResults.C @@ -21,7 +21,7 @@ chain->Add("../../Outputs/Analysis/Example1.root"); } //////////////////////////////////////////////////////////////////////////////// -void ShowResult(){ +void ShowResults(){ LoadChain(); LoadCuts(); diff --git a/Examples/Example2/ShowResults.C b/Examples/Example2/ShowResults.C index 96bc3481ab23e733b8c2f869d3771e7dc3d72435..3da629ce34bd0fa5fcba4e423ab15631ffee27e2 100644 --- a/Examples/Example2/ShowResults.C +++ b/Examples/Example2/ShowResults.C @@ -8,7 +8,7 @@ return chain; } //////////////////////////////////////////////////////////////////////////////// -void ShowResult(){ +void ShowResults(){ gROOT->SetStyle("nptool"); gROOT->ForceStyle(); TChain* chain = LoadChain(); diff --git a/NPLib/scripts/nptool-cleaner.sh b/NPLib/scripts/nptool-cleaner.sh index 453130c210ba5231a47c40c72aeffba878ad72f4..e6976d1a8c3f261a4f64aecc81cbaa5cea7cf9f0 100755 --- a/NPLib/scripts/nptool-cleaner.sh +++ b/NPLib/scripts/nptool-cleaner.sh @@ -56,6 +56,49 @@ if [ -f ./liblist ] ; then rm ./liblist fi +# include directory +for file in ./include/* +do + if [ -f $file ] ; then + rm $file + fi ; +done + +# NPLibTargets.cmake file +if [ -f ./NPLibTargets.cmake ] ; then + rm ./NPLibTargets.cmake +fi + +# NPLibConfig.cmake file +if [ -f ./NPLibConfig.cmake ] ; then + rm ./NPLibConfig.cmake +fi + +# remove Utility executables +if [ -f ./Utility/npanalysis ] ; then + rm ./Utility/npanalysis +fi +if [ -f ./Utility/nponline ] ; then + rm ./Utility/nponline +fi +if [ -f ./Utility/nptool-installer ] ; then + rm ./Utility/nptool-installer +fi +if [ -f ./Utility/nptool-cleaner ] ; then + rm ./Utility/nptool-cleaner +fi +if [ -f ./Utility/nptool-wizard ] ; then + rm ./Utility/nptool-wizard +fi + +############################################################ +# specific to NPLib +############################################################ +# remove npsimulation executable +if [ -f ./npsimulation ] ; then + rm ./npsimulation +fi + ############################################################ # common to NPLib and NPSimulation ############################################################ @@ -74,135 +117,40 @@ if [ -f ./install_manifest.txt ] ; then rm ./install_manifest.txt fi -# NPLibTargets.cmake file -if [ -f ./NPLibTargets.cmake ] ; then - rm ./NPLibTargets.cmake -fi - -# NPLibConfig.cmake file -if [ -f ./NPLibConfig.cmake ] ; then - rm ./NPLibConfig.cmake -fi - # bin directory -for file in ./bin/* -do - if [ -f $file ] ; then - rm $file - fi ; -done if [ -d ./bin ] ; then - rmdir ./bin + rm -rf ./bin fi ; -# include directory -for file in ./include/* -do - if [ -f $file ] ; then - rm $file - fi ; -done - # lib directory -for file in ./lib/* -do - if [ -f $file ] ; then - rm $file - fi ; -done if [ -d ./lib ] ; then - rmdir ./lib + rm -rf ./lib fi ; # .so extention -for file in ./*/*.so -do - if [ -f $file ] ; then - rm $file - fi ; -done -for file in ./*/*/*.so -do - if [ -f $file ] ; then - rm $file - fi ; -done +rm -f `find . -maxdepth 3 -type f -name "*.so"` # .dylib extention -for file in ./*/*.dylib -do - if [ -f $file ] ; then - rm $file - fi ; -done -for file in ./*/*/*.dylib -do - if [ -f $file ] ; then - rm $file - fi ; -done +rm -f `find . -maxdepth 3 -type f -name "*.dylib"` + +# .rootmap extention +rm -f `find . -maxdepth 3 -type f -name "*.rootmap"` + +# .pcm extention +rm -f `find . -maxdepth 3 -type f -name "*.pcm"` # dictionnary files -for file in ./*/*Dict* -do - if [ -f $file ] ; then - rm $file - fi ; -done -for file in ./*/*/*Dict* -do - if [ -f $file ] ; then - rm $file - fi ; -done +rm -f `find . -maxdepth 3 -type f -name "*Dict*"` # Makefile files -if [ -f ./Makefile ] ; then - rm ./Makefile -fi -for file in ./*/Makefile -do - if [ -f $file ] ; then - rm $file - fi ; -done -for file in ./*/*/Makefile -do - if [ -f $file ] ; then - rm $file - fi ; -done +rm -f `find . -maxdepth 3 -type f -name Makefile` # cmake_install.cmake files -if [ -f ./cmake_install.cmake ] ; then - rm ./cmake_install.cmake -fi -for file in ./*/cmake_install.cmake -do - if [ -f $file ] ; then - rm $file - fi ; -done -for file in ./*/*/cmake_install.cmake -do - if [ -f $file ] ; then - rm $file -fi ; -done +rm -f `find . -maxdepth 3 -type f -name cmake_install.cmake` # .ninja files -for file in ./*/.ninja -do - if [ -f $file ] ; then - rm $file - fi ; -done -for file in ./*/*/.ninja -do - if [ -f $file ] ; then - rm $file - fi ; -done +rm -f `find . -maxdepth 3 -type f -name "*.ninja"` # CMakeFiles directories rm -rf `find . -maxdepth 3 -type d -name CMakeFiles` + diff --git a/NPLib/scripts/nptool-cleaner_new.sh b/NPLib/scripts/nptool-cleaner_new.sh deleted file mode 100755 index e6976d1a8c3f261a4f64aecc81cbaa5cea7cf9f0..0000000000000000000000000000000000000000 --- a/NPLib/scripts/nptool-cleaner_new.sh +++ /dev/null @@ -1,156 +0,0 @@ -#! /bin/bash - -# define paths -printf -v pathNPT $NPTOOL -printf -v pathNPL $NPTOOL/NPLib -printf -v pathNPS $NPTOOL/NPSimulation -printf -v path $PWD - -# check whether path is authorized to run script -current="" -if [ "$path" == "$pathNPL" ] ; then - current="NPLib" -elif [ "$path" == "$pathNPS" ] ; then - current="NPSimulation" -else - printf "\r\033[1;31m" - printf "ERROR: nptool-cleaner must be used in one of the following directory\n" - printf "\t- %s\n" "$pathNPL" - printf "\t- %s\n" "$pathNPS" - exit -fi ; - -# if authorized path, warn the user and ask whether (s)he wants to proceed or not -printf "\r\033[1;31m" -printf "********************************************************************************\n" -printf "********************************************************************************\n" -printf "**** You are about to clean %s\n" "$current" -printf "**** -> The folder will be reverted to pre-CMake stage\n" -printf "**** -> Only generated files will be suppressed\n" -printf "**** -> %s will not be usable without recompilation\n" "$current" -printf "**** -> Do you want to proceed? (y/n)\n" -printf "\033[0m" - -read answer -# yes case -if [ "$answer" == "y" ] || [ "$answer" == "Y" ] ; then - printf "Proceeding....\n" -# no case -elif [ "$answer" == "n" ] || [ "$answer" == "N" ] ; then - printf "Aborting....\n" - exit -else -# other case - printf "Reply by y (yes) or n (no), nothing done...\n" -fi ; - -############################################################ -# doing the actual cleaning -############################################################ - -############################################################ -# specific to NPLib -############################################################ -# liblist file -if [ -f ./liblist ] ; then - rm ./liblist -fi - -# include directory -for file in ./include/* -do - if [ -f $file ] ; then - rm $file - fi ; -done - -# NPLibTargets.cmake file -if [ -f ./NPLibTargets.cmake ] ; then - rm ./NPLibTargets.cmake -fi - -# NPLibConfig.cmake file -if [ -f ./NPLibConfig.cmake ] ; then - rm ./NPLibConfig.cmake -fi - -# remove Utility executables -if [ -f ./Utility/npanalysis ] ; then - rm ./Utility/npanalysis -fi -if [ -f ./Utility/nponline ] ; then - rm ./Utility/nponline -fi -if [ -f ./Utility/nptool-installer ] ; then - rm ./Utility/nptool-installer -fi -if [ -f ./Utility/nptool-cleaner ] ; then - rm ./Utility/nptool-cleaner -fi -if [ -f ./Utility/nptool-wizard ] ; then - rm ./Utility/nptool-wizard -fi - -############################################################ -# specific to NPLib -############################################################ -# remove npsimulation executable -if [ -f ./npsimulation ] ; then - rm ./npsimulation -fi - -############################################################ -# common to NPLib and NPSimulation -############################################################ -# ClassList.txt file -if [ -f ./ClassList.txt ] ; then - rm ./ClassList.txt -fi - -# CMakeCache.txt file -if [ -f ./CMakeCache.txt ] ; then - rm ./CMakeCache.txt -fi - -# install_manifest.txt file -if [ -f ./install_manifest.txt ] ; then - rm ./install_manifest.txt -fi - -# bin directory -if [ -d ./bin ] ; then - rm -rf ./bin -fi ; - -# lib directory -if [ -d ./lib ] ; then - rm -rf ./lib -fi ; - -# .so extention -rm -f `find . -maxdepth 3 -type f -name "*.so"` - -# .dylib extention -rm -f `find . -maxdepth 3 -type f -name "*.dylib"` - -# .rootmap extention -rm -f `find . -maxdepth 3 -type f -name "*.rootmap"` - -# .pcm extention -rm -f `find . -maxdepth 3 -type f -name "*.pcm"` - -# dictionnary files -rm -f `find . -maxdepth 3 -type f -name "*Dict*"` - -# Makefile files -rm -f `find . -maxdepth 3 -type f -name Makefile` - -# cmake_install.cmake files -rm -f `find . -maxdepth 3 -type f -name cmake_install.cmake` - -# .ninja files -rm -f `find . -maxdepth 3 -type f -name "*.ninja"` - -# CMakeFiles directories -rm -rf `find . -maxdepth 3 -type d -name CMakeFiles` -