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_PP_OPTIONS
7 
8 if ((( $1 == '' ))) then
9  setenv CWB_MERGE_LABEL "M1" # default
10 else
11  setenv CWB_MERGE_LABEL $1
12 endif
13 
14 if ((( $4 != 'merge' ) && ( $4 != 'veto' ) && ( $4 != 'cut' ) && ( $4 != 'report' ) && ( $4 != 'all' ) &&( $4 != '' ))) then
15  echo ""
16  echo \'$4\' "is a wrong cwb pp option"
17  echo ""
18  echo "available options"
19  echo " no options -> all (default)"
20  echo " merge : execute merge"
21  echo " veto : execute veto"
22  echo " cut : execute cut"
23  echo " report : execute report"
24  echo " all : execute merge+veto+cut+report"
25  echo ""
26  exit 1
27 else
28  if ((( $4 == '' ))) then
29  setenv CWB_PP_OPTIONS "all"
30  else
31  setenv CWB_PP_OPTIONS $4
32  endif
33 endif
34 
35 if ((( $CWB_PP_OPTIONS == "merge" ) || ( $CWB_PP_OPTIONS == "all" ))) then
36  ${CWB_SCRIPTS}/cwb_merge.csh $CWB_MERGE_LABEL '--nthreads 10'
37  if ( $? != 0) exit 1
38 endif
39 
40 if ((( $CWB_PP_OPTIONS == "veto" ) || ( $CWB_PP_OPTIONS == "all" ))) then
41 # ${CWB_SCRIPTS}/cwb_setveto.csh $CWB_MERGE_LABEL
42  if ( $? != 0) exit 1
43 endif
44 
45 if ((( $CWB_PP_OPTIONS == "cut" ) || ( $CWB_PP_OPTIONS == "all" ))) then
46  ${CWB_SCRIPTS}/cwb_setcuts.csh $CWB_MERGE_LABEL '--unique true'
47  if ( $? != 0) exit 1
48 # ${CWB_SCRIPTS}/cwb_setcuts.csh $CWB_MERGE_LABEL.V_hvetoL "--tcuts bin1_cut --label bin1_cut"
49  ${CWB_SCRIPTS}/cwb_setcuts.csh $CWB_MERGE_LABEL.C_U "--tcuts bin1_cut --label bin1_cut"
50  if ( $? != 0) exit 1
51 endif
52 
53 if ((( $CWB_PP_OPTIONS == "report" ) || ( $CWB_PP_OPTIONS == "all" ))) then
54 # ${CWB_SCRIPTS}/cwb_report.csh $CWB_MERGE_LABEL.V_hvetoL.C_bin1_cut pe
55  ${CWB_SCRIPTS}/cwb_report.csh $CWB_MERGE_LABEL.C_U.C_bin1_cut pe
56  if ( $? != 0) exit 1
57 endif
58 
59 unsetenv CWB_MERGE_LABEL
60 unsetenv CWB_PP_OPTIONS
61 
62 exit 0
63 irq_ctrlc:
64  ps T | grep root | awk '{print $1}' | xargs kill -9
65  exit 1
66 
shift breaksw case T
Definition: cwb_clchunk.csh:90