Last change
on this file since 20000 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 | |
---|
1 | path_synchron=""
|
---|
2 | path_hawc=""
|
---|
3 | path_tel=""
|
---|
4 | output_path=""
|
---|
5 |
|
---|
6 | hawc_files=$(ls $path_hawc)
|
---|
7 | tel_files=$(ls $path_tel)
|
---|
8 |
|
---|
9 | hawc_keys="_reco.root"
|
---|
10 | tel_keys="_Y.root"
|
---|
11 |
|
---|
12 | hawc_list=() # list of HAWC files in path_hawc
|
---|
13 | tel_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
|
---|
16 | for 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 |
|
---|
25 | done
|
---|
26 |
|
---|
27 | # Search for HAWC'sEye files in path_tel and add to tel_list
|
---|
28 | for 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
|
---|
37 | done
|
---|
38 |
|
---|
39 | # Run synchron.C
|
---|
40 | for 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
|
---|
44 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.