From 92693d8f221ceea4a3a358b49df8e252dbfd77b7 Mon Sep 17 00:00:00 2001
From: scott snyder <scott.snyder@cern.ch>
Date: Mon, 4 Sep 2017 16:38:49 +0200
Subject: [PATCH] TrigDetCalib: Comply with ATLAS naming conventions; use
 ATH_MSG macros.

Private data members should start with m_.
Identifiers should not start with underscores.
Switch to using ATH_MSG macros in a few places.



Former-commit-id: 519267e6253b7acbeaed62d5dfb482a8784592fe
---
 .../TrigDetCalib/src/TrigCheckForTracks.cxx   | 66 +++++++------------
 .../TrigDetCalib/src/TrigCheckForTracks.h     |  8 +--
 .../TrigDetCalib/src/TrigROBListWriter.cxx    |  4 +-
 3 files changed, 30 insertions(+), 48 deletions(-)

diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx
index e28768d0d13..e29d0c03caf 100755
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.cxx
@@ -48,9 +48,9 @@ TrigCheckForTracks::TrigCheckForTracks(const std::string& name, ISvcLocator* pSv
   declareProperty("eta_Width",    m_etaWidth = 0.1);
   declareProperty("etaEdge",      m_etaEdge = 5.0, "Upper limit of |eta| range");
   declareProperty("etaLowEdge",   m_etaLowEdge = 0.0, "Lower limit of |eta| range");
-  declareProperty("tracksName",   tracksName = "HLT_TrigFastTrackFinder_Tau");  
-  declareProperty("doNotPass",           doNotPass = false);        // pass through flag for initial beam items.
-  declareProperty("lookForAnyTracks",    lookForAnyTracks = false); // any vs isolated. any is needed for initial beam items.
+  declareProperty("tracksName",   m_tracksName = "HLT_TrigFastTrackFinder_Tau");  
+  declareProperty("doNotPass",           m_doNotPass = false);        // pass through flag for initial beam items.
+  declareProperty("lookForAnyTracks",    m_lookForAnyTracks = false); // any vs isolated. any is needed for initial beam items.
   declareProperty("AddCTPResult", m_addCTPResult = false, "Add the CTP result to the list of ROBs");
   declareProperty("AddL2Result",  m_addL2Result = false,  "Add the L2 result to the list of ROBs");
   declareProperty("AddEFResult",  m_addEFResult = false,  "Add the EF result to the list of ROBs");
@@ -66,7 +66,7 @@ TrigCheckForTracks::TrigCheckForTracks(const std::string& name, ISvcLocator* pSv
   declareMonitoredStdContainer("phi_tracks",     m_phi);
   declareMonitoredStdContainer("eta_tracks_ISO", m_ROB_eta);
   declareMonitoredStdContainer("phi_tracks_ISO", m_ROB_phi);
-  declareMonitoredVariable("iso_Tracks",         n_IsoTracks);
+  declareMonitoredVariable("iso_Tracks",         m_n_IsoTracks);
 
 }
 
@@ -82,8 +82,8 @@ HLT::ErrorCode TrigCheckForTracks::hltInitialize()
   // Initialize timing service
   //------------------------------
   if( service( "TrigTimerSvc", m_timerSvc).isFailure() ) {
-    msg() << MSG::WARNING << name()
-	<< ": Unable to locate TrigTimer Service" << endmsg;
+    ATH_MSG_WARNING( name()
+                     << ": Unable to locate TrigTimer Service"  );
   }
   if (m_timerSvc)    
     m_timers.push_back(m_timerSvc->addItem("TrigCheckForTracks.TrigCheckForTracksTot"));
@@ -111,7 +111,7 @@ HLT::ErrorCode TrigCheckForTracks::hltBeginRun()
 HLT::ErrorCode TrigCheckForTracks::hltFinalize(){
 // ----------------------------------------------------------------------
 
-  msg() << MSG::INFO << "Events accepted/rejected/errors:  "<< m_acceptedEvts <<" / "<< m_rejectedEvts << " / "<< m_errorEvts << endmsg;
+  ATH_MSG_INFO( "Events accepted/rejected/errors:  "<< m_acceptedEvts <<" / "<< m_rejectedEvts << " / "<< m_errorEvts  );
   return HLT::OK;
 }
 
@@ -121,23 +121,18 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 // ----------------------------------------------------------------------
 
   if (m_executedEvent) {
-    if (msgLvl() <= MSG::DEBUG) {
-      msg() << MSG::DEBUG << "*** Not Executing this TrigCheckForTracks " << name() << ", already executed"  << endmsg;
-    }
-
+    ATH_MSG_DEBUG( "*** Not Executing this TrigCheckForTracks " << name() << ", already executed"   );
     return HLT::OK;
   }
 
-  if (msgLvl() <= MSG::DEBUG) {
-    msg() << MSG::DEBUG << "***  Executing this TrigCheckForTracks : " << name() << endmsg;
-  }
+  ATH_MSG_DEBUG( "***  Executing this TrigCheckForTracks : " << name()  );
 
 
   //--> PEB Related Stuff
 
   PartialEventBuildingInfo* pebInfo = config()->getPEBI();
   if(!pebInfo){
-    if (msgLvl() <= MSG::DEBUG) msg() << "*** Not Executing this TrigCheckForTracks " << name() << ", not a calib chain" << endmsg;
+    ATH_MSG_DEBUG( "*** Not Executing this TrigCheckForTracks " << name() << ", not a calib chain" );
     return HLT::OK;
   }
   //--< PEB Related Stuff
@@ -161,34 +156,25 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 
   const TrackCollection* tracks = 0;
 
-  if (evtStore()->transientContains<TrackCollection>(tracksName)) {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "*** TrackCollection with name "<< tracksName <<" found in StoreGate (transientContains)" << endmsg;
-    }
+  if (evtStore()->transientContains<TrackCollection>(m_tracksName)) {
+    ATH_MSG_DEBUG( MSG::DEBUG << "*** TrackCollection with name "<< m_tracksName <<" found in StoreGate (transientContains)"  );
   }
   else {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "*** No TrackCollection with name" << tracksName << " found in StoreGate (transientContains)" << endmsg;
-    }
+    ATH_MSG_DEBUG( "*** No TrackCollection with name" << m_tracksName << " found in StoreGate (transientContains)"  );
     return HLT::OK;
   }
   
