From a271d2a66e560da3b1c025fced5c119208c81902 Mon Sep 17 00:00:00 2001 From: Rosen Matev Date: Tue, 13 Oct 2020 23:13:10 +0200 Subject: [PATCH] Adapt to new Gaudi monitoring --- .../src/HighPtIsoLeptonAndTagPV.cpp | 2 +- Phys/JetAccessories/src/PFJetMakerAlg.cpp | 2 +- Phys/JetTagging/src/LoKiSeedFinderNTrks.cpp | 2 +- Phys/LoKiFitters/src/DistanceCalculator.cpp | 16 ++++++++-------- Phys/LoKiFitters/src/PVReFitter.cpp | 14 +++++++------- Phys/LoKiJets/src/LoKiFastJetMaker.cpp | 4 ++-- Phys/LoKiJets/src/LoKiFastJetWithAreaMaker.cpp | 2 +- Phys/LoKiJets/src/LoKiJetMakerAlg.cpp | 2 +- Phys/LoKiJets/src/LoKiJetMakerWR2VtxAlg.cpp | 2 +- Phys/LoKiJets/src/LoKiJets2JetsAlg.cpp | 2 +- Phys/LoKiJets/src/LoKiSeedConeJetMaker.cpp | 2 +- Phys/LoKiJets/src/LoKiSeedFinder.cpp | 2 +- Phys/LoKiJets/src/LoKiVVSeedFinder.cpp | 2 +- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Phys/JetAccessories/src/HighPtIsoLeptonAndTagPV.cpp b/Phys/JetAccessories/src/HighPtIsoLeptonAndTagPV.cpp index c411a5103..84b1c3ec7 100644 --- a/Phys/JetAccessories/src/HighPtIsoLeptonAndTagPV.cpp +++ b/Phys/JetAccessories/src/HighPtIsoLeptonAndTagPV.cpp @@ -293,7 +293,7 @@ StatusCode HighPtIsoLeptonAndTagPV::execute() { } // end of p } - if ( statPrint() || msgLevel( MSG::DEBUG ) ) { counter( "#Plepton" ) += MyLeptons.size(); } + if ( msgLevel( MSG::DEBUG ) ) { counter( "#Plepton" ) += MyLeptons.size(); } //----------------------------------------// setFilterPassed( true ); diff --git a/Phys/JetAccessories/src/PFJetMakerAlg.cpp b/Phys/JetAccessories/src/PFJetMakerAlg.cpp index 9ea8fc55c..f968d8443 100644 --- a/Phys/JetAccessories/src/PFJetMakerAlg.cpp +++ b/Phys/JetAccessories/src/PFJetMakerAlg.cpp @@ -526,7 +526,7 @@ StatusCode LoKi::PFJetMaker::analyse() { delete jet; } } - if ( statPrint() || msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += selected( "jets" ).size(); } + if ( msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += selected( "jets" ).size(); } setFilterPassed( true ); return StatusCode::SUCCESS; diff --git a/Phys/JetTagging/src/LoKiSeedFinderNTrks.cpp b/Phys/JetTagging/src/LoKiSeedFinderNTrks.cpp index 5fb016744..d0f99356f 100644 --- a/Phys/JetTagging/src/LoKiSeedFinderNTrks.cpp +++ b/Phys/JetTagging/src/LoKiSeedFinderNTrks.cpp @@ -315,7 +315,7 @@ StatusCode LoKi::SeedFinderNTrks::makeJets( const IJetMaker::Input& input_, cons debug() << " |COMB: " << combo1 << endmsg; } - if ( statPrint() || msgLevel( MSG::DEBUG ) ) { counter( "#seeds" ) += SeedsPurged.size(); } + if ( msgLevel( MSG::DEBUG ) ) { counter( "#seeds" ) += SeedsPurged.size(); } jets_ = SeedsPurged; diff --git a/Phys/LoKiFitters/src/DistanceCalculator.cpp b/Phys/LoKiFitters/src/DistanceCalculator.cpp index 134ece66f..c46fa7b16 100644 --- a/Phys/LoKiFitters/src/DistanceCalculator.cpp +++ b/Phys/LoKiFitters/src/DistanceCalculator.cpp @@ -108,14 +108,14 @@ StatusCode LoKi::DistanceCalculator::_distance( const LHCb::Particle& particle, case LoKi::KalmanFilter::MergedPi0LikeParticle: { impact = Gaudi::XYZVector(); if ( 0 != chi2 ) { *chi2 = 0; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "IP->(DI)GAMMA" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "IP->(DI)GAMMA" ); } return StatusCode::SUCCESS; // RETURN } case LoKi::KalmanFilter::ShortLivedParticle: { if ( allow ) { const LHCb::VertexBase* v1 = particle.endVertex(); if ( 0 == v1 ) { break; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "IP->VD" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "IP->VD" ); } // make the real calculations double dist = 0; StatusCode sc = i_distance( *v1, vertex, dist, chi2 ); // RETURN @@ -227,14 +227,14 @@ StatusCode LoKi::DistanceCalculator::_distance( const LHCb::Particle& particle, case LoKi::KalmanFilter::MergedPi0LikeParticle: { impact = Gaudi::XYZVector(); if ( 0 != chi2 ) { *chi2 = 0; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "IP->(DI)GAMMA" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "IP->(DI)GAMMA" ); } return StatusCode::SUCCESS; // RETURN } case LoKi::KalmanFilter::ShortLivedParticle: { if ( allow ) { const LHCb::VertexBase* v1 = particle.endVertex(); if ( 0 == v1 ) { break; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "IP->VD" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "IP->VD" ); } // make the real calculations double dist = 0; StatusCode sc = i_distance( *v1, point, dist, chi2 ); @@ -342,14 +342,14 @@ StatusCode LoKi::DistanceCalculator::_distance( const LHCb::Particle& p1, const case LoKi::KalmanFilter::MergedPi0LikeParticle: { dist = 0; if ( 0 != chi2 ) { *chi2 = 0; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "DOCA->(DI)GAMMA" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "DOCA->(DI)GAMMA" ); } return StatusCode::SUCCESS; // RETURN } case LoKi::KalmanFilter::ShortLivedParticle: { if ( allow ) { const LHCb::VertexBase* v1 = p1.endVertex(); if ( 0 == v1 ) { break; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "DOCA->IP" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "DOCA->IP" ); } // make the proper evaluations Gaudi::XYZVector impact; StatusCode sc = _distance( p2, *v1, impact, allow, chi2 ); @@ -368,14 +368,14 @@ StatusCode LoKi::DistanceCalculator::_distance( const LHCb::Particle& p1, const case LoKi::KalmanFilter::MergedPi0LikeParticle: { dist = 0; if ( 0 != chi2 ) { *chi2 = 0; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "DOCA->(DI)GAMMA" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "DOCA->(DI)GAMMA" ); } return StatusCode::SUCCESS; // RETURN } case LoKi::KalmanFilter::ShortLivedParticle: { if ( allow ) { const LHCb::VertexBase* v2 = p2.endVertex(); if ( 0 == v2 ) { break; } - if ( printStat() && msgLevel( MSG::INFO ) ) { ++counter( "DOCA->IP" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "DOCA->IP" ); } // make the proper evaluations Gaudi::XYZVector impact; StatusCode sc = _distance( p1, *v2, impact, allow, chi2 ); diff --git a/Phys/LoKiFitters/src/PVReFitter.cpp b/Phys/LoKiFitters/src/PVReFitter.cpp index e4403b05b..88f3826fe 100644 --- a/Phys/LoKiFitters/src/PVReFitter.cpp +++ b/Phys/LoKiFitters/src/PVReFitter.cpp @@ -467,7 +467,7 @@ StatusCode LoKi::PVReFitter::_remove_( const LHCb::Track::ConstVector& tracks, L } // // some statistics - if ( statPrint() || msgLevel( MSG::INFO ) ) { counter( "#removed" ) += removed.size(); } + if ( msgLevel( MSG::INFO ) ) { counter( "#removed" ) += removed.size(); } // // - nothing to be removed if ( removed.empty() ) { return StatusCode::SUCCESS; } // RETURN @@ -489,7 +489,7 @@ StatusCode LoKi::PVReFitter::_remove_( const LHCb::Track::ConstVector& tracks, L pv.removeFromTracks( *it ); } // 2) refit vertex - if ( statPrint() || msgLevel( MSG::INFO ) ) { ++counter( "#refit-asked" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "#refit-asked" ); } // Check that there are actually enough tracks in the PV now to refit. if ( removed.size() + m_minTracksInPV > nTracks ) return _Warning( "Less than " + m_minTS + " tracks in vertex remain", StatusCode::FAILURE, 1 ); @@ -521,7 +521,7 @@ StatusCode LoKi::PVReFitter::_remove_( const LHCb::Track::ConstVector& tracks, L } // // some statistics - if ( statPrint() || msgLevel( MSG::INFO ) ) { + if ( msgLevel( MSG::INFO ) ) { counter( "#toremove" ) += removed.size(); counter( "#loaded" ) += m_entries.size(); } @@ -550,7 +550,7 @@ StatusCode LoKi::PVReFitter::_remove_( const LHCb::Track::ConstVector& tracks, L const Gaudi::XYZPoint newpos( last.m_x[0], last.m_x[1], last.m_x[2] ); const Gaudi::XYZPoint& oldpos = pv.position(); // - if ( statPrint() || msgLevel( MSG::INFO ) ) { counter( "#delta-R" ) += ( newpos.Z() - oldpos.Z() ); } + if ( msgLevel( MSG::INFO ) ) { counter( "#delta-R" ) += ( newpos.Z() - oldpos.Z() ); } // // 4) update vertex parameters // set the Chi^2 and the DoF of the vertex (fit) @@ -562,7 +562,7 @@ StatusCode LoKi::PVReFitter::_remove_( const LHCb::Track::ConstVector& tracks, L pv.setCovMatrix( last.m_c ); // refit it ? if ( m_reFit || 10 > nTracksNew ) { - if ( statPrint() || msgLevel( MSG::INFO ) ) { ++counter( "#refit-forced" ); } + if ( msgLevel( MSG::INFO ) ) { ++counter( "#refit-forced" ); } if ( m_minTracksInPV > pv.tracks().size() ) return _Warning( "Less than " + m_minTS + " tracks in vertex remain", StatusCode::FAILURE, 1 ); return _reFit_( pv ); @@ -706,10 +706,10 @@ StatusCode LoKi::PVReFitter::_reFit_( LHCb::RecVertex& pv ) const { const LHCb::Track* track = ie->m_track; if ( NULL == track ) { continue; } pv.addToTracks( track, ie->m_weight ); - if ( statPrint() || msgLevel( MSG::INFO ) ) { counter( "track-weight" ) += ie->m_weight; } + if ( msgLevel( MSG::INFO ) ) { counter( "track-weight" ) += ie->m_weight; } } // - if ( statPrint() || msgLevel( MSG::INFO ) ) { + if ( msgLevel( MSG::INFO ) ) { counter( "#iterations" ) += ( iIter + 1 ); // total number of tracks counter( "#tracks/total" ) += pv.tracks().size(); diff --git a/Phys/LoKiJets/src/LoKiFastJetMaker.cpp b/Phys/LoKiJets/src/LoKiFastJetMaker.cpp index 7fd9b6901..5b575ac60 100644 --- a/Phys/LoKiJets/src/LoKiFastJetMaker.cpp +++ b/Phys/LoKiJets/src/LoKiFastJetMaker.cpp @@ -115,7 +115,7 @@ StatusCode LoKi::FastJetMaker::makeJets( const IJetMaker::Input& input_, IJetMak IJetMaker::Jets output; output.reserve( 0 ); jets_ = output; - if ( statPrint() || msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += output.size(); } + if ( msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += output.size(); } return StatusCode::SUCCESS; } // Jets found @@ -190,7 +190,7 @@ StatusCode LoKi::FastJetMaker::makeJets( const IJetMaker::Input& input_, IJetMak output.push_back( pJet.clone() ); } - if ( statPrint() || msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += output.size(); } + if ( msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += output.size(); } jets_ = output; diff --git a/Phys/LoKiJets/src/LoKiFastJetWithAreaMaker.cpp b/Phys/LoKiJets/src/LoKiFastJetWithAreaMaker.cpp index 11f54dda9..efbedca73 100644 --- a/Phys/LoKiJets/src/LoKiFastJetWithAreaMaker.cpp +++ b/Phys/LoKiJets/src/LoKiFastJetWithAreaMaker.cpp @@ -310,7 +310,7 @@ StatusCode LoKi::FastJetWithAreaMaker::makeJets( const IJetMaker::Input& input_, output.push_back( pJet.clone() ); } - if ( statPrint() || msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += output.size(); } + if ( msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += output.size(); } jets_ = output; diff --git a/Phys/LoKiJets/src/LoKiJetMakerAlg.cpp b/Phys/LoKiJets/src/LoKiJetMakerAlg.cpp index 6a05e04ce..b6852c04e 100644 --- a/Phys/LoKiJets/src/LoKiJetMakerAlg.cpp +++ b/Phys/LoKiJets/src/LoKiJetMakerAlg.cpp @@ -272,7 +272,7 @@ StatusCode LoKi::JetMaker::analyse() { } } - if ( statPrint() || msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += selected( "jets" ).size(); } + if ( msgLevel( MSG::DEBUG ) ) { counter( "#jets" ) += selected( "jets" ).size(); } setFilterPassed( true ); return StatusCode::SUCCESS; diff --git a/Phys/LoKiJets/src/LoKiJetMakerWR2VtxAlg.cpp b/Phys/LoKiJets/src/LoKiJetMakerWR2VtxAlg.cpp index 5b2bd3a41..dd0d185f1 100644 --- a/Phys/LoKiJets/src/LoKiJetMakerWR2VtxAlg.cpp +++ b/Phys/LoKiJets/src/LoKiJetMakerWR2VtxAlg.cpp @@ -186,7 +186,7 @@ StatusCode LoKi::JetMakerWR2Vtx::analyse() { // if(kk > 1) std::cout<<"evt :"<relations().size(); // make a statistics - if ( printStat() || msgLevel( MSG::VERBOSE ) ) { counter( "# " + m_jetALocation + "->" + m_jetBLocation ) += links; } + if ( msgLevel( MSG::VERBOSE ) ) { counter( "# " + m_jetALocation + "->" + m_jetBLocation ) += links; } // if ( table->relations().empty() ) { Warning( "The relation table is empty!" ).ignore(); diff --git a/Phys/LoKiJets/src/LoKiSeedConeJetMaker.cpp b/Phys/LoKiJets/src/LoKiSeedConeJetMaker.cpp index 5bfc00823..08c8f8478 100644 --- a/Phys/LoKiJets/src/LoKiSeedConeJetMaker.cpp +++ b/Phys/LoKiJets/src/LoKiSeedConeJetMaker.cpp @@ -129,7 +129,7 @@ StatusCode LoKi::SeedConeJetMaker::makeJets( const IJetMaker::Input& input_, con } } - if ( statPrint() || msgLevel( MSG::INFO ) ) { counter( "#jets" ) += outputP.size(); } + if ( msgLevel( MSG::INFO ) ) { counter( "#jets" ) += outputP.size(); } jets_ = outputP; diff --git a/Phys/LoKiJets/src/LoKiSeedFinder.cpp b/Phys/LoKiJets/src/LoKiSeedFinder.cpp index 6ae7b4b61..bb755c949 100644 --- a/Phys/LoKiJets/src/LoKiSeedFinder.cpp +++ b/Phys/LoKiJets/src/LoKiSeedFinder.cpp @@ -637,7 +637,7 @@ StatusCode LoKi::SeedFinder::makeJets( const IJetMaker::Input& input_, const LHC if ( msgLevel( MSG::DEBUG ) ) debug() << " |COMB: " << combo1 << endmsg; } - if ( statPrint() || msgLevel( MSG::INFO ) ) { counter( "#seeds" ) += SeedsPurged.size(); } + if ( msgLevel( MSG::INFO ) ) { counter( "#seeds" ) += SeedsPurged.size(); } jets_ = SeedsPurged; diff --git a/Phys/LoKiJets/src/LoKiVVSeedFinder.cpp b/Phys/LoKiJets/src/LoKiVVSeedFinder.cpp index b1927dbe5..e0c60875d 100644 --- a/Phys/LoKiJets/src/LoKiVVSeedFinder.cpp +++ b/Phys/LoKiJets/src/LoKiVVSeedFinder.cpp @@ -548,7 +548,7 @@ StatusCode LoKi::VVSeedFinder::makeJets( const IJetMaker::Input& input_, const L //============================================================================= MergeProtoJets = FilterProtoJets( m_DeltaRSeeds, ProtoJets ); - if ( statPrint() || msgLevel( MSG::INFO ) ) { counter( "#seeds" ) += Seeds.size(); } + if ( msgLevel( MSG::INFO ) ) { counter( "#seeds" ) += Seeds.size(); } jets_ = MergeProtoJets; -- GitLab