Esempio n. 1
0
def getGT(DQMfile, run, globalTagVar):

    globalTag_v0 = getGTfromDQMFile(DQMfile, run, globalTagVar)
    globalTag = globalTag_v0
    print("Global Tag: " + globalTag_v0)

    #### Clean up the Global Tag ###################

    for z in range(len(globalTag_v0) - 2):
        if (globalTag_v0[z].isdigit()) and (globalTag_v0[z + 1].isdigit(
        )) and (globalTag_v0[z + 2].isdigit()) and (globalTag_v0[z +
                                                                 3].isupper()):
            globalTag = globalTag_v0[z:]
            break

    if globalTag == "":

        ##### Try from the Data Aggregation Service ####

        print(" No GlobalTag found: trying from DAS.... ")
        globalTag = str(
            subprocess.Popen('getGTscript.sh ' + filepath + File_Name + ' ' +
                             str(run),
                             shell=True))

        if globalTag == "":
            print(" No GlobalTag found for run: " + str(run))

    return globalTag
Esempio n. 2
0
def getGT(DQMfile, RunNumber, globalTagVar):
    globalTag_v0 = getGTfromDQMFile(DQMfile, RunNumber, globalTagVar)
    print "Global Tag: " + globalTag_v0
    globalTag = globalTag_v0

    for z in range(len(globalTag_v0)-2):#clean up the garbage string in the GT
        if (globalTag_v0[z].isdigit()) and  (globalTag_v0[z+1].isdigit()) and (globalTag_v0[z+2].isdigit()) and(globalTag_v0[z+3].isupper()):
            globalTag = globalTag_v0[z:]
    if globalTag == "":
        print " No GlobalTag found: trying from DAS.... ";
        globalTag = str(os.popen('getGTscript.sh '+filepath+ File_Name+' ' +str(Run_Number[i])));
        if globalTag == "":
            print " No GlobalTag found for run: "+str(Run_Number[i]);
    return globalTag
Esempio n. 3
0
def getGT(DQMfile, RunNumber, globalTagVar):
    globalTag_v0 = getGTfromDQMFile(DQMfile, RunNumber, globalTagVar)
    print("Global Tag: " + globalTag_v0)
    globalTag = globalTag_v0

    for z in range(len(globalTag_v0)-2):#clean up the garbage string in the GT
        if (globalTag_v0[z].isdigit()) and  (globalTag_v0[z+1].isdigit()) and (globalTag_v0[z+2].isdigit()) and(globalTag_v0[z+3].isupper()):
            globalTag = globalTag_v0[z:]
            break
    if globalTag == "":
        print(" No GlobalTag found: trying from DAS.... ")
        globalTag = str(os.popen('getGTscript.sh '+filepath+ File_Name+' ' +str(Run_Number[i])));
        if globalTag == "":
            print(" No GlobalTag found for run: "+str(Run_Number[i]))

    return globalTag