Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FofbTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DG
FOFB
FofbTool
Commits
78c4a33d
Commit
78c4a33d
authored
7 months ago
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
Sync operation now return a boolean
parent
475a61d1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FofbTool/Operation.py
+13
-9
13 additions, 9 deletions
FofbTool/Operation.py
with
13 additions
and
9 deletions
FofbTool/Operation.py
+
13
−
9
View file @
78c4a33d
...
@@ -567,7 +567,7 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
...
@@ -567,7 +567,7 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
bpmidlist: list of tuple
bpmidlist: list of tuple
list of tuple (ID, tangopath) to put on Libera Electron
list of tuple (ID, tangopath) to put on Libera Electron
lbpevrx: list
lbpevrx: list
list of LBP Evrx tango path
list of LBP Evrx tango path
. Can be an empty array.
timinglocal: list
timinglocal: list
list of Timing local itango path to set event
list of Timing local itango path to set event
timingcentral: str
timingcentral: str
...
@@ -590,9 +590,11 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
...
@@ -590,9 +590,11 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
# ---------------------------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------
# Init BPMs, stop first and put for each the ID number
# Init BPMs, stop first and put for each the ID number
electron_stop_com
(
bpmlist
)
if
not
electron_stop_com
(
bpmlist
):
return
False
electron_init_fa
(
bpmidlist
)
if
not
electron_init_fa
(
bpmidlist
):
return
False
# ---------------------------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------
# Write event number
# Write event number
...
@@ -602,19 +604,20 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
...
@@ -602,19 +604,20 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
for
_r
in
r
:
for
_r
in
r
:
if
_r
.
has_failed
():
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to set Event Number on local timing board {}, bpm.trigEvent
"
.
format
(
_r
.
dev_name
()))
logger
.
error
(
"
Failed to set Event Number on local timing board {}, bpm.trigEvent
"
.
format
(
_r
.
dev_name
()))
return
return
False
# ---------------------------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------
# Prepare bpm for trigger reception
# Prepare bpm for trigger reception
electron_sync_next_trigger
(
bpmlist
)
if
not
electron_sync_next_trigger
(
bpmlist
):
return
False
logger
.
info
(
"
Prepare Libera Brillance Plus to start on next trigger
"
)
logger
.
info
(
"
Prepare Libera Brillance Plus to start on next trigger
"
)
r
=
glbpevrx
.
write_attribute
(
"
synchronize
"
,
0
)
r
=
glbpevrx
.
write_attribute
(
"
synchronize
"
,
0
)
for
_r
in
r
:
for
_r
in
r
:
if
_r
.
has_failed
():
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to write synchronize on LBP EVRX {}
"
.
format
(
_r
.
dev_name
()))
logger
.
error
(
"
Failed to write synchronize on LBP EVRX {}
"
.
format
(
_r
.
dev_name
()))
return
return
False
# ---------------------------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------
# Wait 2 seconds and Fire the soft event
# Wait 2 seconds and Fire the soft event
...
@@ -630,7 +633,8 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
...
@@ -630,7 +633,8 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
# ---------------------------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------
# Start electron on next trigger
# Start electron on next trigger
electron_start_next_trigger
(
bpmlist
)
if
not
electron_start_next_trigger
(
bpmlist
):
return
False
# ---------------------------------------------------------------------------------------------------------------
# ---------------------------------------------------------------------------------------------------------------
# Wait 2 seconds and Fire the soft event
# Wait 2 seconds and Fire the soft event
...
@@ -652,6 +656,6 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
...
@@ -652,6 +656,6 @@ def sync_bpm(bpmidlist, lbpevrx, timinglocal, timingcentral):
for
_r
in
r
:
for
_r
in
r
:
if
_r
.
has_failed
():
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to set Event Number on local timing board {}, bpm.trigEvent
"
.
format
(
_r
.
dev_name
()))
logger
.
error
(
"
Failed to set Event Number on local timing board {}, bpm.trigEvent
"
.
format
(
_r
.
dev_name
()))
return
return
False
return
True
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment