Commit 8c607816 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron
Browse files

Add detector_id Tango resource, include it when calling sls_detector_put/get

parent 5e40971c
Pipeline #51792 failed with stages
in 13 minutes and 20 seconds
......@@ -529,7 +529,7 @@ string Camera::execCmd(const string& s, bool put, int idx)
string prog_name = string("sls_detector_") + (put ? "put" : "get");
ostringstream os;
os << prog_name << " ";
os << prog_name << " " << m_det_id << '-';
if (idx >= 0)
os << idx << ':';
os << s;
......
......@@ -515,6 +515,9 @@ class SlsDetectorClass(PyTango.DeviceClass):
'full_config_fname':
[PyTango.DevString,
"In case of partial configuration, path to the full config file",[]],
'detector_id':
[PyTango.DevUShort,
"Detector ID in multi-detector environment", 0],
'initial_acq_params':
[PyTango.DevString,
"Initial acquisition parameters: "
......
......@@ -200,7 +200,7 @@ class SlsDetectorEigerClass(SlsDetectorClass):
_SlsDetectorEiger = None
def get_control(config_fname, full_config_fname=None, apply_corrections=None,
**keys) :
detector_id=0, **keys) :
global _SlsDetectorEiger
_Cam, _HwInter, _Control = get_slsdetector_objs()
......@@ -208,8 +208,7 @@ def get_control(config_fname, full_config_fname=None, apply_corrections=None,
return _Control
check_partial_config(config_name, full_config_name)
det_id = 0
_Cam = SlsDetectorHw.Camera(config_fname, det_id)
_Cam = SlsDetectorHw.Camera(config_fname, int(detector_id))
det_type = _Cam.getType()
if det_type == SlsDetectorHw.EigerDet:
for i, n in enumerate(_Cam.getHostnameList()):
......
......@@ -468,15 +468,14 @@ class SlsDetectorJungfrauClass(SlsDetectorClass):
#----------------------------------------------------------------------------
_SlsDetectorJungfrau = None
def get_control(config_fname, **keys) :
def get_control(config_fname, detector_id=0, **keys) :
global _SlsDetectorJungfrau
_Cam, _HwInter, _Control = get_slsdetector_objs()
if _Control is not None:
return _Control
det_id = 0
_Cam = SlsDetectorHw.Camera(config_fname, det_id)
_Cam = SlsDetectorHw.Camera(config_fname, int(detector_id))
det_type = _Cam.getType()
_HwInter = SlsDetectorHw.Interface(_Cam)
......
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