ATLAS Offline Software
filemovemod.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
2 from __future__ import print_function
3 
4 def move_files(prefix, config):
5  import os, shutil, subprocess
6 
7  filemap = config.filemap
8  if filemap == {}:
9  return
10  for src, dest in filemap.items():
11  print(src, dest)
12  if os.access(src, os.R_OK):
13  if dest.startswith('root://'):
14  try:
15  subprocess.check_call(['xrdcp', src, os.path.join(dest, prefix + '_' + os.path.basename(src))])
16  except subprocess.CalledProcessError as e:
17  print(e)
18  else:
19  try:
20  shutil.copy2(src, os.path.join(dest, prefix + '_' + os.path.basename(src)))
21  except IOError as e:
22  print(e)
23 
python.filemovemod.move_files
def move_files(prefix, config)
Definition: filemovemod.py:4
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25