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/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/NPSimulation/CMakeLists.txt b/NPSimulation/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/README.md b/README.md index 3a371f85100ca788770a9d39cbc78e92baf48488..9fb9a81594f13c9c97f1bb6aaae1593bea0bb93e 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,9 @@ MATTA at a.matta@surrey.ac.uk 2. [Downloading from Git Hub](#downloading-from-git-hub) 2. [Setup](#setup) 1. [Requirements](#requirements) - 2. [Building NPLib](#building-nplib) - 3. [Building NPSimulation](#building-npsimulation) + 2. [Preparing the build](#preparing-the-build) + 3. [Building NPLib](#building-nplib) + 4. [Building NPSimulation](#building-npsimulation) 3. [Benchmarks and Examples](#benchmarks-and-examples) 1. [Benchmarks](#benchmarks) 2. [Examples](#examples) @@ -52,23 +53,27 @@ In order to compile NPSimulation, a recent installation of Geant4 (tested with version 9.6 and 10.1) is needed. If you want to use GDML format in NPTool, Geant4 should be installed with GDML support. +### Preparing the build +To set the needed environment variables, PATH and LD\_LIBRARY\_PATH, and +aliases, source the following script doing: +``` +source <pathname>/nptool/nptool.sh +``` +where `<pathname>` is the location where you unpacked the NPTool package. +Then, restart your terminal. + +You should typically add the previous command line to your .profile, +.bashrc or .tcshrc file. + ### Building NPLib NPLib is the core of the NPTool package, holding most of the actual code. It is made of a collection of stand alone C++ classes that can be used in programs and macros. -The first step is to define some environment variables. Open your .profile / -.bashrc / .tcshrc file in your home directory and add the following line: -``` -$ source /path/to/nptool/nptool.sh -``` -Then, restart your terminal. You should now have all aliases and environment -variable properly defined and can now access the NPLib folder by using the -command: -```` +First, go to the NPLib folder by using the command: +``` $ npl -```` -and you should be in the NPLib directory. +``` In order to prepare the compilation CMake must be run to generate the Makefile. If no arguments are given to CMake, all detectors will be compiled. If you wish diff --git a/README/README.md b/README/README.md index ccc8ff56f5fd33969f2c16d4c7dc8a9a2002f57e..7a7ad28b2260087bfc158093be53cc68b2856d77 100644 --- a/README/README.md +++ b/README/README.md @@ -29,4 +29,4 @@ the following convenience script and do: where `<pathname>` is the location where you unpacked the NPTool package. -Typically add these lines to your .profile or .bashrc or .tcshrc files. +Typically add these lines to your .profile or .bashrc or .tcshrc file.