Skip to content

Commit

Permalink
Merge pull request #11050 from fwyzard/DQMStore_removeElement_do_not_…
Browse files Browse the repository at this point in the history
…remove_non-existing_MEs

DQMStore::removeElement: do not remove non-existing MEs
  • Loading branch information
cmsbuild committed Sep 3, 2015
2 parents 7f9ec74 + c85b9c9 commit c01403e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DQMServices/Core/src/DQMStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3221,11 +3221,11 @@ DQMStore::removeElement(const std::string &dir, const std::string &name, bool wa
{
MonitorElement proto(&dir, name);
MEMap::iterator pos = data_.find(proto);
if (pos == data_.end() && warning)
if (pos != data_.end())
data_.erase(pos);
else if (warning)
std::cout << "DQMStore: WARNING: attempt to remove non-existent"
<< " monitor element '" << name << "' in '" << dir << "'\n";
else
data_.erase(pos);
}

//////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit c01403e

Please sign in to comment.