You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: episodes/00-setup.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,3 +83,40 @@ You can test that your installation is functional by running:
83
83
rat macros/validation/electron.mac
84
84
```
85
85
A simulation should be performed, and rat should exit with no error. You should now see a log file as well as `output.root` in your directory. Congratulations, you now have a working version of RATPAC2!
86
+
87
+
## via ratpac-setup
88
+
We also provide a script to facilitate dependency installation and management. You can find it [here](https://github.com/rat-pac/ratpac-setup#).
89
+
::::: caution
90
+
`ratpac-setup` is written primarily with Ubuntu 22.04 in mind. However, many RAT developers have tried it out in different distros, including fedora and arch linux. MacOS should work as well.
91
+
:::::
92
+
There are some packages that ratpac-setup assumes to be present in the operating system. You can make sure that they are installed with the following one-liner in ubuntu:
Most of these packages should already be present on a standard linux system. On distros other than ubuntu, you probably need to change some of the package names. Please reach out to us if you run into trouble with this.
100
+
101
+
You can then install the needed dependencies using `setup.sh`. There's many packages provided. We recommend at least the following:
You can append `-j$(nproc)` to use all available CPUs on your system for compilation. This is highly recommended, especially for root and geant4, since they take quite a while to compile.
106
+
107
+
After this is complete, you can then access all the installed packages in your shell with `source env.sh`. Then you can follow the standard RAT compilation instructions:
108
+
```sh
109
+
git clone git@github.com:rat-pac/ratpac-two.git
110
+
cd ratpac-two
111
+
make # add -j $(nproc) if you would like to compile on multiple cores (recommended).
112
+
source ratpac.sh
113
+
```
114
+
and _voila_!
115
+
:::::callout
116
+
You can also install ratpac-two itself via `./setup.sh ratpac`, but this is not recommended if you plan on working on the code yourself.
117
+
:::::
118
+
:::::caution
119
+
A common mishap with this method is that you are running these commands in a shell polluted by other enviornment variables. Be extra careful that you do not have another instance of root or geant4 installed somewhere else on your system that's polluting your environment variables, as this might cause the compilation procedure to misbehave. Double check that there's no reference to external geant4/root installed in your `~/.bashrc`. You can also examine the environment variables currently set in your shell by running `env`. Make sure that there's no variables pointing to binaries / data files elsewhere in your system.
120
+
121
+
Whenever a installation breaks, the first thing to try should be to close out of your terminal / ssh session, and try the install again in a clean shell.
0 commit comments