Skip to content

Commit

Permalink
Disable swtpg by setting super-high thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
eflumerf committed Apr 10, 2024
1 parent 2c0e726 commit 27c3f93
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/integrationtest/config/hsi-segment.data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

<obj class="FakeHSIEventGeneratorConf" id="fakehsi">
<attr name="clock_frequency" type="u64" val="62500000"/>
<attr name="trigger_rate" type="double" val="3"/>
<attr name="trigger_rate" type="double" val="1"/>
<attr name="hsi_device_id" type="u32" val="1"/>
<attr name="mean_signal_multiplicity" type="u32" val="1"/>
<attr name="enabled_signals" type="u32" val="1"/>
Expand Down
17 changes: 12 additions & 5 deletions python/integrationtest/integrationtest_drunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CreateConfigResult:
config_db = config_dir / "integtest-session.data.xml"
logfile = tmp_path_factory.getbasetemp() / f"stdouterr{request.param_index}.txt"

tpg_enabled = True # Only True is supported at the moment...
tpg_enabled = False
emulated_file_name = "asset://?checksum=e96fd6efd3f98a9a3bfaba32975b476e"
op_env = "swtest"

Expand All @@ -96,8 +96,8 @@ class CreateConfigResult:
integtest_conf = conf_dict["config_db"].replace("INTEGTEST_CONFDIR", os.path.dirname(__file__) + "/config")

if "readout" in conf_dict.keys():
#if "enable_tpg" in conf_dict["readout"].keys(): # Disabling swtpg is not supported at the moment
# tpg_enabled = conf_dict["readout"]["enable_tpg"]
if "enable_tpg" in conf_dict["readout"].keys():
tpg_enabled = conf_dict["readout"]["enable_tpg"]

if "default_data_file" in conf_dict["readout"].keys():
emulated_file_name = conf_dict["readout"]["default_data_file"]
Expand Down Expand Up @@ -143,8 +143,8 @@ class CreateConfigResult:
True,
False,
emulated_file_name="asset://?checksum=e96fd6efd3f98a9a3bfaba32975b476e",
tpg_enabled=tpg_enabled,
)
tpg_enabled=True, # Only True is supported here right now
)

if not file_exists(dataflow_db):
raise Exception(f"Requested dataflow configuration database {dataflow_db} does not exist!")
Expand All @@ -161,6 +161,13 @@ class CreateConfigResult:
dal = oksdbinterfaces.dal.module("generated", "schema/appdal/fdmodules.schema.xml")
db = oksdbinterfaces.Configuration("oksconfig:" + str(config_db))

if not tpg_enabled:
print(f"Disabling TPG by setting threshold very high, since processors must be in place in current code")
rdps = db.get_dals(class_name="RawDataProcessor")
for rdp in rdps:
rdp.threshold = 65535
db.update_dal(rdp)

fsm = db.get_dal(class_name="FSMconfiguration", uid="fsmConf-1")

hosts = []
Expand Down

0 comments on commit 27c3f93

Please sign in to comment.