======================================================================================
# BnmrOffice Copyright© 2015
# README
# $Id date: 19.04.2015
======================================================================================
Description:
BnmrOffice is used to search, view, and analyze data, and especially TRIUMF data.
It also does many other things such as simulations, database interface, and converting units.
This program is developped by Hassan Saadaoui and the program is maintained as needed.
The pogram is open source and released under the General Pulbic Licence (GPL).
No warranty or guarrantee of the results is implied.
If you are using this software in offline data analysis, please acknowledge the author
in your acknowledgments section, if he is not a co-author of the project.
It is the least you can do to encourage future developments and maintenance of the code.
For any questions, please email at "saadaoui ^at^ triumf.ca".
Copyright© 2015
Install instructions
======================================================================================
0) Pre-install:
---------------------------------------------------------------------------------------
- In addition to bnmroffice, you also need: (I) Qt, (II) Minuit, (III) MUD, (IV) XMGR, (V) GSL.
- It is assumed for clarity, in all that follows, that you unpack your downloads
to your home folder ~/ (done using -C ~/ or -d ~/).
- That is optional, you may unpack somewhere else like; ~/softwares, ~/downloads.
Without -C or -d your unpacks will appear in your current directory.
- Any line here preceeded by the $ sign, is a command line that you may copy
and paste to your terminal.
- These instructions are meant for Linux users only. Mac users may find them useful,
and Windows is not supported yet.
- Download the latest bnmroffice from local computers, sourceforge, or github.
$ wget https://sourceforge.net/projects/bnmroffice/files/bnmroffice.tar.gz/download
- Unpack it
$ tar -xvf bnmroffice.tar.gz -C ~/
1) Qt: is the backbone of the GUI and coding of the entire bnmroffice software.
---------------------------------------------------------------------------------------
- Download the Qt online installer from http://www.qt.io/download-open-source/
- It is a light executable which downloads based on your system/selections.
- It provides all Qt 5.x binary & source packages and latest Qt Creator.
2) Minuit: used for fitting.
---------------------------------------------------------------------------------------
-i) Download latest Minuit2 located at:
http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/release/download.html
-ii) Unpack and cd
$ tar -xvf minuit.tar.gz -C ~/
$ cd ~/minuit
-ii) To install follor the instructions at:
http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/gettingStarted/autoconf.html
-iii) Make SURE that the tests in the tutorial are running as described in the link below
http://seal.web.cern.ch/seal/snapshot/work-packages/mathlibs/minuit/gettingStarted/testOutput.html
-iv) - Copy (as superuser) the miniut libraries from minuit/src/.lib/liblcg_Minuit.* to /usr/lib/
$ sudo cp minuit/src/.lib/liblcg_Minuit.* /usr/lib/
-v) - Update ldconfig
$ sudo ldconfig
Notes: it is somewhat a challenge to compile Minuit2. These extra notes maybe useful.
-Depending on your system, you may need to modify few codes namely src/MnUserTransformation.cpp
and add #include <cstdio> or #include <cstdio.h> just below #include <algorithm> and re-compile.
-Locate where libraries and header files are, hopefully in /usr/local/include/Minuit2, and /usr/local/lib/
-Add the path /usr/local/lib/ to /etc/ld.so.conf as described here
http://stackoverflow.com/questions/1099981/why-cant-python-find-shared-objects-that-are-in-directories-in-sys-path
$ export LD_LIBRARY_PATH=/usr/local/lib
or
$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
-Run ldconfig
$ sudo ldconfig
3) MUD: needed to read the TRIUMF .msr files.
---------------------------------------------------------------------------------------
-i) Download the MUD library source archive mud.tar.gz from http://musr.ca/mud.
$ wget http://musr.ca/mud/mud.tar.gz
-ii) Unpack and cd
$ tar -zxvf mud.tar.gz -C ~/
$ cd ~/mud
-iii) Run make with root access (read the install instructions withing the mud package)
$ sudo make all
-iv) Copy the files mud.h and libmud.a into /usr/lib/ and /usr/include/
$ sudo cp ./lib/libmud.a /usr/lib/
$ sudo cp ./src/mud.h /usr/include/
4) XMGR: for plotting, old but quick/robust gui, but makes publication quality figures.
---------------------------------------------------------------------------------------
-i) downloand and Unpack xmgr from https://github.com/mlund/xmgr-resurrection
$ wget https://github.com/mlund/xmgr-resurrection/archive/master.zip
$ unzip master.zip -d ~/
$ cd ~/xmgr-resurrection-master
-ii) XMGR has a feature of displaying the copyright each time it starts from a terminal.
This can obscure the user from seen the error messages produced by bnmroffice.
To avoid this, comment the lines 107-111 in main.c and save.
iii) Typically the following packages are required: libice-dev libx11-dev lesstif2-dev libxmu-dev libxpm-dev.
Install if not found in your OS. Try, on ubunto/related systems, get-all (or your system's alternative).
$ sudo get-all install libice-dev libx11-dev lesstif2-dev libxmu-dev libxpm-dev
-iv) Read README.md to compile the code. Each system is different; try these given steps:
$ cmake . -DENABLE_NETCDF=on
$ cmake . -DCMAKE_INSTALL_PREFIX=/usr/local
$ make
$ sudo make install
-v) If all went well, open the execuatble "xmgr" located likely in src/ or somewhere else within your folder.
-vi) You must locate this file and copy it to /usr/bin /usr/local/bin/ and if it is not already there.
$ sudo cp xmgr /usr/bin/
$ sudo cp xmgr /usr/local/bin/
Note: Please contact for other options if your are unable to install XMGR.
5) gsl: (optional) for doing some math.
---------------------------------------------------------------------------------------
This is optional, only needed to compile some fitting functions in fct/
-i) download latest gsl from http://gnu.mirror.iweb.com/gsl/
-ii) Unpack and cd
$ tar -xvf gsl-latest.tar.gz -C ~/
$ cd ~/gsl-latest
-iii) Run configure
$ ./configure
-iv) Run make
$ make
-v) Run make install as root
$ sudo make install
-vi) Update libraries cache
$ sudo ldconfig
6) bnmroffice:
---------------------------------------------------------------------------------------
-i) cd to the downloaded package
$ cd ~/bnmroffice
-ii) change the path to bnmr Data, and bnqr Data as defined in constants.h
$ gedit src/constants.h
-iii) If Qt binaries are not in your path, set the env (Must locate where qmake is)
$ PATH=/usr/Qt/5.4/gcc_64/bin:$PATH (change "/usr/Qt/5.4/gcc_64/bin" as per your system)
$ export PATH
-iv) Run qmake. [Optional: to modify the default install location use $qmake PREFIX=/your/location ]
$ qmake
-v ) Run make and make install (as root)
$ make
$ sudo make install
-vi) cd to directory fct/ and compile all the libraries using the script compile
$ cd fct
$ sudo ./compile
-vi) To test the gui, invoke
$ bnmroffice
or
$./bnmroffice if not installed as root.
Last comments
---------------------------------------------------------------------------------------
Read the instructions/tutorials under ------> menubar/Help <--------
Hassan Saadaoui, 06.02.2015.
saadaoui ^at^ triumf.ca
Copyright© 2015
===========================================================================================