예제 #1
0
os.chdir(workDir)

# get run/event list
url = '%s/cache/%s.gz' % (options.sourceURL, options.goodRunListXML)
tmpLog.info("getting GRL from %s" % url)

tmpStatus, tmpOut = get_file_via_http(full_url=url)
if not tmpStatus:
    tmpLog.error(tmpOut)
    sys.exit(EC_WGET)
print(commands_get_status_output('gunzip %s.gz' % options.goodRunListXML)[-1])

# convert run/evt list to dataset/LFN list
try:
    status, epDs, epLFNs = PsubUtils.convertGoodRunListXMLtoDS(
        tmpLog, options.goodRunListXML, options.goodRunDataType,
        options.goodRunProdStep, options.goodRunListDS, True)
    if not status:
        tmpLog.error("failed to convert GoodRunListXML")
        sys.exit(EC_GRL)
    if epDs == '':
        tmpLog.error("no datasets were extracted from AMI using %s" %
                     options.goodRunListXML)
        sys.exit(EC_GRL)
    status = 0
except Exception as e:
    tmpLog.error("failed to convert GRL with %s %s" %
                 (str(e), traceback.format_exc()))
    sys.exit(EC_GRL)

print('')
예제 #2
0
    status,output = commands.getstatusoutput(com)
    print status,output
    if status == 0:
        break
    if iTry+1 == nTry:
        tmpLog.error("could not get run/event list from panda server")
        sys.exit(EC_WGET)
    time.sleep(30)    
print commands.getoutput('gunzip %s.gz' % options.eventPickEvtList)

# convert run/evt list to dataset/LFN list
try:
    epDs,epLFNs = PsubUtils.getDSsFilesByRunsEvents(workDir,
                                                    options.eventPickEvtList,
                                                    options.eventPickDataType,
                                                    options.eventPickStreamName,
                                                    tmpLog,
                                                    options.eventPickDS,
                                                    True,
                                                    options.eventPickAmiTag)
except:
    errtype,errvalue = sys.exc_info()[:2]
    tmpLog.error("failed to execute event picking with %s %s" % (errtype,errvalue))
    sys.exit(EC_EVP)

print

tmpLog.debug("=== evp output ===")
print epDs
print epLFNs
print
예제 #3
0
    print 'Try : %s' % iTry
    status,output = commands.getstatusoutput(com)
    print status,output
    if status == 0:
        break
    if iTry+1 == nTry:
        tmpLog.error("could not get GRL from panda server")
        sys.exit(EC_WGET)
    time.sleep(30)    
print commands.getoutput('gunzip %s.gz' % options.goodRunListXML)

# convert run/evt list to dataset/LFN list
try:
    status,epDs,epLFNs = PsubUtils.convertGoodRunListXMLtoDS(tmpLog,
                                                             options.goodRunListXML,
                                                             options.goodRunDataType,
                                                             options.goodRunProdStep,
                                                             options.goodRunListDS,
                                                             True)
    if not status:
        tmpLog.error("failed to convert GoodRunListXML")
        sys.exit(EC_GRL)
    if epDs == '':
        tmpLog.error("no datasets were extracted from AMI using %s" % options.goodRunListXML)
        sys.exit(EC_GRL)
    status = 0
except:
    errtype,errvalue = sys.exc_info()[:2]
    tmpLog.error("failed to convert GRL with %s %s" % (errtype,errvalue))
    sys.exit(EC_GRL)

print