5 from __future__
import print_function
6 from builtins
import range
7 if __name__ ==
'__main__':
9 import PhysicsTools.HeppyCore.utils.eostools
as eostools
13 from cmsStage
import *
19 (args, debug, force ) = parseOpts( argv )
21 if not os.path.isfile(args[0]):
22 print(args[0],
'does not exist.')
24 source = cmsFile( args[0],
"rfio" )
25 destination = cmsFile( args[1],
"stageout" )
26 checkArgs( source, destination, force )
31 dest = os.path.join(dest,os.path.basename(args[0]))
33 sleep_lengths = [1,10,60,600,1800]
38 time.sleep(sleep_lengths[i])
42 print(
'cmsStage %s [%d/5]' % (
' '.
join(argv) , i+1))
45 except SystemExit
as e:
46 print(
"cmsStage exited with code '%s'. Retrying... [%d/5]" % (
str(e), i+1 ))
53 if source.size() == destination.size():
S & print(S &os, JobReport::InputFile const &f)
static std::string join(char **cmd)