From 0608efa40397cd99448dffc6c5c8d002a32056a4 Mon Sep 17 00:00:00 2001
From: sutt <sutt@cern.ch>
Date: Wed, 16 Sep 2020 09:31:39 +0200
Subject: [PATCH] Push additional	temporary debugging to ignore
 differenced with regex

The check on the difference is whether the output from the find	and the	regex_match
was different.

However, if a regex is passed in, ie ".*SomeContainer" then a find for this and
for the	 regex will be different, so we don't want to bother with this check for	regexs
---
 .../TrigCompositeUtils/TrigCompositeUtils.icc | 23 +++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
index 817e6a5dd6ad..0ba985e24011 100644
--- a/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
+++ b/Trigger/TrigSteer/TrigCompositeUtils/TrigCompositeUtils/TrigCompositeUtils.icc
@@ -141,18 +141,23 @@ namespace TrigCompositeUtils {
     }
     auto it = std::remove_if(vector.begin(), vector.end(), [&](const ElementLink<CONTAINER>& el) {
 
-	bool oldmatch = ( el.dataID().find(containerSGKey) == std::string::npos);
-	
 	bool newmatch = !std::regex_match( el.dataID(), std::regex(containerSGKey) );
-		
-	// ANA_MSG_WARNING ( "Strict match violation" << el.dataID() << " : " << containerSGKey ); 
 
-	if ( oldmatch!=newmatch ) std::cerr << "SUTT:: Strict match violation" << el.dataID() << " : " << containerSGKey << std::endl;; 
-				  
+	if ( containerSGKey.find("*")==std::string::npos &&
+	     containerSGKey.find(".")==std::string::npos ) { 
+	  
+	  bool oldmatch = ( el.dataID().find(containerSGKey) == std::string::npos);
+	  
+	  // ANA_MSG_WARNING ( "Strict match violation" << el.dataID() << " : " << containerSGKey ); 
+	  if ( oldmatch!=newmatch ) { 
+	    std::cerr << "SUTT:: Strict match violation " << el.dataID() << " : " << containerSGKey << std::endl;; 
+	  }
+	  
+	}
+
 	return  !std::regex_match( el.dataID(), std::regex(containerSGKey) );
-      
-        // return (el.dataID().find(containerSGKey) == std::string::npos);
-    });
+
+      });
     // Collection has been re-ordered to put the bad elements at the end
     vector.erase(it, vector.end());
   }
-- 
GitLab