if match != None: pset = match.group(1) newPSet = ldir + "/" + match.group(1) os.system('cp %s %s' % (pset, newPSet)) # find and copy json file match = patternLumiMask.match(line) if match != None: json = match.group(1) newJson = ldir + "/" + match.group(1) os.system('cp %s %s' % (json, newJson)) newCrab.write(line) newCrab.write('[CMSSW]\n') newCrab.write('datasetpath = ' + sampleName + '\n') patStripOffCastor = re.compile('/castor/cern.ch/(user/.*)') match = patStripOffCastor.match(cdir) newCrab.write('[USER]\n') newCrab.write('user_remote_dir = %s\n' % match.group(1)) addToDatasets(sampleNameDir) print '' print 'SUMMARY' print cdir print ldir print newCrabPath print newPSet print newJson
os.system('cp %s %s' % (pset, newPSet) ) # find and copy json file match = patternLumiMask.match( line ) if match != None: json = match.group(1) newJson = ldir + "/" + match.group(1) os.system('cp %s %s' % (json, newJson) ) newCrab.write( line ) newCrab.write('[CMSSW]\n') newCrab.write('datasetpath = '+sampleName+'\n') patStripOffCastor = re.compile('/castor/cern.ch/(user/.*)') match = patStripOffCastor.match( cdir ) newCrab.write('[USER]\n') newCrab.write('user_remote_dir = %s\n' % match.group(1)) addToDatasets( sampleNameDir ) print '' print 'SUMMARY' print cdir print ldir print newCrabPath print newPSet print newJson
#if options.tier!="": # outFile += sampleAndTier #else: # outFile += sampleName if options.tier != "": sampleName += "/" + options.tier print "sampleName ",sampleName outFile = cdir outFile += sampleName # creating castor dir rfmkdir = 'rfmkdir -p ' + outFile print rfmkdir os.system( rfmkdir ) # outFile += '/PFAnalysis_%s.root' % ext # prepare local output dir: localOutputDir = './' + sampleName mkdir = 'mkdir -p ' + localOutputDir print mkdir os.system(mkdir) cmsBatch = 'cmsBatch.py %s susyJetMET_cfg.py -r %s -b "bsub -q %s < batchScript.sh" -o %s' % (options.nInput, outFile, options.queue, localOutputDir) addToDatasets( sampleName ) print cmsBatch
#if options.tier!="": # outFile += sampleAndTier #else: # outFile += sampleName if options.tier != "": sampleName += "/" + options.tier print "sampleName ", sampleName outFile = cdir outFile += sampleName # creating castor dir rfmkdir = 'rfmkdir -p ' + outFile print rfmkdir os.system(rfmkdir) # outFile += '/PFAnalysis_%s.root' % ext # prepare local output dir: localOutputDir = './' + sampleName mkdir = 'mkdir -p ' + localOutputDir print mkdir os.system(mkdir) cmsBatch = 'cmsBatch.py %s susyJetMET_cfg.py -r %s -b "bsub -q %s < batchScript.sh" -o %s' % ( options.nInput, outFile, options.queue, localOutputDir) addToDatasets(sampleName) print cmsBatch