Skip to content
Snippets Groups Projects
Commit c73b107b authored by BRONES Romain's avatar BRONES Romain
Browse files

Fix Operation sync argument

* Use only one list of tuple (BPMID, BPMPATH )
parent 4bbe1340
No related branches found
No related tags found
No related merge requests found
...@@ -556,17 +556,15 @@ def electron_stop_com(bpmlist): ...@@ -556,17 +556,15 @@ def electron_stop_com(bpmlist):
# OPERATIONS FOR LBP and Electron SYNCHRONIZATION # OPERATIONS FOR LBP and Electron SYNCHRONIZATION
################################################################################################### ###################################################################################################
def sync_bpm(bpmlist, bpmidlist, lbpevrx, tlocal, tcentral): def sync_bpm(bpmidlist, lbpevrx, tlocal, tcentral):
""" """
Synchronize all BPM electronics, Electron and Brillance Plus. Synchronize all BPM electronics, Electron and Brillance Plus.
This will use the timing system (central and local board). This will use the timing system (central and local board).
PARAMETERS: PARAMETERS:
----------- -----------
bpmlist: list bpmidlist: list of tupme
list of Libera Electron tango path list of tuple (ID, tangopath) to put on Libera Electron
bpmidlist: list
list of ID to put on Libera Electron
lbpevrx: list lbpevrx: list
list of LBP Evrx tanfo path list of LBP Evrx tanfo path
tlocal: list tlocal: list
...@@ -576,6 +574,7 @@ def sync_bpm(bpmlist, bpmidlist, lbpevrx, tlocal, tcentral): ...@@ -576,6 +574,7 @@ def sync_bpm(bpmlist, bpmidlist, lbpevrx, tlocal, tcentral):
""" """
EVN=240 # Event number EVN=240 # Event number
bpmlist = [b[1] for b in bpmidlist]
# --------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------
# Init BPMs, stop first and put for each the ID number # Init BPMs, stop first and put for each the ID number
......
...@@ -460,7 +460,6 @@ def sync_all_bpm(): ...@@ -460,7 +460,6 @@ def sync_all_bpm():
db = tango.Database() db = tango.Database()
bpmlist = [n.split(':')[2] for n in db.get_property("FOFB", "bpmlist")['bpmlist'] if ":LIBERA:" in n]
bpmidlist = [(int(n.split(':')[0]), n.split(':')[2]) for n in db.get_property("FOFB", "bpmlist")['bpmlist'] if 'LIBERA' in n] bpmidlist = [(int(n.split(':')[0]), n.split(':')[2]) for n in db.get_property("FOFB", "bpmlist")['bpmlist'] if 'LIBERA' in n]
tlocal = tango.Group('tlocal') tlocal = tango.Group('tlocal')
...@@ -472,5 +471,5 @@ def sync_all_bpm(): ...@@ -472,5 +471,5 @@ def sync_all_bpm():
tcentral = tango.DeviceProxy(config["tangopath"]["timing-central"]) tcentral = tango.DeviceProxy(config["tangopath"]["timing-central"])
FofbTool.Operation.sync_bpm(bpmlist, bpmidlist, lbpevrx, tlocal, tcentral) FofbTool.Operation.sync_bpm(bpmidlist, lbpevrx, tlocal, tcentral)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment