Procedure to make histograms for the various scans

Procedure to generate histograms for either the timing scans or the vbias scans.  One needs to be signed into the onl machine:

ssh -A -Y ****@ssh.sdcc.bnl.gov
ssh -t -A -Y stargw.starp.bnl.gov
rterm -i
stardev

The data lives at:

/trg/data/trgdata/run*.*.dat

where the first * = run # you are interested in.  Each file contains 10k events, and so if you want to look at more than 10 k events, you can put the index number into the second *.

The reader can be found at:
/ldaphome/rjreed/EpdReader20XX
where XX = year.

To run the code, put the StEpdHist classes into an StRoot folder as usual (note that I have used the .txt extension) and compile.  If you are only looking at 1 prepost, you should not have to change anything.  If you want to look at more than one prepost, you need to change the switches in the .h file (yes, I should make them toggles that the run macro picks up).  Once you have run the files, you then need to use the mapping macro to change the titles to the proper ew/pp/tt values.  I have written a script to assist.

Step by step procedure prepost = 0 only
1) ./runEpdTrgHist20AA.sh XX YY ZZ
XX = day, YY = run (3 digits), ZZ = number of indices (10k events per index), AA = year
2) hadd /AAXX/epdhist.AAXXYY* epdhist.AAXXYY.root
3) root4star -q -b 'map_EpdHistos.C("epdhist.AAXXYY.root")'

Step by step procedure prepost range
1) Change the switches at the top of StEpdHist.h with your favorite editor (emacs!) for the range pre to post.
2) cons
3) ./runepdhist XX YY ZZ
XX = day, YY = run (3 digits), ZZ = number of indices (10k events per index)
4) hadd /19XX/epdhist.19XXYY* epdhist.19XXYY.root
5) root4star -q -b 'map_EpdHistos.C("epdhist.19XXYY.root",pre,post,number_of_prepoststeps)'