How to compile and run Tscan - Qscan code
Jan / 12 /2003 Amended by Susumu SATO (for description also for "Tscan at IR (in Y3)")
Nov / 12 /2002 modified by Shingo Sakai (for TOF FEM Bench test)
Oct / 26 /2001 modified by Hiroshi Tsuruoka
Jul / 20 / 2000 Miwako Suzuki ( The original document is here ; cvs online/monitoring/tof/doc )
0.Setup
> ssh -l (your name) rsshgw
> ssh rcas2070
> source /opt/phenix/bin/phenix_setup.csh
> cd (your working directory)
> mkdir tscan
> cd tscan/
1.Checkout from CVS and conpile the source code
> cvs co -d . online/monitoring/tof
> mkdir install
> mkdir build
> cd build/
> ../autogen.sh --prefix= (your working directory) /tscan/install
> make
> make install
2.Procedure to analyse T(Q)scan'ed data
2-1 check four files
> cd ../wrk [[ or cd (your working directory) /tscan/wrk ]]
Note : You Should have the following files under this directory to run Tscan code.
TofOnlCal.C draw.C tofcablemap.txt toffemmap.txt.year1
2-2 modify TofOnlCal.C
You must modify TofOnlCal.C in the 10th line from the top.
> emacs TofOnlCal.C &
10th line
before gSystem->Load("libtof_online.so");
after gSystem->Load(" (your working directory) /tscan/install/lib/ libtof_online.so");
2-3a copy data files to be secure place. it
(2-3a(I) For T&Q-scan with bench-test setup,) va007:/home/phoncs/junkdata/tof/>
scp -r timecal.(run)/ your_accout@rftpexp.rhic.bnl.gov:/phenix/data20/TOF_FEE_BENCH_TEST
(2-3a(II)For Tscan at IR,)
there is much faster way(from va(linux)## machine's disk
"/common/buffer1(or2etc.)/calibdata(or juncdata etc.)"
to rcas(linux)#### machine's disk "/phenix/data20(or other data##)/":
(FOR EXAMPLE)
va_machine::phnxtof> scp /common/buffer2/calibdata/rc-00643[1-4]?-TOF.E*.prdf
ssato@rftpexp.rhic.bnl.gov:/phenix/data20/ssato/goto_data_dir_example/
(Note: 00643[1-4]? means 006431?, 006432?, 006433?, and 006434?, where "?" is any one degit number from 0 to 9.)
2-3b get one more file and modify it
And , you need one more file written in TPdelay and PRDFfile name .
Note : You have to modify this file
(2-3b(I)For BenchTest's T&Qscan)
> cp /phenix/data20/TOF_FEE_BENCH_TEST/timecal.(run)/timecal.txt
./timecal.txt (2-3b(II)For Tscan at IR )
> cp /home/phnxtof/calib/logs/toftscan@(month-day-year_hour:minutes.second).calib
./timecal.txt
> emacs timecal.txt &
130 /phenix/data20/TOF_FEE_BENCH_TEST/timecal.(run)/130.prdf
132 /phenix/data20/TOF_FEE_BENCH_TEST/timecal.(run)/132.prdf : : : : (YOU NEED TO MAKE SURE THAT THERE IS NO EMPY LINE AT HTE END OF THE FILE, OTHERWISE THE TofOnlCal.C IS HUNG UP ON THE WAY OF THE FOLLWOING ROOT-SESSION) |
2-4 run T (Q) scan .
> root -l
In the case of T scan
root [0] .x TofOnlCal.C( 1 , " ./timecal.txt ")
In the case of Q scan
root [0] .x TofOnlCal.C( 2 , " ./qcal.txt ")
Then the code begins to run . Wait for a while.
After you finished running , make sure that two output files
have been made under the same directory as text file you can read.
Tscan ----- timecal.parout.txt timecal.root
Qscan ----- qcal.parout.txt qcal.root
3.Draw and Make a PS file .
You can get a PS file to type as following command.
> cp /phenix/workarea/shingo/benchtqscan/wrk/bench_draw.C draw.C
> root -b
root [0] .L draw.C
In the case of T scan
root [1] draw( 1 , " ./timecal.root ")
In the case of Q scan
root [1] draw( 2 , " ./qcal.root ")