source: trunk/Mars/hawc/synchron.sh@ 19969

Last change on this file since 19969 was 19952, checked in by giangdo, 5 years ago
synchron.sh: script to run synchron.C
  • Property svn:executable set to *
File size: 971 bytes
Line 
1path_synchron=""
2path_hawc=""
3path_tel=""
4output_path=""
5
6hawc_files=$(ls $path_hawc)
7tel_files=$(ls $path_tel)
8
9hawc_keys="_reco.root"
10tel_keys="_Y.root"
11
12hawc_list=() # list of HAWC files in path_hawc
13tel_list=() # list of HAWC's Eye files in path_tel
14
15# Search for reco HAWC files in path_hawc and add to hawc_list
16for hfile in ${hawc_files[@]};do
17 hfile_name="$hfile"
18
19 hfile_type=${hfile_name:20}
20
21 if [ "$hfile_type" = "_reco.root" ];then
22 hawc_list+=($hfile_name)
23 fi
24
25done
26
27# Search for HAWC'sEye files in path_tel and add to tel_list
28for telfile in ${tel_files[@]};do
29 telfile_name="$telfile"
30
31 telfile_type=${telfile_name:12}
32
33 if [ "$telfile_type" = "_Y.root" ];then
34 tel_list+=($telfile_name)
35
36 fi
37done
38
39# Run synchron.C
40for hawc_file in ${hawc_list[@]};do
41 for tel_file in ${tel_list[@]};do
42 rootcern -b -q $path_synchron\(\"$path_hawc$hawc_file\",\"$path_tel$tel_file\",\"$output_path${hawc_file:0:20}"_"$tel_file\"\)
43 done
44done
Note: See TracBrowser for help on using the repository browser.