From 5cc1e3925bac119252af817f7056e045e161429b Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sun, 12 May 2024 18:24:06 +0200 Subject: [PATCH] Don't check type for SIO --- src/Writer.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Writer.cc b/src/Writer.cc index a3eef5c93..13f979ce8 100644 --- a/src/Writer.cc +++ b/src/Writer.cc @@ -25,15 +25,13 @@ Writer makeWriter(const std::string& filename, const std::string& type) { if ((type == "default" && endsWith(filename, ".root")) || lower(type) == "root") { return Writer{std::make_unique(filename)}; - } - if (lower(type) == "rntuple") { + } else if (lower(type) == "rntuple") { #if PODIO_ENABLE_RNTUPLE return Writer{std::make_unique(filename)}; #else throw std::runtime_error("ROOT RNTuple writer not available. Please recompile with ROOT RNTuple support."); #endif - } - if ((type == "default" && endsWith(filename, ".sio")) || lower(type) == "sio") { + } else if (endsWith(filename, ".sio")) { #if PODIO_ENABLE_SIO return Writer{std::make_unique(filename)}; #else