Skip to content
Snippets Groups Projects
Commit e1378508 authored by de Séréville Nicolas's avatar de Séréville Nicolas
Browse files

Merge branch 'NPTool.2.dev' of https://github.com/adrien-matta/nptool into NPTool.2.dev

parents 4d7d6bfd 473831ad
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ void LoadChain() ...@@ -9,7 +9,7 @@ void LoadChain()
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void ShowResult() void ShowResults()
{ {
// load chain from result // load chain from result
LoadChain(); LoadChain();
......
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
TCanvas* canvas1 ; TCanvas* canvas1 ;
TCanvas* canvas2 ; TCanvas* canvas2 ;
void ControlSimu(const char * fname = "benchmark_gaspard"){ void ShowResults(const char * fname = "benchmark_gaspard")
{
// for the style // for the style
gROOT->SetStyle("nptool"); gROOT->SetStyle("nptool");
gROOT->ForceStyle(false); gROOT->ForceStyle(false);
......
...@@ -21,7 +21,7 @@ chain->Add("../../Outputs/Analysis/Example1.root"); ...@@ -21,7 +21,7 @@ chain->Add("../../Outputs/Analysis/Example1.root");
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void ShowResult(){ void ShowResults(){
LoadChain(); LoadChain();
LoadCuts(); LoadCuts();
......
...@@ -8,7 +8,7 @@ return chain; ...@@ -8,7 +8,7 @@ return chain;
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void ShowResult(){ void ShowResults(){
gROOT->SetStyle("nptool"); gROOT->SetStyle("nptool");
gROOT->ForceStyle(); gROOT->ForceStyle();
TChain* chain = LoadChain(); TChain* chain = LoadChain();
......
...@@ -56,6 +56,49 @@ if [ -f ./liblist ] ; then ...@@ -56,6 +56,49 @@ if [ -f ./liblist ] ; then
rm ./liblist rm ./liblist
fi 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 # common to NPLib and NPSimulation
############################################################ ############################################################
...@@ -74,135 +117,40 @@ if [ -f ./install_manifest.txt ] ; then ...@@ -74,135 +117,40 @@ if [ -f ./install_manifest.txt ] ; then
rm ./install_manifest.txt rm ./install_manifest.txt
fi 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 # bin directory
for file in ./bin/*
do
if [ -f $file ] ; then
rm $file
fi ;
done
if [ -d ./bin ] ; then if [ -d ./bin ] ; then
rmdir ./bin rm -rf ./bin
fi ; fi ;
# include directory
for file in ./include/*
do
if [ -f $file ] ; then
rm $file
fi ;
done
# lib directory # lib directory
for file in ./lib/*
do
if [ -f $file ] ; then
rm $file
fi ;
done
if [ -d ./lib ] ; then if [ -d ./lib ] ; then
rmdir ./lib rm -rf ./lib
fi ; fi ;
# .so extention # .so extention
for file in ./*/*.so rm -f `find . -maxdepth 3 -type f -name "*.so"`
do
if [ -f $file ] ; then
rm $file
fi ;
done
for file in ./*/*/*.so
do
if [ -f $file ] ; then
rm $file
fi ;
done
# .dylib extention # .dylib extention
for file in ./*/*.dylib rm -f `find . -maxdepth 3 -type f -name "*.dylib"`
do
if [ -f $file ] ; then # .rootmap extention
rm $file rm -f `find . -maxdepth 3 -type f -name "*.rootmap"`
fi ;
done # .pcm extention
for file in ./*/*/*.dylib rm -f `find . -maxdepth 3 -type f -name "*.pcm"`
do
if [ -f $file ] ; then
rm $file
fi ;
done
# dictionnary files # dictionnary files
for file in ./*/*Dict* rm -f `find . -maxdepth 3 -type f -name "*Dict*"`
do
if [ -f $file ] ; then
rm $file
fi ;
done
for file in ./*/*/*Dict*
do
if [ -f $file ] ; then
rm $file
fi ;
done
# Makefile files # Makefile files
if [ -f ./Makefile ] ; then rm -f `find . -maxdepth 3 -type f -name Makefile`
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
# cmake_install.cmake files # cmake_install.cmake files
if [ -f ./cmake_install.cmake ] ; then rm -f `find . -maxdepth 3 -type f -name cmake_install.cmake`
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
# .ninja files # .ninja files
for file in ./*/.ninja rm -f `find . -maxdepth 3 -type f -name "*.ninja"`
do
if [ -f $file ] ; then
rm $file
fi ;
done
for file in ./*/*/.ninja
do
if [ -f $file ] ; then
rm $file
fi ;
done
# CMakeFiles directories # CMakeFiles directories
rm -rf `find . -maxdepth 3 -type d -name CMakeFiles` rm -rf `find . -maxdepth 3 -type d -name CMakeFiles`
#! /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`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment