From 1c8dfff502af11897812c31e4b5bb2cc291aad8f Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 7 Jul 2026 19:31:20 +0200 Subject: [PATCH] Fix needed for change in root io protocol root-project/root#22744 --- FWStorage/TFileAdaptor/src/TFileAdaptor.cc | 10 ++++++---- FWStorage/TFileAdaptor/test/tfileTest.cpp | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/FWStorage/TFileAdaptor/src/TFileAdaptor.cc b/FWStorage/TFileAdaptor/src/TFileAdaptor.cc index 8e99432fbd03a..d6005803b3225 100644 --- a/FWStorage/TFileAdaptor/src/TFileAdaptor.cc +++ b/FWStorage/TFileAdaptor/src/TFileAdaptor.cc @@ -192,10 +192,12 @@ TFileAdaptor::TFileAdaptor(edm::ParameterSet const& pset, edm::ActivityRegistry& addType(mgr, "^dcap:"); if (!native("gsidcap")) addType(mgr, "^gsidcap:"); - if (!native("root")) - addType(mgr, "^root:", 1); // See comments in addType - if (!native("root")) - addType(mgr, "^[x]?root:", 1); // See comments in addType + if (!native("root")) { + // See comments in addType + addType(mgr, "^root:", 1); + addType(mgr, "^[x]?root:", 1); + addType(mgr, "^[x]?root[s]?:", 1); + } // Make sure the TStorageFactoryFile can be loaded regardless of the header auto-parsing setting { diff --git a/FWStorage/TFileAdaptor/test/tfileTest.cpp b/FWStorage/TFileAdaptor/test/tfileTest.cpp index 8bf92ba4d23e1..87b76a2bf9ada 100644 --- a/FWStorage/TFileAdaptor/test/tfileTest.cpp +++ b/FWStorage/TFileAdaptor/test/tfileTest.cpp @@ -18,9 +18,18 @@ int main(int argc, char* argv[]) { // This list should replicate the addHandler calls in TFileAdaptor - std::array const protocols = { - {"^file:", "^http:", "^http[s]?:", "^ftp:", "^web:", "^dcache:", "^dcap:", "^gsidcap:", "^root:", "^[x]?root:"}}; - std::array const uris{{"file:foo", + std::array const protocols = {{"^file:", + "^http:", + "^http[s]?:", + "^ftp:", + "^web:", + "^dcache:", + "^dcap:", + "^gsidcap:", + "^root:", + "^[x]?root:", + "^[x]?root[s]?:"}}; + std::array const uris{{"file:foo", "http://foo", "https://foo", "ftp://foo", @@ -29,7 +38,8 @@ int main(int argc, char* argv[]) { "dcap://foo", "gsidcap://foo", "root://foo", - "xroot://foo"}}; + "xroot://foo", + "xroots://foo"}}; char const* tStorageFactoryFileFunc = "TStorageFactoryFile(char const*, Option_t*, char const*, Int_t)"; char const* tStorageFactoryFileFuncNet =