Commit d585a2c4 authored by Matias Guijarro's avatar Matias Guijarro Committed by Wout De Nolf
Browse files

add HasScanMetadataExclusive: same as HasScanMetadata, but indicates that...

add HasScanMetadataExclusive: same as HasScanMetadata, but indicates that metadata is only useful when the controller is involved in a scan
parent c72638f6
......@@ -165,3 +165,7 @@ class HasMetadataForScan(ABC):
return self.name
except AttributeError:
return None
class HasMetadataForScanExclusive(HasMetadataForScan):
pass
......@@ -15,7 +15,7 @@ from bliss.common.tango import DeviceProxy, DevFailed, Database, DevState
from bliss.config import settings
from bliss.config.beacon_object import BeaconObject
from bliss.common.logtools import log_debug
from bliss.common.protocols import HasMetadataForScan
from bliss.common.protocols import HasMetadataForScanExclusive
from bliss.controllers.counter import CounterController, counter_namespace
from bliss import current_session
......@@ -81,7 +81,7 @@ class ChangeTangoTimeout(object):
self.__device.set_timeout_millis(self.__back_timeout)
class Lima(CounterController, HasMetadataForScan):
class Lima(CounterController, HasMetadataForScanExclusive):
"""
Lima controller.
Basic configuration:
......
......@@ -22,7 +22,7 @@ import gevent
from bliss import global_map
from bliss.controllers.mca.roi import RoiConfig
from bliss.common.logtools import log_debug
from bliss.common.protocols import HasMetadataForScan
from bliss.common.protocols import HasMetadataForScanExclusive
from bliss.common.utils import autocomplete_property
from bliss.config.beacon_object import BeaconObject
from bliss.controllers.counter import CounterController
......@@ -98,7 +98,7 @@ class MCABeaconObject(BeaconObject):
# Base class
class BaseMCA(CounterController, HasMetadataForScan):
class BaseMCA(CounterController, HasMetadataForScanExclusive):
"""Generic MCA controller."""
# Life cycle
......
......@@ -18,7 +18,7 @@ import pprint
import weakref
from bliss import global_map
from bliss.common.protocols import HasMetadataForScan
from bliss.common.protocols import HasMetadataForScan, HasMetadataForScanExclusive
from bliss.common.logtools import user_warning
......@@ -140,6 +140,9 @@ def get_controllers_scan_meta(filtered_names=None):
for obj in global_map.instance_iter("controllers"):
if isinstance(obj, HasMetadataForScan):
if isinstance(obj, HasMetadataForScanExclusive):
# metadata for this controller has to be gathered by acq. chain
continue
if not obj.scan_metadata_enabled:
continue
if filtered_names and obj.scan_metadata_name in filtered_names:
......
Supports Markdown
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