#!/bin/csh
#source /gluex/sim-recon/sim-recon-commissioning/Linux_RHEL6-x86_64-gcc4.4.7/setenv.csh
source ~/commissioning/sim-recon-commissioning/Linux_RHEL6-x86_64-gcc4.4.7/setenv.csh
set RUNS="" 

foreach run (1505 1506 1512 1513 1514 1515 1516 1517 1518 1519 1520)
	set file = `find /gluonraid1/rawdata/volatile/RunPeriod-2014-10/rawdata/Run00${run}/ -name "*${run}*.evio" -printf "%H%f " `
	set RUNS = "$RUNS:q ${file}"
end

echo Processing $RUNS

hd_root -PPLUGINS=DAQ,TTab,diphoton -PBFIELD_MAP=Magnets/Solenoid/solenoid_1200A_poisson_20140520 -PEVIO:PARSE_F1TDC=0 -PNTHREADS=8 $RUNS  
#hd_root -PPLUGINS=DAQ,TTab,CDC_expert -PTRKFIND:COSMICS=false -PNTHREADS=4 $RUNS
#hd_root -PPLUGINS=DAQ,TTab,cdc_efficiency -PTRKFIND:COSMICS=false -PNTHREADS=8 $RUNS
#hd_ana -PPLUGINS=DAQ,TTab,janaroot -PAUTOACTIVATE=Df125WindowRawData -PNTHREADS=4 $RUNS
#hdview2 -PPLUGINS=DAQ,TTab -PTRKFIND:COSMICS=false $RUNS
#hd_root -PPLUGINS=DAQ,TTab,DAQTree -PNTHREADS=4 $RUNS
