attpcdaq.daq.views.pages.easy_setup

attpcdaq.daq.views.pages.easy_setup(experiment, num_cobos, one_ecc_server, first_cobo_ecc_ip, first_cobo_data_router_ip, cobo_ecc_log_path, cobo_router_log_path, cobo_config_root, cobo_config_backup_root, mutant_is_present=False, mutant_ecc_ip=None, mutant_data_router_ip=None, mutant_ecc_log_path=None, mutant_router_log_path=None, mutant_config_root=None, mutant_config_backup_root=None)[source]

Create a set of model instances with default values based on the given parameters.

This will populate the database with all of the required DAQ components. Note that all old instances will be deleted. This is done atomically, so if this function fails, nothing will be changed.

Parameters:
  • experiment (attpcdaq.daq.models.Experiment) – The experiment to modify.
  • num_cobos (int) – The number of CoBos to add to the system.
  • one_ecc_server (bool) – If True, all data sources will use the same ECC server. If False, a separate ECC server will be created for each data source.
  • first_cobo_ecc_ip (str) – The IP address of the ECC server for the first CoBo. Subsequent ECC servers will have IP addresses whose last component is incremented by one.
  • first_cobo_data_router_ip (str) – The IP address of the data router for the first CoBo. Subsequent data routers will have IP addresses whose last component is incremented by one.
  • cobo_ecc_log_path (str) – The path to the CoBo ECC server log file. This is on the remote computer.
  • cobo_router_log_path (str) – The path to the CoBo data router log file. This is on the remote computer.
  • cobo_config_root (str) – The path to the config file directory on the remote computer.
  • cobo_config_backup_root (str) – The path to which config files should be backed up on the remote computer.
  • mutant_is_present (bool, optional) – True if the MuTAnT is present in the system and should be set up.
  • mutant_ecc_ip (str, optional) – The IP address of the ECC server of the MuTAnT. This will be overridden if one_ecc_server is True.
  • mutant_data_router_ip (str, optional) – The IP address of the data router of the MuTAnT.
  • mutant_ecc_log_path (str, optional) – The path to the MuTAnT ECC server log file. This is on the remote computer.
  • mutant_router_log_path (str, optional) – The path to the MuTAnT data router log file. This is on the remote computer.
  • mutant_config_root (str, optional) – The path to the config file directory on the remote computer.
  • mutant_config_backup_root (str, optional) – The path to which config files should be backed up on the remote computer.