DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
ctbcontrollerconf_gen Namespace Reference

Functions

 cli (config, json_dir)
 

Variables

 CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
 
 console = Console()
 
 default_load_path
 
 show_default
 
 True
 
 standalone_mode
 

Function Documentation

◆ cli()

ctbcontrollerconf_gen.cli ( config,
json_dir )

Definition at line 32 of file ctbcontrollerconf_gen.py.

32def cli(config, json_dir):
33
34 if exists(json_dir):
35 raise RuntimeError(f"Directory {json_dir} already exists")
36
37 config_data = config[0]
38 config_file = config[1]
39
40 console.log('Loading cardcontrollerapp config generator')
41 from ctbmodules.boardcontrollerapp import boardcontrollerapp_gen
42
43 the_system = System()
44
45 moo.otypes.load_types('ctbmodules/confgen.jsonnet')
46 import dunedaq.ctbmodules.confgen as confgen
47 moo.otypes.load_types('daqconf/confgen.jsonnet')
48 import dunedaq.daqconf.confgen as daqconf
49
50 nickname = 'ctb'
51 console.log('generating cardcontrollerapp')
52
53 boot = daqconf.boot(**config_data.boot)
54
55 app = boardcontrollerapp_gen.get_boardcontroller_app(
56 nickname = nickname,
57 )
58 console.log('generated cardcontrollerapp')
59 the_system.apps[nickname] = app
60 if boot.use_k8s:
61 the_system.apps[nickname].resources = {
62 #"felix.cern/flx0-ctrl": "1", # requesting FLX0 - modify for CTB
63 }
64
65
68
69 from daqconf.core.conf_utils import make_app_command_data
70 # Arrange per-app command data into the format used by util.write_json_files()
71 app_command_datas = {
72 name : make_app_command_data(the_system, app, name)
73 for name,app in the_system.apps.items()
74 }
75
76 # Make boot.json config
77 from daqconf.core.conf_utils import make_system_command_datas, write_json_files
78 system_command_datas = make_system_command_datas(
79 boot,
80 the_system,
81 )
82
83 write_json_files(app_command_datas, system_command_datas, json_dir)
84
85 console.log(f"CTB controller apps config generated in {json_dir}")
86
87 write_metadata_file(json_dir, "ctbcontrollers_gen",config_file)
88

Variable Documentation

◆ console

ctbcontrollerconf_gen.console = Console()

Definition at line 19 of file ctbcontrollerconf_gen.py.

◆ CONTEXT_SETTINGS

ctbcontrollerconf_gen.CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])

Definition at line 17 of file ctbcontrollerconf_gen.py.

◆ default_load_path

ctbcontrollerconf_gen.default_load_path

Definition at line 24 of file ctbcontrollerconf_gen.py.

◆ show_default

ctbcontrollerconf_gen.show_default

Definition at line 91 of file ctbcontrollerconf_gen.py.

◆ standalone_mode

ctbcontrollerconf_gen.standalone_mode

Definition at line 91 of file ctbcontrollerconf_gen.py.

◆ True

ctbcontrollerconf_gen.True

Definition at line 91 of file ctbcontrollerconf_gen.py.