#!/bin/csh -f

if ($#argv != 4) then 
  echo "USAGE: verifystreaks.sh (workdir) (exp_id) (magic_id) (outdir)"
  exit 1
endif

set workdir = $1
set expID = $2
set magicID = $3
set outdir = $4

mkdir -p $outdir

# make clusters file:
ls $workdir/$expID/$expID.mgc.$magicID.*.clusters | sed s/.clusters// > $outdir/clusters.list

# run VerifyStreaks

VerifyStreaks --out $outdir --clusters $outdir/clusters.list $workdir/$expID/$expID.mgc.$magicID.root.streakMap

