#!/usr/bin/env python
from Utils.DBHandler import getDBPath
from Utils.TextFileHandler import ReadEventList
from Core.InputParser import parser
import sys

parser.add_option("-p", "--dataset", action="store", default=1, type="string", help="Primary Dataset")
parser.add_option("-t", "--textFile", action="store", default=None, type="string", help="input text file")

(options, args) = parser.parse_args(sys.argv)

datasetName = options.dataset
textFileName = options.textFile

eventList = ReadEventList(textFileName)

fileList = []
for run, lumi, evt in eventList:
    fileName = getDBPath(datasetName, run, lumi)
    if fileName not in fileList:
        fileList.append(fileName)

print fileList
Exemple #2
0
#!/usr/bin/env python
from Utils.DBHandler import getDBPath,getFilesFromPD
from Core.InputParser import parser
import sys

parser.add_option("-r","--run", action = "store", default = 1, type = 'long',help ="run number")
parser.add_option("-l","--lumi", action = "store", default = 1, type = 'long',help="lumi section")
parser.add_option("-e","--evt", action = "store", default = 1, type = 'long',help="event number")
parser.add_option("-p","--dataset", action = "store", default = 1, type = 'string',help="Primary Dataset")

(options,args) = parser.parse_args(sys.argv)

run = options.run
ls = options.lumi
evt = options.evt
datasetName = options.dataset

inputFile = getDBPath(datasetName,run,ls)

print "All Files with Run Number %d, Lumi %d in this PD %s:"%(run,ls,datasetName)
print inputFile
#!/usr/bin/env python
from Core.Sequence import Sequence
from Core.EventPicker import EventPicker
from Core.InputParser import parser
import sys
from Analyzer.JetAnalyzer import JetAnalyzer
from Utils.DBHandler import getFilesFromPD
from Utils.TextFileHandler import ReadEventList

parser.add_option("-p","--dataset", action = "store", default = 1, type = 'string',help="Primary Dataset")
parser.add_option("-t","--textPath", action = "store", default = "file.txt", type = 'string',help="Event List Text File")
parser.add_option("--printProcess", action = "store_true",default = False)

(options,args) = parser.parse_args(sys.argv)

datasetName = options.dataset
textPath = options.textPath
printProcess = options.printProcess

inputFilePath = getFilesFromPD(datasetName)
eventList = ReadEventList(textPath) 

jetAna = JetAnalyzer()

sequence = Sequence()
sequence.load(jetAna)

looper = EventPicker(sequence,inputFilePath)
EventPicker.printProcess = printProcess
looper.eventList = eventList
looper.loop()
#!/usr/bin/env python
from Utils.DBHandler import getDBPath
from Utils.TextFileHandler import ReadEventList
from Core.InputParser import parser
import sys

parser.add_option("-p",
                  "--dataset",
                  action="store",
                  default=1,
                  type='string',
                  help="Primary Dataset")
parser.add_option("-t",
                  "--textFile",
                  action="store",
                  default=None,
                  type='string',
                  help="input text file")

(options, args) = parser.parse_args(sys.argv)

datasetName = options.dataset
textFileName = options.textFile

eventList = ReadEventList(textFileName)

fileList = []
for run, lumi, evt in eventList:
    fileName = getDBPath(datasetName, run, lumi)
    if fileName not in fileList:
        fileList.append(fileName)