Logo coherent WaveBurst  
Config Reference Guide
Logo
mkpp.csh
Go to the documentation of this file.
1 #!/bin/tcsh -f
2 
3 onintr irq_ctrlc
4 
5 unsetenv CWB_MERGE_LABEL
6 unsetenv CWB_CHUNK
7 unsetenv CWB_PP_OPTIONS
8 
9 if ((( $1 == '' ))) then
10  setenv CWB_MERGE_LABEL "M1" # default
11 else
12  setenv CWB_MERGE_LABEL $1
13 endif
14 
15 if ((( $2 == '' ))) then
16  echo ""
17  echo "mkpp: missing CHUNK option"
18  echo ""
19  exit 1
20 else
21  setenv CWB_CHUNK $2
22 endif
23 
24 if ((( $4 != 'merge' ) && ( $4 != 'veto' ) && ( $4 != 'cut' ) && ( $4 != 'report' ) && ( $4 != 'all' ) &&( $4 != '' ))) then
25  echo ""
26  echo \'$4\' "is a wrong cwb pp option"
27  echo ""
28  echo "available options"
29  echo " no options -> all (default)"
30  echo " merge : execute merge"
31  echo " veto : execute veto"
32  echo " cut : execute cut"
33  echo " report: execute report"
34  echo " all : execute merge+veto+cut+report"
35  echo ""
36  exit 1
37 else
38  if ((( $4 == '' ))) then
39  setenv CWB_PP_OPTIONS "all"
40  else
41  setenv CWB_PP_OPTIONS $4
42  endif
43 endif
44 
45 if ((( $CWB_PP_OPTIONS == "merge" ) || ( $CWB_PP_OPTIONS == "all" ))) then
46  ${CWB_SCRIPTS}/cwb_merge.csh $CWB_MERGE_LABEL '--nthreads 10'
47  if ( $? != 0) exit 1
48 endif
49 
50 if ((( $CWB_PP_OPTIONS == "veto" ) || ( $CWB_PP_OPTIONS == "all" ))) then
51  ${CWB_SCRIPTS}/cwb_setveto.csh $CWB_MERGE_LABEL
52  if ( $? != 0) exit 1
53 endif
54 
55 if ((( $CWB_PP_OPTIONS == "cut" ) || ( $CWB_PP_OPTIONS == "all" ))) then
56  ${CWB_SCRIPTS}/cwb_setcuts.csh $CWB_MERGE_LABEL.V_hvetoL "--tcuts bin1_cut --label bin1_cut"
57  if ( $? != 0) exit 1
58 endif
59 
60 if ((( $CWB_PP_OPTIONS == "report" ) || ( $CWB_PP_OPTIONS == "all" ))) then
61  ${CWB_SCRIPTS}/cwb_report.csh $CWB_MERGE_LABEL.V_hvetoL.C_bin1_cut create
62  if ( $? != 0) exit 1
63 
64  ${CWB_SCRIPTS}/cwb_setifar.csh $CWB_MERGE_LABEL.V_hvetoL.C_bin1_cut '--xtsel run>=0 --label ifar --file far_bin1_cut_file['$CWB_CHUNK'] --mode exclusive'
65  if ( $? != 0) exit 1
66 endif
67 
68 unsetenv CWB_MERGE_LABEL
69 unsetenv CWB_CHUNK
70 unsetenv CWB_PP_OPTIONS
71 
72 exit 0
73 irq_ctrlc:
74  ps T | grep root | awk '{print $1}' | xargs kill -9
75  exit 1
76 
shift breaksw case T
Definition: cwb_clchunk.csh:90