Exemplo n.º 1
0
#    if len (args) != 1:
#        parser.print_usage()
#        raise RuntimeError, "Exactly one output file must be given"
#    output = args[0]
    
#    options=parser.parse_args()

    if options.verbose:
        print('General configuration')
        print('\toutputfile: ',options.outputfile)
        print('\tinput selection file: ',options.inputfile)


    #inpf = open (options.inputfile, 'r')
    #inputfilecontent = inpf.read()
    inputRange =  csvLumibyLSParser.csvLumibyLSParser (options.inputfile).runsandls()

    #print 'number of runs processed %d' % csvLumibyLSParser.csvLumibyLSParser (options.inputfile).numruns()

    #inputRange=inputFilesetParser.inputFilesetParser(options.inputfile)

    
    inputPileupRange=parseInputFile(options.inputLumiJSON)

    # now, we have to find the information for the input runs and LumiSections 
    # in the Lumi/Pileup list. First, loop over inputs

    OUTPUTLINE = ""
    OUTPUTLINE+='{'

    # loop over pileup JSON as source, since it should have more lumi sections
    #        sys.exit()
    #    if len (args) != 1:
    #        parser.print_usage()
    #        raise RuntimeError, "Exactly one output file must be given"
    #    output = args[0]

    #    options=parser.parse_args()

    if options.verbose:
        print "General configuration"
        print "\toutputfile: ", options.outputfile
        print "\tinput selection file: ", options.inputfile

    # inpf = open (options.inputfile, 'r')
    # inputfilecontent = inpf.read()
    inputRange = csvLumibyLSParser.csvLumibyLSParser(options.inputfile).runsandls()

    # print 'number of runs processed %d' % csvLumibyLSParser.csvLumibyLSParser (options.inputfile).numruns()

    # inputRange=inputFilesetParser.inputFilesetParser(options.inputfile)

    inputPileupRange = parseInputFile(options.inputLumiJSON)

    # now, we have to find the information for the input runs and LumiSections
    # in the Lumi/Pileup list. First, loop over inputs

    OUTPUTLINE = ""
    OUTPUTLINE += "{"

    for (run, lslist) in sorted(inputRange.iteritems()):
        # now, look for matching run, then match lumi sections
Exemplo n.º 3
0
#        parser.print_usage()
#        raise RuntimeError, "Exactly one output file must be given"
#    output = args[0]
    
#    options=parser.parse_args()

    if options.verbose:
        print 'General configuration'
        print '\toutputfile: ',options.outputfile
        print '\tinput selection file: ',options.inputfile

    #print options.runperiod
    #inpf = open (options.inputfile, 'r')
    #inputfilecontent = inpf.read()
      
    inputRange =  csvLumibyLSParser.csvLumibyLSParser (options.inputfile,options.runperiod).runsandls()

    #print 'number of runs processed %d' % csvLumibyLSParser.csvLumibyLSParser (options.inputfile).numruns()

    #inputRange=inputFilesetParser.inputFilesetParser(options.inputfile)

    
    inputPileupRange=parseInputFile(options.inputLumiJSON)

    # now, we have to find the information for the input runs and LumiSections 
    # in the Lumi/Pileup list. First, loop over inputs

    OUTPUTLINE = ""
    OUTPUTLINE+='{'

    for (run, lslist) in sorted (inputRange.iteritems() ):