From 4a00518fe87d37dd08ae14128334179b81da45e8 Mon Sep 17 00:00:00 2001
From: Marco Cattaneo <marco.cattaneo@cern.ch>
Date: Wed, 18 Oct 2017 13:44:45 +0200
Subject: [PATCH] Fix untested StatusCodes

---
 Phys/KaliCalo/src/Cloner.cpp    | 15 +++------------
 Phys/KaliCalo/src/DataMove.cpp  |  9 ++-------
 Phys/KaliCalo/src/Destroyer.cpp | 16 +++++-----------
 Phys/KaliCalo/src/Pi0.cpp       | 19 +++++++------------
 4 files changed, 17 insertions(+), 42 deletions(-)

diff --git a/Phys/KaliCalo/src/Cloner.cpp b/Phys/KaliCalo/src/Cloner.cpp
index 8066dc884..68b681bec 100644
--- a/Phys/KaliCalo/src/Cloner.cpp
+++ b/Phys/KaliCalo/src/Cloner.cpp
@@ -1,4 +1,3 @@
-// $Id: $
 // ============================================================================
 // Include files 
 // ============================================================================
@@ -12,10 +11,6 @@
  *  @see Kali::Destroyer 
  *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
  *  @date 2011-07-31
- *
- *                    $Revision$
- *  Last modification $Date$
- *                 by $Author$
  */
 // ============================================================================
 namespace Kali 
@@ -24,11 +19,7 @@ namespace Kali
   /** @class cloner 
    *
    *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
- *  @date 2011-07-31
-   *  
-   *                    $Revision$
-   *  Last modification $Date$
-   *                 by $Author$
+   *  @date 2011-07-31
    */
   class Cloner : public Kali::Destroyer 
   {
@@ -81,7 +72,7 @@ StatusCode Kali::Cloner::execute ()
   StatusCode sc = collect ( digits , tracks ) ;
   if ( sc.isFailure() ) 
   {
-    Warning ("Error from collect", sc ) ;
+    Warning ("Error from collect", sc ).ignore() ;
     setFilterPassed ( false ) ;
     return StatusCode::SUCCESS ;
   }
@@ -92,7 +83,7 @@ StatusCode Kali::Cloner::execute ()
   sc = copy ( digits , tracks ) ;
   if ( sc.isFailure() ) 
   {
-    Warning ("Error from destroy", sc ) ;
+    Warning ("Error from destroy", sc ).ignore() ;
     setFilterPassed ( false ) ;
     return StatusCode::SUCCESS ;
   }
diff --git a/Phys/KaliCalo/src/DataMove.cpp b/Phys/KaliCalo/src/DataMove.cpp
index 4caac20ac..4f42dd36e 100644
--- a/Phys/KaliCalo/src/DataMove.cpp
+++ b/Phys/KaliCalo/src/DataMove.cpp
@@ -1,4 +1,3 @@
-// $Id: $
 // ============================================================================
 // Include files 
 // ============================================================================
@@ -30,10 +29,6 @@ namespace Kali
    *
    *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
    *  @date 2011-07-31
-   *  
-   *                    $Revision$
-   *  Last modification $Date$
-   *                 by $Author$
    */  
   class DataMove : public GaudiAlgorithm
   {
@@ -106,7 +101,7 @@ StatusCode Kali::DataMove::execute()
     //
     if ( !exist<DataObject>( loc ) ) 
     { 
-      Warning ( "Location does not exist: '" + loc + "'" , StatusCode::SUCCESS , 2 ) ;
+      Warning ( "Location does not exist: '" + loc + "'" , StatusCode::SUCCESS , 2 ).ignore() ;
       continue ;                                                 // CONTINUE 
     }
     //
@@ -115,7 +110,7 @@ StatusCode Kali::DataMove::execute()
     StatusCode sc = evtSvc()->unregisterObject ( obj ) ;
     if ( sc.isFailure() ) 
     {
-      Error ( "Unable unregister '" + loc + "'" , sc ) ;
+      Error ( "Unable unregister '" + loc + "'" , sc ).ignore() ;
       continue ;                                              // CONTINUE 
     }
     // register it at "standard" location 
diff --git a/Phys/KaliCalo/src/Destroyer.cpp b/Phys/KaliCalo/src/Destroyer.cpp
index 64e757507..877cd68d5 100644
--- a/Phys/KaliCalo/src/Destroyer.cpp
+++ b/Phys/KaliCalo/src/Destroyer.cpp
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 // Include files 
 // ============================================================================
@@ -27,11 +26,6 @@
  *
  *  @see Kali::Destroyer 
  *  @author Vanya BELYAEV Ivan.Belyaev@cern.ch
- *  @date xxxx-xx-xx
- *
- *                    $Revision$
- *  Last modification $Date$
- *                 by $Author$
  */
 // ============================================================================
 // Update handler for the property
@@ -41,9 +35,9 @@ void Kali::Destroyer::updateDestroy ( Property& /* p */ )
   if ( FSMState() < Gaudi::StateMachine::INITIALIZED ) { return ; }   // RETURN 
   // 
   if ( m_destroy )
-  { Warning ( "TES containers will be destroyed!" , StatusCode::SUCCESS ) ; }
+  { Warning ( "TES containers will be destroyed!" , StatusCode::SUCCESS ).ignore() ; }
   else 
-  { Warning ( "TES containers will be preserved!" , StatusCode::SUCCESS ) ; }
+  { Warning ( "TES containers will be preserved!" , StatusCode::SUCCESS ).ignore() ; }
   //
 }
 // ============================================================================
@@ -104,7 +98,7 @@ StatusCode Kali::Destroyer::collect
       particles.insert ( particles.end() , p.begin() , p.end() ) ;
     }
     else { Warning ( "Invalid Location for Particles: " + (*iparticle) , 
-                     StatusCode::SUCCESS ) ; }
+                     StatusCode::SUCCESS ).ignore() ; }
   }
   
   // ==========================================================================
