Logo coherent WaveBurst  
Config Reference Guide
Logo
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  $CWB_SCRIPTS/cwb_help.csh cwb_lschunk
7  exit
8 endif
9 
10 if ($1 == '') then
11  echo ""
12  echo 'cwb_lschunk --run="..." --search="..."'
13  echo ""
14  echo "run : O1, O2, O3"
15  echo "search : BBH, IMBHB, BurstLF, BurstHF, BurstLD, by default it list the CBC chunks"
16  echo ""
17  echo "Ex: cwb_lschunk --run O2"
18  echo "Ex: cwb_lschunk --run O2 --search BBH"
19  echo ""
20  exit 1
21 endif
22 
23 setenv CWB_LSCHUNK_RUN ""
24 setenv CWB_LSCHUNK_SEARCH ""
25 
26 set temp=(`getopt -s tcsh -o r:s: --long run:,search: -- $argv:q`)
27 if ($? != 0) then
28  echo "Terminating..." >/dev/stderr
29  exit 1
30 endif
31 eval set argv=\‍($temp:q\‍)
32 
33 while (1)
34  switch($1:q)
35  case -r:
36  case --run:
37  setenv CWB_LSCHUNK_RUN $2:q
38  shift ; shift
39  breaksw
40  case -s:
41  case --search:
42  setenv CWB_LSCHUNK_SEARCH $2:q
43  shift ; shift
44  breaksw
45  case --:
46  shift
47  break
48  default:
49  echo "error - missing parameters!" ; exit 1
50  endsw
51 end
52 
53 if ((( $CWB_LSCHUNK_RUN == '' ))) then
54  echo ""
55  echo "Error: empty input working directory"
56  echo "type cwb_lschunk to list the available options"
57  echo ""
58  exit 1
59 endif
60 
61 root -l -b '${CWB_CONFIG}/MACROS/cwb_lschunk.C("'$CWB_LSCHUNK_RUN'","'$CWB_LSCHUNK_SEARCH'")'
62 
63 unsetenv CWB_LSCHUNK_RUN
64 unsetenv CWB_LSCHUNK_SEARCH
65 
66 exit 0
67 irq_ctrlc:
68  ps T | grep root | awk '{print $1}' | xargs kill -9
69  exit 1
shift breaksw case T
Definition: cwb_clchunk.csh:90
shift breaksw case r
Definition: cwb_clchunk.csh:60
void cwb_lschunk(TString run, TString search="")
Definition: cwb_lschunk.C:26
shift breaksw case s
Definition: cwb_lschunk.csh:43
shift breaksw case o
Definition: cwb_mkchunk.csh:96
shift breaksw case q
shift breaksw case l
shift breaksw case b
Definition: cwb_obchunk.csh:92
string search
Definition: cWB_conf.py:63
string run
Definition: cWB_conf.py:6