From ff1006e4d44e32f79f70999ac3bda7bb028ef2cf Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Mon, 4 Jan 2021 16:52:28 +0100
Subject: [PATCH] DerivationFrameworkBPhys: Fix clang warnings.

 - Unused private data member.
 - Misleading operation ordering in conditional.
 - Bugfix: misplaced parenthesis in abs() call.
---
 .../DerivationFrameworkBPhys/BPhysPVCascadeTools.h            | 3 +--
 .../DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx     | 4 ++--
 .../DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx        | 4 ++--
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h
index c1561102db76..cc0eb8c7726d 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/DerivationFrameworkBPhys/BPhysPVCascadeTools.h
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 #ifndef DERIVATIONFRAMEWORK_PVCASCADETOOLS_H
@@ -38,7 +38,6 @@ namespace DerivationFramework {
   typedef ElementLink<xAOD::VertexContainer> VertexLink;
   typedef std::vector<VertexLink> VertexLinkVector;
   private:
-       const Trk::V0Tools *m_v0Tools;
        const CascadeTools *m_cascadeTools;
        const InDet::BeamSpotData *m_beamSpotData;
 
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx
index 2f2cef79bfca..8ea8e0d31a44 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/BPhysVertexTrackBase.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 
 //============================================================================
@@ -362,7 +362,7 @@ namespace DerivationFramework {
     std::istringstream stream(lines);
     std::string line;
     while ( std::getline(stream, line) ) {
-      if ( !ostr.length() == 0 ) ostr += "\n";
+      if ( !ostr.empty() ) ostr += "\n";
       ostr += prefix + line;
     }
     return ostr;
diff --git a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx
index f7d485b75f79..78027a049682 100644
--- a/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx
+++ b/PhysicsAnalysis/DerivationFramework/DerivationFrameworkBPhys/src/JpsiPlusDsCascade.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
 */
 /////////////////////////////////////////////////////////////////
 // JpsiPlusDsCascade.cxx, (c) ATLAS Detector software
@@ -537,7 +537,7 @@ namespace DerivationFramework {
                }
            }
 
-           if(abs(m_Dx_pid==411)) { // D+/-
+           if(abs(m_Dx_pid)==411) { // D+/-
                SG::AuxElement::Accessor<Char_t> flagAcc1("passed_Dp");
                SG::AuxElement::Accessor<Char_t> flagAcc2("passed_Dm");
                bool isDp(true);
-- 
GitLab