Checking EPD prepost for cosmic rays

First Step:
You need to be able to log into the stargw machine. If you do not have permission, follow the instructions at:
www.star.bnl.gov/starkeyw

Logging In:
ssh -A -Y you@rssh.rhic.bnl.gov
ssh -t -A -Y stargw.starp.bnl.gov
rterm -i

Confirm Access to trg data:
ls /trg/data/trgdata/
you should see files with names like run20008016.1.dat

Setting up Structure:

The files StEpdHistMaker.h and StEpdHistMaker.cxx should live in StRoot/StEpdHistMaker
Use "cons" to compile them
*NOTE* the default set-up has only prepost = 0, if you want to change this change the settings in StEpdHistMaker.h

Running:
./runEpdTrgHist.sh day# run# #ofFiles
The .dat files have 10k events in them, the index is the last number before the .dat
combine all the histograms into one file via hadd
root4star -q -b 'map_EpdHistos.C(folder,infilename,pre,post,nprepost)'
This will connect to the db and rename the title of the histogram to have the coordinates of the detector for that channel
root -q -b 'DrawCombine.C(infile,pre,post,nprepose)'

The last step will make a pdf comparing the pre, post and current bins summed over all channels, separating out the files by crate and board type.  The in-time setting will result in the ADC spectra with the longest reach.