예제 #1
0
                        default=1, help='Files per job')

    farmout_group.add_argument('--clean-crab-dupes', action='store_true',
                               default=False, dest='cleancrab',
                               help='Clean crab dupes')

    args = parser.parse_args()

    sys.stdout.write('# Condor submission script\n')
    sys.stdout.write('# Generated with submit_job.py at %s\n'
                     % datetime.datetime.now())
    sys.stdout.write('# The command was: %s\n' % ' '.join(sys.argv))

    sys.stdout.write('export TERMCAP=screen\n')
    for sample, sample_info in reversed(
        sorted(datadefs.iteritems(), key=lambda (x,y): x)):
        passes_filter = True
        # Filter by analysis
        if args.analysis:
            passes_ana = sample_info['analysis'] == args.analysis
            passes_filter = passes_filter and passes_ana
        # Filter by sample wildcards
        if args.samples:
            passes_wildcard = False
            for pattern in args.samples:
                if fnmatch.fnmatchcase(sample, pattern):
                    passes_wildcard = True
            passes_filter = passes_wildcard and passes_filter
        if not passes_filter:
            continue
예제 #2
0
                        default=1, help='Files per job')

    farmout_group.add_argument('--clean-crab-dupes', action='store_true',
                               default=False, dest='cleancrab',
                               help='Clean crab dupes')

    args = parser.parse_args()

    sys.stdout.write('# Condor submission script\n')
    sys.stdout.write('# Generated with submit_job.py at %s\n'
                     % datetime.datetime.now())
    sys.stdout.write('# The command was: %s\n' % ' '.join(sys.argv))

    sys.stdout.write('export TERMCAP=screen\n')
    for sample, sample_info in reversed(
        sorted(datadefs.iteritems(), key=lambda (x,y): x)):
        passes_filter = True
        # Filter by analysis
        if args.analysis:
            passes_ana = sample_info['analysis'] == args.analysis
            passes_filter = passes_filter and passes_ana
        # Filter by sample wildcards
        if args.samples:
            passes_wildcard = False
            for pattern in args.samples:
                if fnmatch.fnmatchcase(sample, pattern):
                    passes_wildcard = True
            passes_filter = passes_wildcard and passes_filter
        if not passes_filter:
            continue
예제 #3
0
cfg = 'patTuple_cfg.py'
jobId = args.jobid

print " # Job ID: %s Version: %s" % (jobId, fsa_version())
print 'export TERMCAP=screen'


def any_matches(regexes, string):
    for regex in regexes:
        if fnmatch.fnmatchcase(string, regex):
            return True
    return False


to_be_used = []
for key, info in datadefs.iteritems():
    if args.samples:
        if any_matches(args.samples, key):
            to_be_used.append(key)
    if 'datasetpath' in info and args.dbsnames:
        dbs = info['datasetpath']
        if any_matches(args.dbsnames, dbs):
            to_be_used.append(key)

production_info = {}

for sample in sorted(to_be_used):

    sample_info = datadefs[sample]
    if args.ignoreRunRange and 'firstRun' in sample_info:
        del sample_info['firstRun']
args = parser.parse_args()

cfg = 'patTuple_cfg.py'
jobId = args.jobid

print " # Job ID: %s Version: %s" % (jobId, fsa_version())
print 'export TERMCAP=screen'

def any_matches(regexes, string):
    for regex in regexes:
        if fnmatch.fnmatchcase(string, regex):
            return True
    return False

to_be_used = []
for key, info in datadefs.iteritems():
    if args.samples:
        if any_matches(args.samples, key):
            to_be_used.append(key)
    if 'datasetpath' in info and args.dbsnames:
        dbs = info['datasetpath']
        if any_matches(args.dbsnames, dbs):
            to_be_used.append(key)            

production_info = {}

for sample in sorted(to_be_used):

    sample_info = datadefs[sample]
    if args.ignoreRunRange and 'firstRun' in sample_info:
        del sample_info['firstRun']