Skip to content

fix(npdet_info): constants of datatype `"string"` must be printed as strings

Christopher Dilks requested to merge npdet-info-string-constants into master

Defining a constant with datatype "string" will cause npdet_info search and npdet_info dump to throw a runtime exception, claiming the constant value is an "unknown variable". This MR adds a check of the Constant datatype, and handles printing of string Constants.

Note: to make a string constant, call

dd4hep::Detector::add(Constant("example_constant_name", "example_string_value", "string"));

Merge request reports