Logo coherent WaveBurst  
Config Reference Guide
Logo
cwb_mklinks.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_mklinks
7  exit
8 endif
9 
10 set cmd_line="$0 $argv"
11 
12 if ((($1 == '') || ("$2" == '')) && ($1 != 'list')) then
13 # $CWB_SCRIPTS/cwb_help.csh cwb_mklinks
14  echo ''
15  echo "cwb_mklinks M2 '--ilabel M1'"
16  echo "cwb_mklinks M2 '--ilabel M1.V_hvetoLH.C_bin1_hvetoLH'"
17  echo "cwb_mklinks M2 '--ilabel M1.V_hvetoLH.C_bin1_hvetoLH'" O2_K02_C00_LH_BBH_BKG_run1
18  echo ''
19  exit
20 endif
21 
22 unsetenv CWB_MERGE_LABEL
23 unsetenv CWB_MKLINKS_OPTIONS
24 setenv CWB_MKLINKS_IDIR ""
25 
26 if ($1 == 'list') then
27  root -n -l -b ${CWB_PARMS_FILES} ${CWB_MACROS}/cwb_dump_merge_dir.C
28  exit
29 endif
30 
31 if ( "$2" != '' ) then
32  setenv CWB_MKLINKS_OPTIONS "$2"
33 else
34  unsetenv CWB_MKLINKS_OPTIONS
35 endif
36 
37 if ($3 != '') then
38  setenv CWB_MKLINKS_IDIR "$3"
39 endif
40 
41 setenv CWB_MERGE_LABEL $1
42 
43 if ($CWB_MKLINKS_IDIR != '') cd $CWB_MKLINKS_IDIR
44 
45 root -n -l -b ${CWB_PARMS_FILES} ${CWB_CONFIG}/MACROS/cwb_mklinks.C
46 if ( $? != 0) exit 1
47 
48 # create cWB_analysis.log file
49 make -f $CWB_SCRIPTS/Makefile.log CMD_LINE="$cmd_line" svn >& /dev/null
50 
51 if ($CWB_MKLINKS_IDIR != '') cd ..
52 
53 unsetenv CWB_MERGE_LABEL
54 unsetenv CWB_MKLINKS_OPTIONS
55 unsetenv CWB_MKLINKS_IDIR
56 
57 exit 0
58 irq_ctrlc:
59  ps T | grep root | awk '{print $1}' | xargs kill -9
60  exit 1
61 
shift breaksw case T
Definition: cwb_clchunk.csh:90
shift breaksw case n
Definition: cwb_clchunk.csh:75
shift breaksw case l
shift breaksw case b
Definition: cwb_obchunk.csh:92