Skip to content
Snippets Groups Projects
Commit 41d0cf96 authored by David Hammer's avatar David Hammer
Browse files

Use TrainMatcher for groups with support from manager + bridge fix

parent f6759a41
No related branches found
No related tags found
2 merge requests!12Snapshot: field test deployed version as of end of run 202201,!3Base correction device, CalCat interaction, DSSC and AGIPD devices
......@@ -47,7 +47,7 @@ class ClassIdsNode(Configurable):
displayedName='Group matcher class',
description='Device class to use for matching the stream output of a '
'module group.',
defaultValue='ModuleMatcher',
defaultValue='TrainMatcher',
accessMode=AccessMode.INITONLY,
assignment=Assignment.MANDATORY)
......@@ -63,7 +63,7 @@ class ClassIdsNode(Configurable):
displayedName='Preview matcher class',
description='Device class to use for matching the output of a preview '
'layer.',
defaultValue='ModuleMatcher',
defaultValue='ModuleStacker',
accessMode=AccessMode.INITONLY,
assignment=Assignment.MANDATORY)
......@@ -439,6 +439,13 @@ class CalibrationManager(DeviceClientBase, Device):
defaultValue=True,
accessMode=AccessMode.RECONFIGURABLE)
autoActivateGroupMatchers = Bool(
displayedName='Activate group matchers automatically',
description='Whether to activate all group matchers (feeding group bridges) '
'immediately after instantation',
defaultValue=True,
accessMode=AccessMode.RECONFIGURABLE)
outputAxisOrder = String(
displayedName='Output axis order',
description='Axes of main data output can be reordered after correction. '
......@@ -766,7 +773,7 @@ class CalibrationManager(DeviceClientBase, Device):
# If some servers are still up, go for the kill.
if up_names:
self.logger.warn('Some servers still up after waiting for '
'downTimeout: {up_names}')
f'downTimeout: {up_names}')
try:
await wait_for(gather(
......@@ -963,6 +970,14 @@ class CalibrationManager(DeviceClientBase, Device):
matcher_device_id, config
):
return
elif self.autoActivateGroupMatchers:
async def _activate_matcher(device_id):
with await getDevice(device_id) as device:
await sleep(3)
if device.state == State.PASSIVE:
await device.start()
background(_activate_matcher(matcher_device_id))
# Group bridge, if applicable.
if with_bridge:
......
import threading
from time import time
import shmem_utils
from karabo.bound import KARABO_CLASSINFO, VECTOR_STRING_ELEMENT
from PipeToZeroMQ import PipeToZeroMQ, conversion, device_schema
......@@ -74,8 +73,7 @@ class ShmemToZMQ(PipeToZeroMQ.PipeToZeroMQ):
metadata = self._extract_metadata(all_meta, idx)
source = metadata["source"]
if source not in self.sources:
schema = self.getFullSchema()
self.appendSchema(device_schema.timestamp_schema(schema, source))
self.appendSchema(device_schema.timestamp_schema(source))
self.sources.add(source)
self._time_info(metadata, actual, self.info)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment