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

+ Update basic.sh script to take new location of example files

  in $NPTOOL/NPData
+ get the NPData directory in .travis.yml
parent 07236caa
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,14 @@ before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install homebrew/science/root; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install homebrew/science/geant4; fi
# Dumping stuff for check
- root-config --version
# Install NPData needed to run examples suite
- cd $NPTOOL
- git clone https://github.com/adrien-matta/NPData
install:
script:
......
File deleted
File deleted
......@@ -3,10 +3,16 @@
# exit on error, and verbose
set -ev
# can run the app
#####################################################################
# Test that npanalylsis can run
#####################################################################
npanalysis -h
# Compile Example1
#####################################################################
# Example 1
#####################################################################
# Compile
cd $NPTOOL/Examples/Example1
cmake ./
if [ -e Makefile ]
......@@ -15,12 +21,28 @@ then
else
ninja
fi
# Moving reference test simulation
cp $NPTOOL/Examples/Example1/Example1_Simu.root $NPTOOL/Outputs/Simulation/Example1.root
npanalysis -R RunToTreat.txt -O Example1
echo ".q" | root -b -l ShowResult.cxx
# Check whether simulation file exist or not
if [ -e $NPTOOL/NPData/Example1_Simu.root ]
then
# Moving reference simulation file to Outputs directory
cp $NPTOOL/NPData/Example1_Simu.root $NPTOOL/Outputs/Simulation/Example1.root
# Run npanalysis
npanalysis -R RunToTreat.txt -O Example1
# Run the ShowResult ROOT macro
echo ".q" | root -b -l ShowResult.cxx
else
# Case where reference simulation file does not exist
echo "Warning!!! file $NPTOOL/NPData/Example1_Simu.root does not exist"
echo "Go to the $NPTOOL directory and install it using the following"
echo "command:"
echo "git clone https://github.com/adrien-matta/NPData"
fi
#####################################################################
# Example 2
#####################################################################
# Compile Example2
cd $NPTOOL/Examples/Example2
cmake ./
......@@ -30,7 +52,20 @@ then
else
ninja
fi
cp $NPTOOL/Examples/Example2/Example2_Simu.root $NPTOOL/Outputs/Simulation/Example2.root
npanalysis -R RunToTreat.txt -O Example2
echo ".q" | root -b -l ShowResult.cxx
# Check whether simulation file exist or not
if [ -e $NPTOOL/NPData/Example2_Simu.root ]
then
# Moving reference simulation file to Outputs directory
cp $NPTOOL/NPData/Example2_Simu.root $NPTOOL/Outputs/Simulation/Example2.root
# Run npanalysis
npanalysis -R RunToTreat.txt -O Example2
# Run the ShowResult ROOT macro
echo ".q" | root -b -l ShowResult.cxx
else
# Case where reference simulation file does not exist
echo "Warning!!! file $NPTOOL/NPData/Example1_Simu.root does not exist"
echo "Go to the $NPTOOL directory and install it using the following"
echo "command:"
echo "git clone https://github.com/adrien-matta/NPData"
fi
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