Operating System
LAMPS is designed to be used in any version of Linux. The instructions below are for Ubuntu. It is possible to install and run under Windows using the Windows Subsystem for Linux (WSL) or Cygwin, however that is not recommended.Pre-Requisites
Login. Open a terminal window (Ctrl+Alt+T) and type these commands: $ sudo apt update (install all updates. Takes long.)
$ sudo apt install gcc (C compiler)
$ sudo apt install g++ (C++ compiler)
$ sudo apt install gfortran (Fortran compiler)
$ sudo apt install build-essential (build tools)
At present LAMPS uses the gtk2 graphical system (a port to gtk4 is underway)
$ sudo apt install libgtk2.0-dev (needed for LAMPS. Takes long.)
$ sudo apt install libcanberra-gtk-module (needed for LAMPS)
Unpacking and Compiling
$ tar zxvf lamps_offline-21-01-26.tgz (unpacks the archive)
$ cd src (change to src directory)
$ make (compiles LAMPS)
Compile with ROOT capability?(y/n)
Type n
We should first ensure everything is working without ROOT capability. If ROOT is installled and the
path to ROOT is correctly set, we can also compile with ROOT capability. This is explained below.
Running LAMPS
$ cd .. (go back to the upper level directory)
$ ./lamps (runs LAMPS)
Compiling with ROOT Capability
LAMPS can analyse list data that has been saved in ROOT format. In order to do that, you need to compile LAMPS with ROOT capability (ROOT should already be installed). LAMPS with ROOT capability, can also convert list data in ROOT format to LAMPS format (zls) and zls to root.So there are two compilation options for LAMPS (without ROOT capability and with ROOT capability). If you already compiled in one way and you would like to compile another way, it is required to $ make clean first so that there is no mix up. So, for example to compile with ROOT capabiility, if you aleady compiled earlier withour ROOT capability, type the following commands
$
cd ~/lamps_offline/src (go the src directory your lamps installation)
$ make clean (gets rid of all object and executable files)
Compile with ROOT capability?(y/n)
Type y or n (it does not matter)
$ make
Type y (this will compile with ROOT capability)
Upgarding your LAMPS installation
New versions of lamps_offline will be available quite often. The installation file will be named lamps_offline-dd-mm-yy.tgz. During upgrade, the file src/user.F will be overwritten. If you had made changes to user.F (user programmable module) it is very important that you keep a safe copy of user.F somewhere else. Other files (setup files, list-mode files, bgate files, spec files) will not be affected.- Delete the entire src directory under lamps_offline
- Copy the downloaded file lamps_offline-dd-mm-yy.tgz to lamps_offline directory
- Execute the tar command as above
- If you had a custom user.F file, restore it in the src directory
- Execute the make clean command in src directory
- Execute the make command