diff --git a/Phys/B2KShh/job/download.py b/Phys/B2KShh/job/download.py index 53fc6fe..d5bb252 100644 --- a/Phys/B2KShh/job/download.py +++ b/Phys/B2KShh/job/download.py @@ -28,7 +28,7 @@ dest = '/disk/users/elena/B2KShh/ntuples/jobs' -scripts = '/cvmfs/lhcb.cern.ch/lib/lhcb/LHCBDIRAC/LHCBDIRAC_v8r2p27/scripts' +scripts = '/cvmfs/lhcb.cern.ch/lib/lhcb/LHCBDIRAC/LHCBDIRAC_v8r2p29/scripts' import os def download(mylist): @@ -45,6 +45,16 @@ os.system('mv %s %s/%s/%s.root' % (file_name, dest, k, file_id)) +def deleteFromGrid(mylist): + #os.system('SetupProject.sh LHCbDirac') + #os.system('lhcb-proxy-init') + for k in mylist.keys(): + l = len(mylist[k]) + for i,rootfile in enumerate(mylist[k]): + print '%s\t\t: Deleting %s of %s' % (k, i, l) + os.system('%s/dirac-dms-remove-files %s' % (scripts, rootfile)) + + def hadd(mylist): #os.system('SetupProject Bender v27r0p1') paths = ['%s/%s/' % (dest, k) for k in mylist.keys()] @@ -66,4 +76,4 @@ #pickle.dump(mylist, open('lfns.pkl', 'wb')) mylist = pickle.load(open('lfns.pkl', 'rb')) #download(mylist) - hadd(mylist) + #hadd(mylist)