--- /dev/null
+#!/bin/sh
+# 1 argument - qname
+
+# marian.ivanov@cern.ch
+# filter corrupted files
+# batch farm internaly used
+#
+# Assumption - the data organize in the Workspace - predefined directory structure
+# - each directory contain the list of files
+# - raw.txt and esd.txt
+# Output:
+# esd.txt => esd.txt.Good and esd.txt.Bad
+# eaw.txt -> raw.txt.Good and raw.txt.Bad
+
+qname=$1
+mydir=`pwd`
+for adir in `cat run.list`; do
+ cd $adir
+ bsub -q $qname aliroot -b -q $ALICE_ROOT/TPC/macros/filterRAW.C
+ cd $mydir
+ done;
+done;
+#
+mydir=`pwd`
+for adir in `cat run.list`; do
+cd $adir
+echo bsub -q $qname aliroot -b -q $ALICE_ROOT/TPC/macros/filterESD.C
+bsub -q $qname aliroot -b -q $ALICE_ROOT/TPC/macros/filterESD.C
+cd $mydir
+done;
+
+
--- /dev/null
+#
+# marian.ivanov@cern.ch
+#
+# Create lists of missing runs
+# Expected the data follow given Workspace structure
+# input : run.list - list of runs of interest
+# output: rawMissing.list
+# esdMissing.list
+# ocdbMissing.list
+# Notice -OCDB missing is indicated only for GRP
+# -in next version - query from the alien
+
+rm rawMissing.list
+rm esdMissing.list
+rm ocdbMissing.list
+rm rawPresent.list
+rm esdPresent.list
+rm ocdPresent.list
+
+for adir in `cat run.list`; do
+ nfiles=`cat raw$adir.txt | grep -c .root`
+ if [ $nfiles -lt 2 ] ; then
+ #echo RAW: 0000$adir $nfiles
+ echo 0000$adir >>rawMissing.list
+ else
+ echo 0000$adir >>rawPresent.list
+ fi
+ nfilesReco=`cat esd$adir.txt | grep -c .root`
+ if [ $nfilesReco -lt 2 ] ; then
+ #echo ESD: $adir $nfilesReco
+ echo $adir >>esdMissing.list
+ else
+ echo $adir >>esdPresent.list
+ fi
+ nfilesOCDB=`cat grp.list | grep $adir| grep -c root`
+ if [ $nfilesOCDB -lt 1 ] ; then
+ #echo OCDB: $adir $nfilesOCDB
+ echo $adir >>ocdbMissing.list
+ else
+ echo $adir >>ocdbPresent.list
+ fi
+done;
--- /dev/null
+# marian.ivanov@cern.ch
+# Filter error logs
+# Input - errRec.logs - text file with the list of error logs
+# Output - seg.log - text file with the seg.faults runs
+# - segout.log - text file with the output of the seg.fault runs
+# - the err.log and out.log suppose to be in the same directory
+# to get the list of logs:
+# example:
+# find /lustre/alice/alien/alice/data/2009/LHC09c_TPC/00008*/esdgsi3/*/err.log > errRec.log
+
+isOK=0
+nonOK=0
+rm seg.log
+rm segout.log
+for efile in `cat errRec.log` ;do
+ xxx=`cat $efile| grep segmentation`
+ if [ -z "$xxx" ]
+ then
+ let isOK=isOK+1
+ else
+ let nonOK=nonOK+1
+ echo nonOK=$nonOK
+ echo "$efile" >>seg.log
+ echo $efile
+ ofile=`echo $efile| sed s_err_out_`
+ cat $ofile >> segout.log
+ fi
+done;
+#get the list
+echo isOK=$isOK nonOK=$nonOK
--- /dev/null
+#
+# setup aliroot environment
+# to be modified by users
+#
+#
+
+#
+# set your aliroot
+#
+source /u/miranov/.balice64HEAD0108
+#
+#output directory
+#
+export GUI_OUTDIR=/lustre/alice/TPCgui
+
+#usually the next two can stay as they are. If your not happy with where the output is written
+#feel free to change them
+export GUI_OUTDIR_TIME=$GUI_OUTDIR/time
+export GUI_OUTDIR_RUNS=$GUI_OUTDIR/runs
+
+#command for batch processing
+# see also TMPLISTDIR!!!
+export BATCHCOMMAND="bsub -q alice-t3_8h"
+
+#directory for the temporary list files
+#for batch processing this dir needs to be accessable from the batch nodes!!!
+export TMPLISTDIR=$GUI_OUTDIR/guiTreeLists
+
+#path to reference tree. Consider to use one!
+#see README to understand how to create them
+export REF_DATA_FILE=$GUI_OUTDIR/ref/RefCalPads.root
+export REF_DATA_TREE=$GUI_OUTDIR/ref/RefTree.root
+
+#whether alien path is used in OCDB
+#export WITHALIEN=1
+export WITHALIEN=0
+
+#where to look for files in automatic tree creation
+#it assumes a path to an OCDB directory and uses the
+#run numbers of the file names:
+#Run([0-9]{5})_.*
+export AUTOFILES=/lustre/alice/alien/alice/data/2009/OCDB/TPC/Calib/HighVoltage
+
+#number of files per chunk in automatic tree creation
+export NFILES=25
+
--- /dev/null
+#
+# marian.ivanov@cern.ch
+#
+# Make workspace structure
+# Create a list for each run
+# and make directory structure
+# This is fast
+mydir=`pwd`
+for adir in `cat run.list`; do
+ mkdir $adir;
+ rm raw${adir}.txt
+ rm esd${adir}.txt
+ cat $mydir/raw.list | grep $adir >raw${adir}.txt
+ cat $mydir/esd.list | grep $adir >esd${adir}.txt
+ cp raw${adir}.txt ${adir}/raw.txt
+ cp esd${adir}.txt ${adir}/esd.txt
+done
+
+