-
Notifications
You must be signed in to change notification settings - Fork 2
/
lhcFillScheme.py
executable file
·26 lines (20 loc) · 1.05 KB
/
lhcFillScheme.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/env python
# Downloads and analyzes a fill scheme
import argparse
from argparse import ArgumentDefaultsHelpFormatter
from python.getFillSchemes import *
from python.analyzeFillSchemes import *
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Downloads and analyzes a fill scheme", formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument("fills", help="Fill scheme number(s). Accepts comma-separated list, e.g. 5501,5502,etc")
parser.add_argument("-i", "--indir", default="fillschemes/", help="Directory to save the fill schemes to")
parser.add_argument("-o", "--outdir", default="bunchpatterns/", help="Directory to save the analyzed output to")
args = parser.parse_args()
if args.indir[-1]!='/': args.indir+='/'
if args.outdir[-1]!='/': args.outdir+='/'
#Process fill schemes
for fill in args.fills.split(','):
getOneFillScheme(fill, args.indir)
filename = 'fillscheme'+fill+'.txt'
analyzeOneFillScheme(args.indir, filename, args.outdir)
print('')