3
edits
No edit summary |
No edit summary |
||
e-Print: arXiv:1107.3512 [hep-ph] https://arxiv.org/pdf/1107.3512.pdf
**DEPRECATED: Updated Twiki in progress.**
== RAT for Ricochet ==
1. '''Install Prerequisites''' - Before downloading RAT, make sure you [https://github.com/rat-pac/rat-pac/blob/master/doc/installation.rst '''install the software packages in this order'''].
* https://deapclean.org/rat/trac/wiki/UserGuide/Simulation/Generators/Top
* https://deapclean.org/rat/trac/wiki/RATDB_GEO
== New ==
GitLab: https://git.ipnl.in2p3.fr/ricochet/
The following is a work in progress.
# Research Notes
## Installation
Sourcing environment for ROOT and RicochetSim
```bash
source /afs/hep.wisc.edu/ddm/Ricochet/env.sh; source /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/setup.sh
```
make a `build` directory in `/SimuAnalysis/`
from `/SimuAnalysis/build` directory
**CMake Step**
Run the following
```bash
cmake -DCMAKE_INSTALL_PREFIX=/afs/hep.wisc.edu/users/decheine/myapps -DCMAKE_CXX_FLAGS=-isystem\ /afs/hep.wisc.edu/ddm/Ricochet/CLHEP_dir/build ..
```
or whatever install directory you'd want, the default is /usr/local.
== Installation ==
Sourcing environment for ROOT and RicochetSim
```bash
source /afs/hep.wisc.edu/ddm/Ricochet/env.sh; source /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/setup.sh
```
make a `build` directory in `/SimuAnalysis/`
from `/SimuAnalysis/build` directory
**CMake Step**
Run the following
```bash
cmake -DCMAKE_INSTALL_PREFIX=/afs/hep.wisc.edu/users/decheine/myapps -DCMAKE_CXX_FLAGS=-isystem\ /afs/hep.wisc.edu/ddm/Ricochet/CLHEP_dir/build ..
```
or whatever install directory you'd want, the default is /usr/local.
### Notes on Installation
#### Misc. Util commands
List the sizes and sort directories
> du -h --max-depth=1 | sort -hr
```bash
source /afs/hep.wisc.edu/ddm/Ricochet/env.sh; source /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/setup.sh
```
#### Workaround Commands
These three are run after cmake is run. With new branch, these might not be needed
```bash
find CMakeFiles/*.dir/link.txt -type f -exec grep -l "/builds/deployment/deploy-externals/build/lib" {} \; | xargs sed -i 's/\/builds\/deployment\/deploy\-externals\/build\/lib/\/cvmfs\/lz.opensciencegrid.org\/external\/ROOT\/6.16.00\/x86_64-centos7-gcc7-opt\/lib/g'; find CMakeFiles/*.dir/build.make -type f -exec grep -l "/builds/deployment/deploy-externals/build/lib" {} \; | xargs sed -i 's/\/builds\/deployment\/deploy\-externals\/build\/lib/\/cvmfs\/lz.opensciencegrid.org\/external\/ROOT\/6.16.00\/x86_64-centos7-gcc7-opt\/lib/g'; find CMakeFiles/*.dir/flags.make -type f -exec grep -l "++1z" {} \; | xargs sed -i 's/++1z/++17/g'; find CMakeFiles/*.dir/flags.make -type f -exec grep -l "++14" {} \; | xargs sed -i 's/++14/++17/g'
```
and for RicochetSim
```bash
find */CMakeFiles/*.dir/link.txt -type f -exec grep -l "/builds/deployment/deploy-externals/build/lib" {} \; | xargs sed -i 's/\/builds\/deployment\/deploy\-externals\/build\/lib/\/cvmfs\/lz.opensciencegrid.org\/external\/ROOT\/6.16.00\/x86_64-centos7-gcc7-opt\/lib/g'; find */CMakeFiles/*.dir/build.make -type f -exec grep -l "/builds/deployment/deploy-externals/build/lib" {} \; | xargs sed -i 's/\/builds\/deployment\/deploy\-externals\/build\/lib/\/cvmfs\/lz.opensciencegrid.org\/external\/ROOT\/6.16.00\/x86_64-centos7-gcc7-opt\/lib/g'; find CMakeFiles/*.dir/flags.make -type f -exec grep -l "++1z" {} \; | xargs sed -i 's/++1z/++17/g'; find CMakeFiles/*.dir/flags.make -type f -exec grep -l "++14" {} \; | xargs sed -i 's/++14/++17/g'
```
**CLHEP Fix**
add `-DCMAKE_CXX_FLAGS=-isystem\ /afs/hep.wisc.edu/ddm/Ricochet/CLHEP_dir/build` flag to the cmake call
In SimuEventDisplay.dir/build.make, line 82 has
``` d
SimuEventDisplay: /cvmfs/sft.cern.ch/lcg/releases/gcc/7.3.0-cb1ee/x86_64-centos7/include/TEveManager.h
```
Maybe this should be
**WORKING** Added "ROOT::Eve" to both include statements
Two header files that are misbehaving are Counter.h and SimuHisto.h
GOT IT. NEED TO PUT `${PROJECT_NAME}$` at the end of the second 'target_link_libraries(...)'
rule to replace /builds/deployment/deploy-externals/build/lib/ with /cvmfs/lz.opensciencegrid.org/external/ROOT/6.16.00/x86_64-centos7-gcc7-opt/
#### Directories
<u>Cmake binary</u>
/afs/hep.wisc.edu/ddm/Ricochet/cmake-3.12.1/bin
<u>CXX Compiler</u>
/cvmfs/cms.cern.ch/slc6_amd64_gcc530/external/gcc/5.3.0/bin/c++
Using
```bash
cmake -DCMAKE_CXX_FLAGS=-isystem\ /afs/hep.wisc.edu/ddm/Ricochet/CLHEP_dir/build -DCMAKE_CXX_COMPILER=/cvmfs/cms.cern.ch/slc6_amd64_gcc530/external/gcc/5.3.0/bin/c++ ..
```
Fixes the "string_view" problem and makes it compile with c++ 17. or not i guess
**String_view problem** just delete build folder, and make sure to include
```cmake
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
```
do cmake again
<u>ROOT</u>
/cvmfs/lz.opensciencegrid.org/external/ROOT/6.16.00/x86_64-centos7-gcc7-opt/
This needs to be in the include directory: /cvmfs/lz.opensciencegrid.org/external/ROOT/6.16.00/x86_64-centos7-gcc7-opt/include/
#### Procedures
Listed here are some miscellaneous commands and tricks that may be useful.
In root, get the include path with `root[] .I`
To search a directory `path `in linux for files that contain text `"string"`,
``` bash
grep -rl "string" /path
```
List the ROOT LIBRARIES
```bash
root-config --glibs
```
|
edits