Skip to content

Commit

Permalink
Merge pull request #28581 from Dr15Jones/fixTPRegexp
Browse files Browse the repository at this point in the history
Fix problem with global TPRegexp
  • Loading branch information
cmsbuild authored Dec 9, 2019
2 parents c787dde + 88727a8 commit 9d98e1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions DQMServices/Components/plugins/DQMGenericClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class DQMGenericClient : public DQMEDHarvester {
void limitedFit(MonitorElement* srcME, MonitorElement* meanME, MonitorElement* sigmaME);

private:
TPRegexp metacharacters_;
TPRegexp nonPerlWildcard_;
unsigned int verbose_;
bool runOnEndLumi_;
bool runOnEndJob_;
Expand Down Expand Up @@ -235,10 +237,8 @@ class FitSlicesYTool {

typedef DQMGenericClient::MonitorElement ME;

TPRegexp metacharacters("[\\^\\$\\.\\*\\+\\?\\|\\(\\)\\{\\}\\[\\]]");
TPRegexp nonPerlWildcard("\\w\\*|^\\*");

DQMGenericClient::DQMGenericClient(const ParameterSet& pset) {
DQMGenericClient::DQMGenericClient(const ParameterSet& pset)
: metacharacters_("[\\^\\$\\.\\*\\+\\?\\|\\(\\)\\{\\}\\[\\]]"), nonPerlWildcard_("\\w\\*|^\\*") {
typedef std::vector<edm::ParameterSet> VPSet;
typedef std::vector<std::string> vstring;
typedef boost::escaped_list_separator<char> elsc;
Expand Down Expand Up @@ -607,7 +607,7 @@ void DQMGenericClient::makeAllPlots(DQMStore::IBooker& ibooker, DQMStore::IGette
if (subDir[subDir.size() - 1] == '/')
subDir.erase(subDir.size() - 1);

if (TString(subDir).Contains(metacharacters)) {
if (TString(subDir).Contains(metacharacters_)) {
isWildcardUsed_ = true;

const string::size_type shiftPos = subDir.rfind('/');
Expand Down Expand Up @@ -1198,7 +1198,7 @@ void DQMGenericClient::findAllSubdirectories(DQMStore::IBooker& ibooker,
return;
}
if (pattern != "") {
if (pattern.Contains(nonPerlWildcard))
if (pattern.Contains(nonPerlWildcard_))
pattern.ReplaceAll("*", ".*");
TPRegexp regexp(pattern);
ibooker.cd(dir);
Expand Down
2 changes: 0 additions & 2 deletions GeneratorInterface/RivetInterface/plugins/DQMRivetClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ using namespace edm;

typedef DQMRivetClient::MonitorElement ME;

TPRegexp metacharacters("[\\^\\$\\.\\*\\+\\?\\|\\(\\)\\{\\}\\[\\]]");

DQMRivetClient::DQMRivetClient(const ParameterSet& pset) {
typedef std::vector<edm::ParameterSet> VPSet;
typedef std::vector<std::string> vstring;
Expand Down

0 comments on commit 9d98e1d

Please sign in to comment.