This is a carbon copy of my ELOG entry. For the latest version, go to:
http://pcfj.hep.phy.cam.ac.uk:8080/slater/23
;
Installing
Here is how to install NanoBPMConverter from scratch on nanosun (note: everything is placed in ~/NanoRoot)
Root - ftp://root.cern.ch/root/root_v5.12.00.Linux.slc3.gcc3.2.3.tar.gz
Download and untar the distro.
make sure the following variables are set in the .cshrc file:
setenv ROOTSYS /home/user1/NanoRoot/root/
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${ROOTSYS}/lib
setenv PATH ${PATH}:${ROOTSYS}/bin
fftw - http://www.fftw.org/fftw-3.1.2.tar.gz
Download and untar the distro.
./configure --prefix=/home/user1/NanoRoot
make
make install
libespec - http://cvs.hep.ucl.ac.uk/viewcvs/especSoft/libespec/?cvsroot=LC+Energy+Spectrometer
Download the tar ball, etc.
Make sure the following are set:# Set up generic gcc stuff
setenv CFLAGS -I/home/user1/NanoRoot/include
setenv LDFLAGS -L/home/user1/NanoRoot/lib
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${HOME}/NanoRoot/lib
You may need to change the configure.ac file. Change the following:
AC_CHECK_HEADER(fftw3.h, \[\], AC_MSG_ERROR([the <fftw3.h> header file could not be found.]))
to
dnl AC_CHECK_HEADER(fftw3.h, \[\],
dnl AC_MSG_ERROR([the <fftw3.h> header file could not be found.]))
go to the directory
./bootstrap
./configure --prefix=/home/user1/NanoRoot
make
make install
libNano - http://cvs.hep.ucl.ac.uk/viewcvs/especSoft/libNano/?cvsroot=LC+Energy+Spectrometer
get tar ball, etc.
you may need to do the following:
mkdir build_aux
then:
autoreconf --install --force
./configure --prefix=/home/user1/NanoRoot
make
make install
NanoBPMConverter - http://cvs.hep.ucl.ac.uk/viewcvs/especSoft/NanoBPMConverter/?cvsroot=LC+Energy+Spectrometer
tar ball blah blah...
autoreconf --install --force
./configure --prefix=/home/user1/NanoRoot/NanoBPMConverter
(note: accept the defaults for the matlab libraries)
make
make install
Map and Cal files
NanoBPMConverter uses two calibration files to run, the map file and the cal file:
Map file
Entries correspond to the following:chan# sis# sis_chan# name ref_chan# adc_bits adc_samp_rate start_fit trig_chan freq decay cut_off
To create a map file, do the following:
go to the /home/user1/NanoRoot/NanoBPMConverter/scripts
root -l
.L CreateChannelMap.cxx
CreateChannelMap("default.map")
.q
edit default.map and remove any channels you're not interested in.
Recreate the root files for the calibration run you want to use but make sure you select -fit, specify the default.map as the channel map and don't supply a calibration.
Then edit/create a new file in /home/user1/NanoRoot/NanoBPMConverter/scripts which is a copy of 'CreateAprilMap.cxx' but with the files replaced with the ones just created and an appropriate name.
Do the following:
root -l
.L CreateChannelMap.cxx
.x CreateAprilMap.cxx
.q
This will create the new channel map that can be used after this.
Cal file
Entries correspond to the following:
sis# sis_chan# fit_iq fit_scale fit_scaleprime ddc_iq ddc_scale ddc_scaleprime
The latest calibration is pointed to by /home/user1/NanoRoot/root_data/calibration.cal