Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:19

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2022-2024 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 // Local include(s).
0009 #include "traccc/io/read_conditions_config.hpp"
0010 
0011 #include "json/read_conditions_config.hpp"
0012 #include "traccc/io/utils.hpp"
0013 
0014 // System include(s).
0015 #include <stdexcept>
0016 #include <string>
0017 
0018 namespace traccc::io {
0019 
0020 conditions_config read_conditions_config(std::string_view filename,
0021                                          data_format format) {
0022   // Construct the full filename.
0023   std::string full_filename = get_absolute_path(filename);
0024 
0025   // Decide how to read the file.
0026   switch (format) {
0027     case data_format::json:
0028       return json::read_conditions_config(full_filename);
0029     default:
0030       throw std::invalid_argument("Unsupported data format");
0031   }
0032 }
0033 
0034 }  // namespace traccc::io