From eb2e23994697c9facb74d74eda0b5814f10cbab6 Mon Sep 17 00:00:00 2001
From: Mathieu Tillet <tillet@ill.eu>
Date: Thu, 13 Feb 2020 16:12:00 +0100
Subject: [PATCH] Fixed loader criterium for SANS so it does not accept TOF

---
 Framework/DataHandling/src/LoadILLSANS.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Framework/DataHandling/src/LoadILLSANS.cpp b/Framework/DataHandling/src/LoadILLSANS.cpp
index 562ff4feaea..a906eb7e610 100644
--- a/Framework/DataHandling/src/LoadILLSANS.cpp
+++ b/Framework/DataHandling/src/LoadILLSANS.cpp
@@ -79,7 +79,11 @@ int LoadILLSANS::confidence(Kernel::NexusDescriptor &descriptor) const {
       ((descriptor.pathExists("/entry0/reactor_power") &&
         descriptor.pathExists("/entry0/instrument_name")) ||
        (descriptor.pathExists("/entry0/instrument/name") &&
-        descriptor.pathExists("/entry0/acquisition_mode")))) {
+        descriptor.pathExists("/entry0/acquisition_mode") &&
+        !descriptor.pathExists(
+            "/entry0/instrument/Detector")))) // serves to remove the TOF
+                                              // instruments
+  {
     return 80;
   } else {
     return 0;
-- 
GitLab