Skip to content

Commit

Permalink
Merge pull request #129 from nrwslac/multi-beamline
Browse files Browse the repository at this point in the history
Multi beamline
  • Loading branch information
nrwslac committed Jun 11, 2024
2 parents 6b96a04 + 75cb74b commit 6162e0b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
24 changes: 24 additions & 0 deletions demo/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,30 @@
"invalid": true,
"functional_group": "Vacuum",
"location_group": "S 2"
},
"TV5L0-VGC-1": {
"_id": "TV1L0-VGC-1",
"active": true,
"args": [],
"beamline": "DEMO_BEAMLINE",
"creation": "Tue Feb 27 10:41:25 2018",
"device_class": "ophyd.sim.SynAxis",
"kwargs": {
"name": "{{name}}"
},
"last_edit": "Thu Apr 12 14:40:08 2018",
"macros": null,
"name": "tv1l0_vgc_1",
"parent": null,
"prefix": "TV1L0-VGC-1",
"screen": null,
"stand": "ST1",
"system": "Device",
"type": "pcdsdevices.happi.containers.LCLSItem",
"z": 1035.5,
"invalid": true,
"functional_group": "Vacuum",
"location_group": "S 3"
}

}
9 changes: 5 additions & 4 deletions lucid/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def get_parser():
parser.add_argument(
'beamline',
help='Specify the beamline name to compose the home screen.',
type=str
type=str,
nargs='+'
)
parser.add_argument(
'--toolbar',
Expand Down Expand Up @@ -103,9 +104,9 @@ def __init__(self, *args, beamline, group_keys, callbacks, **kwargs):
def _load_from_happi(self, row_group_key, col_group_key):
'''Fill with Data from Happi'''
cli = lucid.utils.get_happi_client()
results = (cli.search(beamline=self.beamline,
active=True)
or [])
results = []
for line in self.beamline:
results += cli.search(beamline=line, active=True)

dev_groups = collections.defaultdict(list)

Expand Down

0 comments on commit 6162e0b

Please sign in to comment.