Logo Coherent WaveBurst  
Reference Guide
Logo
 All Namespaces Files Functions Variables Macros Pages
cwb_lschunk.csh
Go to the documentation of this file.
1 #!/bin/tcsh -f
2 
3 onintr irq_ctrlc
4 
5 if ($1 == '') then
6  echo ""
7  echo 'cwb_lschunk --run="..."'
8  echo ""
9  echo "run : O1, O2"
10  echo ""
11  echo "Ex: cwb_lschunk --run O2"
12  echo ""
13  exit 1
14 endif
15 
16 setenv CWB_LSCHUNK_RUN ""
17 
18 
19 set temp=(`getopt -s tcsh -o r: --long run: -- $argv:q`)
20 if ($? != 0) then
21  echo "Terminating..." >/dev/stderr
22  exit 1
23 endif
24 eval set argv=\($temp:q\)
25 
26 while (1)
27  switch($1:q)
28  case -r:
29  case --run:
30  setenv CWB_LSCHUNK_RUN $2:q
31  shift ; shift
32  breaksw
33  case --:
34  shift
35  break
36  default:
37  echo "error - missing parameters!" ; exit 1
38  endsw
39 end
40 
41 if ((( $CWB_LSCHUNK_RUN == '' ))) then
42  echo ""
43  echo "Error: empty input working directory"
44  echo "type cwb_lschunk to list the available options"
45  echo ""
46  exit 1
47 endif
48 
49 root -l -b '${CWB_CONFIG}/MACROS/cwb_lschunk.C("'$CWB_LSCHUNK_RUN'")'
50 
51 unsetenv CWB_LSCHUNK_RUN
52 
53 exit 0
54 irq_ctrlc:
55  ps T | grep root | awk '{print $1}' | xargs kill -9
56  exit 1
shift breaksw case l
shift breaksw case r
Definition: cwb_clchunk.csh:55
shift breaksw case s
Definition: cwb_clchunk.csh:75
shift breaksw case T
Definition: cwb_clchunk.csh:85
shift breaksw case b
Definition: cwb_obchunk.csh:75
shift breaksw case q
shift breaksw case o
Definition: cwb_mkchunk.csh:91