Skip to content
Snippets Groups Projects
Commit d43f4e43 authored by sutt's avatar sutt
Browse files

Handle explicit case of an empty string

A empty regex string will match no patterns, whereas as find for an empty
string will match any pattern, so to maintain the expected behaviour of
an empty string matching any key, this has to be handled separately
parent 0608efa4
7 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!37019Enhance TDT feature retrieval by allowing regex matching,!36437Enhance TDT feature retrieval by allowing regex matching
......@@ -141,6 +141,9 @@ namespace TrigCompositeUtils {
}
auto it = std::remove_if(vector.begin(), vector.end(), [&](const ElementLink<CONTAINER>& el) {
/// handle explicit case of an empty string
if ( containerSGKey=="" ) return false;
bool newmatch = !std::regex_match( el.dataID(), std::regex(containerSGKey) );
if ( containerSGKey.find("*")==std::string::npos &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment