ph2acf_instance
Module containing the Ph2ACFInstance class to run Ph2ACF in a new managed subprocess.
Classes
|
Manager class to run Ph2ACF's CMSITminiDAQ in a managed subprocess. |
Ph2ACFInstance
- class module_testing.dirigent.ph2acf_instance.Ph2ACFInstance(context, calibration, sub_shell, mode='software', ph2_dir='', *flags)
Bases:
objectManager class to run Ph2ACF’s CMSITminiDAQ in a managed subprocess.
- __init__(context, calibration, sub_shell, mode='software', ph2_dir='', *flags)
Constructs wrapper for Ph2ACF subprocess executing requested calibration.
- Parameters:
context – CalibrationContext this instance should use.
calibration – calibration name to be passed to -c for CMSITminiDAQ.
flags – list of additional command line arguments/flags to be passed to CMSITminiDAQ.
sub_shell – indicates in which shell the process is to be started. CURRENTLY ONLY xterm WORKS!!
mode – differenciator, if the instance is used to run a scan (CMSITminiDAQ) or to load a firmware (fpgaconfig)
ph2_dir – string with the path of the ph2_acf instance that is to be loaded if empty, it is assumed, an instance is already loaded.
- BASE_COMMAND_TMUX = ['tmux', 'new', '-d', '-s', 'Ph2_ACF_instance ;', 'tmux', 'send-keys', '-t', 'Ph2_ACF_instance', 'C-z', "'", 'cd', '/builds/cms_tk_ph2/dirigent/docs', '&&']
- BASE_COMMAND_TMUX_END = [';', 'tmux', 'wait', '-S', 'scan_finished', "'", 'Enter ;', 'tmux', 'wait', 'scan_finished']
- BASE_COMMAND_XTERM = ['xterm', '-T', 'Ph2_ACF_Instance', '-sl', '8192', '-geometry', '120x60+0+0', '-fs', '10', '-fa', 'Mono', '-bg', 'black', '-fg', 'gray', '-e']
- CALIBRATION = '-c'
Calibration name flag in Ph2ACF’s CMSITminiDAQ.
- FIRMWARE = '-i'
FC7 firmware load flag for fpgaconfig
- FIRMWARE_COM = ['fpgaconfig']
- FW_CONFIG = '-c'
HW config flag in fpgaconfig
- HW_CONFIG = '-f'
HW config flag in Ph2ACF’s CMSITminiDAQ.
- PROGRAM = '-p'
Program system components flag in Ph2ACF’s CMSITminiDAQ.
- RESET = '-r'
FC7 DDR reset flag in Ph2ACF’s CMSITminiDAQ
- SOFTWARE_COM = ['CMSITminiDAQ']
- TMUX_NAME = 'Ph2_ACF_instance'
- kill()
Kill the Ph2ACF CMSITminiDAQ subprocess being managed by this Ph2ACFInstance object.
- classmethod load_firmware(context, sub_shell, ph2_dir, firmware_name, *flags)
Construct wrapper for Ph2ACF subprocess to load a firmware.
- Parameters:
context – CalibrationContext this instance should use.
sub_shell – shell in which the process should be executed
ph2_dir – path to the software. If ‘’, a software is assumed to be loaded.
flags – list of additional command line arguments/flags to be passed to CMSITminiDAQ.
- poll()
Poll Ph2ACF CMSITminiDAQ subprocess.
- Returns:
True if process still running, False otherwise.
- classmethod program_system(context, sub_shell, ph2_dir, *flags)
Construct wrapper for Ph2ACF subprocess to just program the system components.
- Parameters:
context – CalibrationContext this instance should use.
sub_shell – shell in which the process should be executed
ph2_dir – path to the software. If ‘’, a software is assumed to be loaded.
flags – list of additional command line arguments/flags to be passed to CMSITminiDAQ.
- classmethod reset(context, sub_shell, ph2_dir, *flags)
Construct wrapper for Ph2ACF subprocess executing FC7 DDR reset.
- Parameters:
context – CalibrationContext this instance should use.
sub_shell – shell in which the process should be executed
ph2_dir – path to the software. If ‘’, a software is assumed to be loaded.
flags – list of additional command line arguments/flags to be passed to CMSITminiDAQ.
- send_signal(signal)
Send a signal to the Ph2ACF CMSITminiDAQ subprocess being managed by this Ph2ACFInstance object.