ra4_macros
bede988c286599a3a84b77a4d788ac0a971e89f9
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
run
sync_with_susy_cfa.py
Go to the documentation of this file.
1
#! /usr/bin/env python
2
3
from
tempfile
import
mkdtemp
4
import
subprocess
5
from
os
import
chdir,getcwd,listdir,path
6
from
shutil
import
rmtree,copy2
7
8
orig_dir = getcwd()
9
temp_dir = mkdtemp()
10
11
chdir(temp_dir)
12
13
subprocess.call([
'git'
,
'clone'
,
'git@github.com:manuelfs/susy_cfa'
])
14
15
susy_cfa = temp_dir+
'/susy_cfa'
16
17
copy2(susy_cfa+
'/src/generate_small_tree.cxx'
,orig_dir+
'/src'
)
18
copy2(susy_cfa+
'/src/timer.cpp'
,orig_dir+
'/src'
)
19
copy2(susy_cfa+
'/src/utilities.cpp'
,orig_dir+
'/src'
)
20
copy2(susy_cfa+
'/inc/generate_small_tree.hpp'
,orig_dir+
'/inc'
)
21
copy2(susy_cfa+
'/inc/timer.hpp'
,orig_dir+
'/inc'
)
22
copy2(susy_cfa+
'/inc/utilities.hpp'
,orig_dir+
'/inc'
)
23
24
cfg_path = susy_cfa+
'/txt/small_tree_cfg'
25
cfg_files = [ file
for
file
in
listdir(cfg_path)
if
path.isfile(cfg_path+
'/'
+file) ]
26
27
for
file
in
cfg_files:
28
src = susy_cfa+
'/txt/small_tree_cfg/'
+file
29
dst = orig_dir+
'/txt/small_tree_cfg'
30
copy2(src,dst)
31
32
chdir(orig_dir)
33
rmtree (temp_dir)
Generated by
1.8.11