Commit ddf0cb0f authored by Jan Pospisil's avatar Jan Pospisil

added bunch range support

parent 12b7c021
......@@ -34,6 +34,7 @@ if len(sys.argv) is not 4 and len(sys.argv) < 7:
print " <pulseDelay> - non-negative float number in [ns]"
print " <triggerLatency> - non-negative float number in [ns], or -1 (calibration disabled)"
print " <bunches> - space separated list of bunch numbers, each 0-3563"
print " Can also be range(s) of bunches like: 0-6 10-50"
print " If no bunches are provided, no pulses will be generated, but generator will run."
print " Output will be in non-active state according to the <polarity>."
print ""
......@@ -50,7 +51,11 @@ else:
triggerLatency = myFloat(sys.argv[6])
bunches = []
for i in range(7, len(sys.argv)):
bunches.append(myInt(sys.argv[i]))
if "-" in sys.argv[i]:
startBunch, stopBunch = sys.argv[i].split("-", 2)
bunches = bunches + range(myInt(startBunch), myInt(stopBunch))
else:
bunches.append(myInt(sys.argv[i]))
print("Configuration:")
print(" fmcSlot (LUN) = "+str(fmcSlot))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment