GSI extension for pjlsa
This pjlsa extension provides access to the GSI control systems.
The Python module pjlsa (developed by CERN) provides access to the LSA API.
See also the GSI-hosted pjlsa version for further information on pjlsa.
Use
A simple example is provided in example.py
. It prints all available patterns:
import pjlsa_gsi
with pjlsa_gsi.LSAClientGSI(server='gsi-int').java_api():
from cern.lsa.client import ServiceLocator, ContextService
contextService = ServiceLocator.getService(ContextService)
patterns = contextService.findPatterns()
for pattern in patterns:
print (pattern)
Running this script within ASL, the accelerator services cluster, would give a typical output:
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
[... INFO and DEBUG messages from LSA running on GSI integration server]
SCRATCH_IK_YRT1_CRYRING_FAST_20220627_135739
SCRATCH_RM_SIS18_PYTHON_TEST_20220728_124253
SIS18_FAST_TE_ESR_20220615
SCRATCH_SC_CRYRING_FAST_20220615_154447
SCRATCH_HL_SIS18_FAST_HHD_20230130_104825
SIS100_PROTON
SCRATCH_RM_SIS18_SLOW_HFS_20230328_144401
SIS18_FAST_HHD_BOOSTER_20220615
SCRATCH_SC_ESR_FAST_20220615_142831
SCRATCH_IK_YRT1_20220627_140049
SCRATCH_IK_ESR_FAST_HTR_20220630_113958
Installation
You can either directly pip-install from git
$ python -m pip install 'pjlsa_gsi @ https://git.gsi.de/scripting-tools/pjlsa_gsi/'
or first clone this repository explicitly and then directly pip-install from there,
$ git clone https://git.gsi.de/scripting-tools/pjlsa_gsi.git
$ cd pjlsa_gsi
$ pip install .
Note that this package will install cmmn-build-manager
and pjlsa
from the GSI internal gitlab. You may be asked to provide your GSI weblogin credentials for git to log in.
Note also that, upon your first call of the GSI LSA client, a couple of minutes may be spent on downloading the jars via gradle from the servers.