Logo Coherent WaveBurst  
Reference Guide
Logo
 All Namespaces Files Functions Variables Macros Pages
cwb_mklinks.csh
Go to the documentation of this file.
1 #!/bin/tcsh -f
2 
3 onintr irq_ctrlc
4 
5 set cmd_line="$0 $argv"
6 
7 if ((($1 == '') || ("$2" == '')) && ($1 != 'list')) then
8 # $CWB_SCRIPTS/cwb_help.csh cwb_mklinks
9  echo ''
10  echo "cwb_mklinks M2 '--ilabel M1'"
11  echo "cwb_mklinks M2 '--ilabel M1.V_hvetoLH.C_bin1_hvetoLH'"
12  echo "cwb_mklinks M2 '--ilabel M1.V_hvetoLH.C_bin1_hvetoLH'" O2_K02_C00_LH_BBH_BKG_run1
13  echo ''
14  exit
15 endif
16 
17 unsetenv CWB_MERGE_LABEL
18 unsetenv CWB_MKLINKS_OPTIONS
19 setenv CWB_MKLINKS_IDIR ""
20 
21 if ($1 == 'list') then
22  root -n -l -b ${CWB_PARMS_FILES} ${CWB_MACROS}/cwb_dump_merge_dir.C
23  exit
24 endif
25 
26 if ( "$2" != '' ) then
27  setenv CWB_MKLINKS_OPTIONS "$2"
28 else
29  unsetenv CWB_MKLINKS_OPTIONS
30 endif
31 
32 if ($3 != '') then
33  setenv CWB_MKLINKS_IDIR "$3"
34 endif
35 
36 setenv CWB_MERGE_LABEL $1
37 
38 if ($CWB_MKLINKS_IDIR != '') cd $CWB_MKLINKS_IDIR
39 
40 root -n -l -b ${CWB_PARMS_FILES} ${CWB_CONFIG}/MACROS/cwb_mklinks.C
41 if ( $? != 0) exit 1
42 
43 # create cWB_analysis.log file
44 make -f $CWB_SCRIPTS/Makefile.log CMD_LINE="$cmd_line" svn >& /dev/null
45 
46 if ($CWB_MKLINKS_IDIR != '') cd ..
47 
48 unsetenv CWB_MERGE_LABEL
49 unsetenv CWB_MKLINKS_OPTIONS
50 unsetenv CWB_MKLINKS_IDIR
51 
52 exit 0
53 irq_ctrlc:
54  ps T | grep root | awk '{print $1}' | xargs kill -9
55  exit 1
56 
shift breaksw case l
shift breaksw case n
Definition: cwb_clchunk.csh:70
shift breaksw case T
Definition: cwb_clchunk.csh:85
shift breaksw case b
Definition: cwb_obchunk.csh:75