17 UriComponents uri{locator};
19 if (uri.scheme ==
"file") {
20 std::regex ext_regex{R
"(\.([^.\\/]+)$)"};
21 std::smatch ext_match;
22 std::regex_search(uri.path, ext_match, ext_regex);
23 const auto filetype = ext_match[1].str();
25 if (filetype ==
"rra") {
26 L_(debug) << fmt::format(
"[VtSource] Adding RraSource with locator {} as underlying source", locator);
29 else if (filetype ==
"root") {
30 L_(debug) << fmt::format(
"[VtSource] Adding SimSource with locator {} as underlying source", locator);
34 throw std::runtime_error(fmt::format(
"[VtSource] Unsupported input filetype: {}", filetype));
38 throw std::runtime_error(fmt::format(
"[VtSource] Unsupported input scheme: {}", uri.scheme));