@@ -470,7 +464,7 @@ StatusCode Kali::Destroyer::execute ()
   StatusCode sc = collect ( digits , tracks ) ;
   if ( sc.isFailure() ) 
   {
-    Warning ("Error from collect", sc ) ;
+    Warning ("Error from collect", sc ).ignore() ;
     setFilterPassed ( false ) ;
     return StatusCode::SUCCESS ;
   }
@@ -481,7 +475,7 @@ StatusCode Kali::Destroyer::execute ()
   sc = destroy ( digits , tracks ) ;
   if ( sc.isFailure() ) 
   {
-    Warning ("Error from destroy", sc ) ;
+    Warning ("Error from destroy", sc ).ignore() ;
     setFilterPassed ( false ) ;
     return StatusCode::SUCCESS ;
   }
diff --git a/Phys/KaliCalo/src/Pi0.cpp b/Phys/KaliCalo/src/Pi0.cpp
index db18f505a..84a84e341 100755
--- a/Phys/KaliCalo/src/Pi0.cpp
+++ b/Phys/KaliCalo/src/Pi0.cpp
@@ -1,4 +1,3 @@
-// $Id$
 // ============================================================================
 // Include files
 // ============================================================================
@@ -58,10 +57,6 @@ namespace Kali
    *
    *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
    *  @date 2009-09-28
-   *
-   *                    $Revision$
-   *  Last modification $Date$
-   *                 by $Author$
    */
   class Pi0 : public LoKi::Algo
   {
@@ -245,9 +240,9 @@ void Kali::Pi0::mirrorHandler ( Property& /* p */ )
   if ( Gaudi::StateMachine::INITIALIZED > FSMState() ) { return ; }
   //
   if ( m_mirror )
-  { Warning ( "Albert's trick for background evaluation is   activated!", StatusCode::SUCCESS ) ; }
+  { Warning ( "Albert's trick for background evaluation is   activated!", StatusCode::SUCCESS ).ignore() ; }
   else
-  { Warning ( "Albert's trick for background evaluation is deactivated!", StatusCode::SUCCESS ) ; }
+  { Warning ( "Albert's trick for background evaluation is deactivated!", StatusCode::SUCCESS ).ignore() ; }
   //
 }
 // ============================================================================
@@ -281,7 +276,7 @@ void Kali::Pi0::setupHistos ()
 
   if ( produceHistos() )
   {
-    Warning ( "Monitoring histograms are   activated" , StatusCode::SUCCESS ) ;
+    Warning ( "Monitoring histograms are   activated" , StatusCode::SUCCESS ).ignore() ;
     if ( 0 == m_h1 ) { m_h1 = book ( "mpi0"               , 0 , 250 * MeV , 250 ) ; }
     if ( 0 == m_h2 ) { m_h2 = book ( "mpi0-Prs_ll_10_MeV" , 0 , 250 * MeV , 250 ) ; }
     if ( 0 == m_h3 ) { m_h3 = book ( "mpi0-Prs_lg_10_MeV" , 0 , 250 * MeV , 250 ) ; }
@@ -289,7 +284,7 @@ void Kali::Pi0::setupHistos ()
   }
   else
   {
-    Warning ( "Monitoring histograms are deactivated!", StatusCode::SUCCESS ) ;
+    Warning ( "Monitoring histograms are deactivated!", StatusCode::SUCCESS ).ignore() ;
     m_h1 = 0 ;
     m_h2 = 0 ;
     m_h3 = 0 ;
@@ -427,12 +422,12 @@ StatusCode Kali::Pi0::initialize  ()                // the proper initialzation
   if ( sc.isFailure() ) { return sc ; }
   //
   if ( m_mirror )
-  { Warning ( "Albert's trick         is   activated!", StatusCode::SUCCESS ) ; }
+  { Warning ( "Albert's trick         is   activated!", StatusCode::SUCCESS ).ignore() ; }
   else
-  { Warning ( "Albert's trick         is deactivated!", StatusCode::SUCCESS ) ; }
+  { Warning ( "Albert's trick         is deactivated!", StatusCode::SUCCESS ).ignore() ; }
   //
   if ( 0 < m_veto_dm || 0 < m_veto_chi2 )
-  { Warning ( "Pi0-Veto               is   activated!", StatusCode::SUCCESS ) ; }
+  { Warning ( "Pi0-Veto               is   activated!", StatusCode::SUCCESS ).ignore() ; }
   //
   setupHistos() ;
   //
-- 
GitLab