tomwer.core.process.control.datalistener.datalistener.DataListener#
- class tomwer.core.process.control.datalistener.datalistener.DataListener#
class able to connect with a redis database. During an acquisition at esrf the redis database expose the scan under acquisition. This allow use to know when a scan is finished.
In order to insure connection the machine need to know where is located the ‘bacon server’ (see https://bliss.gitlab-pages.esrf.fr/bliss/master/bliss_data_life.html). This is why the ‘BEACON_HOST’ environment variable should be defined.
For example for id19 - lbs 191 we have: export BEACON_HOST=”europa” On id19 - europa we would have export BEACON_HOST=”localhost”
- SWMR_MODE = None#
The bliss writer is not using the swmr mode. This class has independent behavior regarding the tomoscan / nxotmo get_swmr_mode which is dedicated to the internal tomotools behavior
- TIMOUT_READ_FILE = 30#
When the event ‘scan_ended’ is received all data might not have been write yet
- activate(activate=True)#
activate or deactivate the thread. When deactivate call join and delete the thread
- Parameters:
activate –
- convert(bliss_file, entry)#
- Parameters:
bliss_file (
str
) – file to be convertedentry (
str
) – entry in the tango .h5 file to be converter
- Return type:
tuple
- Returns:
tuple (output file, output file entry). Both are set to None if conversion fails.
- create_listening_thread()#
Procedure to create the listening thread :return: listening thread
- static definition()#
definition of the process
- delete_listening_thread()#
Procedure to delete the listening thread
- get_listening_thread()#
return the listening thread to ear at tango server
- property host#
- is_active()#
- is_port_available()#
- Returns:
True if the port is available else False
- property port#
- process_sample_file(sample_file, entry, proposal_file, master_sample_file)#
- Parameters:
sample_file (str) – file to be converted
entry (str) – entry in the tango .h5 file to be converter
- Return type:
tuple
- Returns:
tuple scan succeeded.
- static program_name()#
Name of the program used for this processing
- static program_version()#
version of the program used for this processing
- run()#
- set_configuration(properties)#