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.V_hvetoH_userHV "--tcuts bin1_cut --label bin1_cut"
47  if ( $? != 0) exit 1
48 
49  # bin0_cut is used to select the exclusive HV time
50  ${CWB_SCRIPTS}/cwb_setcuts.csh $CWB_MERGE_LABEL.V_hvetoH_userHV "--tcuts bin0_cut --label bin0_cut"
51  if ( $? != 0) exit 1
52 
53  # create exclusive livetime tree for bin0_cut -> only the zero lag leaf 'live' is updated -> overwrite the livetree file created in the previous step
54  root -n -l -b ${CWB_PPARMS_FILES} ${CWB_CONFIG}/MACROS/CreateExclusiveLiveTimeFile.C\‍(\"$CWB_MERGE_LABEL.V_hvetoH_userHV\",\"BURST_IMBH\",\"K99_ejobs_H1_V1_cat012_not_H1_L1.txt\",\"O3a\",\"C_bin0_cut\"\‍)
55  if ( $? != 0) exit 1
56 endif
57 
58 if ((( $CWB_PP_OPTIONS == "report" ) || ( $CWB_PP_OPTIONS == "all" ))) then
59  # create report bin1_cut
60  ${CWB_SCRIPTS}/cwb_report.csh $CWB_MERGE_LABEL.V_hvetoH_userHV.C_bin1_cut create
61  if ( $? != 0) exit 1
62 
63  # set ifar to bin1_cut
64  ${CWB_SCRIPTS}/cwb_setifar.csh $CWB_MERGE_LABEL.V_hvetoH_userHV.C_bin1_cut '--xtsel run>=0 --label ifar --xfile report/postprod/'$CWB_MERGE_LABEL'.V_hvetoH_userHV.C_bin1_cut.R_rMRA_hveto_i0cc00_i1rho0_freq16_512/data/far_rho.txt --mode exclusive'
65  if ( $? != 0) exit 1
66 
67  # create report bin0_cut
68 # ${CWB_SCRIPTS}/cwb_report.csh $CWB_MERGE_LABEL.V_hvetoH_userHV.C_bin0_cut create
69 # if ( $? != 0) exit 1
70 
71  # the bin0_cut background is a symbolic link to bin1_cut
72  ln -sf $CWB_MERGE_LABEL.V_hvetoH_userHV.C_bin1_cut.R_rMRA_hveto_i0cc00_i1rho0_freq16_512 report/postprod/$CWB_MERGE_LABEL.V_hvetoH_userHV.C_bin0_cut.R_rMRA_hveto_i0cc00_i1rho0_freq16_512
73  if ( $? != 0) exit 1
74 
75  # set ifar to bin0_cut using the the bin1_cut background
76  ${CWB_SCRIPTS}/cwb_setifar.csh $CWB_MERGE_LABEL.V_hvetoH_userHV.C_bin0_cut '--xtsel run>=0 --label ifar --xfile report/postprod/'$CWB_MERGE_LABEL'.V_hvetoH_userHV.C_bin1_cut.R_rMRA_hveto_i0cc00_i1rho0_freq16_512/data/far_rho.txt --mode exclusive'
77  if ( $? != 0) exit 1
78 endif
79 
80 unsetenv CWB_MERGE_LABEL
81 unsetenv CWB_PP_OPTIONS
82 
83 exit 0
84 irq_ctrlc:
85  ps T | grep root | awk '{print $1}' | xargs kill -9
86  exit 1
87 
void CreateExclusiveLiveTimeFile(TString merge_label, TString searchDir_name, TString esegList_name, TString run, TString olabel)
shift breaksw case n
Definition: cwb_clchunk.csh:75
shift breaksw case l
shift breaksw case b
Definition: cwb_obchunk.csh:92