diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonGenericTracksMon.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonGenericTracksMon.cxx
index beb5c6af12644050c701e7dc263b1209dea200d6..4cee95e63ed84108e87d81a22a333fd09cf8e23f 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonGenericTracksMon.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/src/MuonGenericTracksMon.cxx
@@ -105,9 +105,7 @@ StatusCode MuonGenericTracksMon::bookHistograms()
   //set the path with trigger chain name
   std::string rootpath = "MuonPhysics/";
   
-  if(newEventsBlock){}
-  if(newLumiBlock){}
-  if(newRun) {
+  if(newRunFlag()) {
 
     //example of how to register a new histogram
     m_hNEvent = new TH1F("Overview_nEvent", "Number of Events;LumiBlock;Nevents", 2000, -0.5, 1999.5);
@@ -623,9 +621,7 @@ StatusCode MuonGenericTracksMon::procHistograms()
   
     ATH_MSG_DEBUG("MuonTrackMonitoring procHistograms()");
     
-    if(endOfEventsBlock){}
-    if(endOfLumiBlock){}
-    if(endOfRun) {
+    if(endOfRunFlag()) {
 
       //finish the post processing
       //for (auto plots : m_oRecoPhysPlots)            plots->finalizeRecoPlots();