Skip to content
Snippets Groups Projects

Rich Conditions - Use nlohmann::json

Merged Christopher Rob Jones requested to merge jonrob/LHCb:rich-conds-use-nlohmann-json into master
All threads resolved!
3 files
+ 8
79
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -10,6 +10,7 @@
\*****************************************************************************/
#pragma once
#include <Core/Utils.h>
#include <Gaudi/Property.h>
#include <GaudiAlg/FixTESPath.h>
#include <GaudiAlg/FunctionalUtilities.h>
@@ -21,7 +22,6 @@
#include <GaudiKernel/detected.h>
#include <Kernel/STLExtensions.h>
#include <LbDD4hep/IDD4hepSvc.h>
#include <LbDD4hep/utils.h>
#include <any>
#include <stdexcept>
#include <type_traits>
@@ -140,8 +140,8 @@ namespace LHCb::Det::LbDD4hep {
return T( cond );
} else {
using DT = std::decay_t<T>;
if constexpr ( std::is_same_v<DT, nlohmann::json> ) {
return utils::y2j( cond.get<YAML::Node>() );
if constexpr ( std::is_same_v<DT, YAML::Node> ) {
return LHCb::Detector::utils::json2yaml( cond.get<nlohmann::json>() );
} else if constexpr ( !detail::PassAsAny<DT>::value ) {
return cond.get<DT>();
} else {
Loading