-  StatusCode sc = evtStore()->retrieve(tracks,tracksName);
+  StatusCode sc = evtStore()->retrieve(tracks,m_tracksName);
   
-  msg()  << MSG::DEBUG << "***** Status code: "<< sc << " for key: " << tracksName << endmsg;
+  ATH_MSG_DEBUG( "***** Status code: "<< sc << " for key: " << m_tracksName  );
 
   if (sc.isFailure()) {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "No TrackCollection with name "<<tracksName<<" found in StoreGate" << endmsg;
-    }
+    ATH_MSG_DEBUG( "No TrackCollection with name "<<m_tracksName<<" found in StoreGate"  );
     m_errorEvts++;
     m_rejectedEvts++;
   } else {
-    if (msgLvl() <= MSG::DEBUG ) {
-      msg()  << MSG::DEBUG << "TrackCollection with name "<<tracksName<<" found in StoreGate" << endmsg;
-      msg()  << MSG::DEBUG << "Retrieved "<< tracks->size() <<" reconstructed tracks from StoreGate" << endmsg;
-    }
-    
+    ATH_MSG_DEBUG( "TrackCollection with name "<<m_tracksName<<" found in StoreGate"  );
+    ATH_MSG_DEBUG( "Retrieved "<< tracks->size() <<" reconstructed tracks from StoreGate"  );
 
     // Have found tracks...
     // Now loop over the tracks to find the isolated ones.
@@ -216,7 +202,7 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 	  
 	  bool gotIsoTrack = true;
 	  
-	  if (!lookForAnyTracks) 
+	  if (!m_lookForAnyTracks) 
 	    {
 
 	      for (TrackCollection::const_iterator jt = tracks->begin(); jt!=tracks->end(); ++jt)
@@ -225,8 +211,6 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 
 		  const Trk::Perigee *jp = (*jt)->perigeeParameters();
 		  
-		  //	      msg() << MSG::INFO << "pT " << jp->pT() << " eta " << jp->eta() << endmsg;
-		  
 
 		  double dphi = fabs(ip->parameters()[Trk::phi] - jp->parameters()[Trk::phi]);
 		  if(dphi>M_PI) dphi = 2*M_PI-dphi;
@@ -234,8 +218,6 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 		  double dR = sqrt(pow((ip->eta() - jp->eta()),2) + pow(dphi,2));
 		  m_dR.push_back(dR);
 		  
-		  //	      msg() << MSG::INFO << "DR Tracks " << dR << endmsg; 
-		  
 		  if ((fabs(jp->pT()) > m_pT_min_iso) && (dR > m_dR0_overlap) && (dR < m_dR0 ) ) {
 		    gotIsoTrack = false;	      
 		    continue;
@@ -260,10 +242,10 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 	    while (phiMIN < 0)      phiMIN += 2*M_PI;
 	    while (phiMAX > 2*M_PI) phiMAX -= 2*M_PI;
 	    
-	    TrigRoiDescriptor _roi( ip->eta(), etaMIN, etaMAX, ip->parameters()[Trk::phi], phiMIN, phiMAX );
+	    TrigRoiDescriptor roi( ip->eta(), etaMIN, etaMAX, ip->parameters()[Trk::phi], phiMIN, phiMAX );
 
 	    // now add ROBs
-	    HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, _roi, &m_dets, &m_nROBs);
+	    HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, roi, &m_dets, &m_nROBs);
 	    if (ec != HLT::OK) return ec;
 	    
 	    
@@ -274,7 +256,7 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
             if(m_trigResults.size()!=0)
                 pebInfo->addSubDetector(m_trigResults);
 
-	    if (!doNotPass){
+	    if (!m_doNotPass){
 	      //generate output here
 	      //addRoI(output);
               HLT::TriggerElement* te = addRoI(output);
@@ -286,8 +268,8 @@ HLT::ErrorCode TrigCheckForTracks::hltExecute(std::vector<std::vector<HLT::Trigg
 	}
     
       m_acceptedEvts++;
-      n_IsoTracks = count_IsoTracks ;  
-      msg() << MSG::DEBUG << "Found "<< n_IsoTracks <<" Isolated ("<< lookForAnyTracks  <<") Tracks" << endmsg;
+      m_n_IsoTracks = count_IsoTracks ;  
+      ATH_MSG_DEBUG( "Found "<< m_n_IsoTracks <<" Isolated ("<< m_lookForAnyTracks  <<") Tracks"  );
     }
     else {
       m_rejectedEvts++;
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h
index 698210574ce..3e15cf1273d 100644
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigCheckForTracks.h
@@ -60,7 +60,7 @@ ToolHandle<ITrigROBSelector> m_robSelector;
 
   // Switch on Monitoring:
 
-  int                           n_IsoTracks ;
+  int                           m_n_IsoTracks ;
   std::vector<double>           m_pT ;
   std::vector<double>           m_pT_Iso ;
   std::vector<double>           m_dR ;
@@ -80,9 +80,9 @@ ToolHandle<ITrigROBSelector> m_robSelector;
   double           m_etaLowEdge ;
   double           m_etaWidth ;
   double           m_phiWidth ;
-  std::string      tracksName ;
-  bool             doNotPass ;
-  bool             lookForAnyTracks ;
+  std::string      m_tracksName ;
+  bool             m_doNotPass ;
+  bool             m_lookForAnyTracks ;
 
   
   std::string m_pebLabel;
diff --git a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx
index 7d4fac88258..0fed097e8d7 100755
--- a/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx
+++ b/Trigger/TrigAlgorithms/TrigDetCalib/src/TrigROBListWriter.cxx
@@ -124,10 +124,10 @@ HLT::ErrorCode TrigROBListWriter::hltExecute(const HLT::TriggerElement* te_in,
   while (phiMin < 0)      phiMin += 2*M_PI;
   while (phiMax > 2*M_PI) phiMax -= 2*M_PI;  // AH HA!! This is wrong! Need in the range -pi .. pi
   
-  TrigRoiDescriptor _roi( roIDescriptor->eta(), etaMin, etaMax, roIDescriptor->phi(), phiMin, phiMax );
+  TrigRoiDescriptor roi( roIDescriptor->eta(), etaMin, etaMax, roIDescriptor->phi(), phiMin, phiMax );
 
   // now add ROBs
-  HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, _roi, &m_dets, &m_nROBs);
+  HLT::ErrorCode ec = m_robSelector->fillPEBInfo(*pebInfo, roi, &m_dets, &m_nROBs);
   if (ec != HLT::OK) return ec;
 
   // Add extra ROBs
-- 
GitLab