Skip to content
Snippets Groups Projects
Commit 82724323 authored by Sebastien Ponce's avatar Sebastien Ponce
Browse files

Full support for testfiledb_key entry of yaml options in bandwidth tests

parent ef07814c
No related branches found
No related tags found
1 merge request!480Added more davinci entries to TestFileDB
......@@ -198,12 +198,30 @@ if __name__ == '__main__':
)
# Always use config['input_files'] for inputs if available.
# Otherwise, use config['testfiledb_key'] for inputs.
# use config['testfiledb_key'] if it exists
if "testfiledb_key" in config.keys():
from PRConfig.TestFileDB import test_file_db
tfdb_entry = test_file_db[config['testfiledb_key']]
qualifiers = tfdb_entry.qualifiers
if "input_files" not in config:
config["input_files"] = tfdb_entry.filenames
if "input_type" not in config:
file_format = qualifiers['Format']
config["input_type"] = 'ROOT' if file_format != 'MDF' else 'RAW'
if "data_type" not in config:
config["data_type"] = qualifiers['DataType']
if "simulation" not in config:
config["simulation"] = qualifiers['Simulation']
if "dddb_tag" not in config:
config["dddb_tag"] = qualifiers['DDDB']
if "conddb_tag" not in config:
config["conddb_tag"] = qualifiers['CondDB']
if "GeometryVersion" in qualifiers and "geometry_version" not in config:
config["geometry_version"] = qualifiers["GeometryVersion"]
if "ConditionsVersion" in qualifiers and "conditions_version" not in config:
config["conditions_version"] = qualifiers["ConditionsVersion"]
if "input_files" in config.keys():
inputs_fns = config["input_files"]
elif "testfiledb_key" in config.keys():
from PRConfig.TestFileDB import test_file_db
inputs_fns = test_file_db[config['testfiledb_key']].filenames
else:
raise KeyError(
f'{args.config} does not provide either the "testfiledb_key" or "input_files".'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment