diff --git a/Calo/CaloMoniDst/src/CaloPi0Ntp.cpp b/Calo/CaloMoniDst/src/CaloPi0Ntp.cpp
index 787307ab45bf25550a5aa33dd177d39c974cc308..2a67558ffeef97798a024790125c31e1587ea51f 100755
--- a/Calo/CaloMoniDst/src/CaloPi0Ntp.cpp
+++ b/Calo/CaloMoniDst/src/CaloPi0Ntp.cpp
@@ -280,8 +280,7 @@ StatusCode CaloPi0Ntp::execute(){
           sc=ntp->column("Nvertices", nVert);
           // #SpdMult
           sc=ntp->column("spdMult", m_spdMult);
-          sc=ntp->write();
-          ok = true;
+          ok = ntp->write().isSuccess();
         }
         if( !isPi0) continue;
         // histograms for tuning
diff --git a/Calo/CaloReco/src/CaloExtraDigits.cpp b/Calo/CaloReco/src/CaloExtraDigits.cpp
index 98305da1107d9745d4d08354325e316a9370748f..bf849d17e867d151b3a5f119e8716ef9b4fd0282 100644
--- a/Calo/CaloReco/src/CaloExtraDigits.cpp
+++ b/Calo/CaloReco/src/CaloExtraDigits.cpp
@@ -11,7 +11,7 @@
 // ============================================================================
 // Include files
 // ============================================================================
-// STL 
+// STL
 // ============================================================================
 #include <cmath>
 #include <algorithm>
@@ -25,12 +25,12 @@
 #include "CaloExtraDigits.h"
 // ============================================================================
 /** @file CaloExtraDigits.cpp
- * 
+ *
  *  Implementation file for class : CaloExtraDigits
- *  @see CaloExtraDigits 
- *  
+ *  @see CaloExtraDigits
+ *
  *  @author Vanya Belyaev Ivan.Belyaev@itep.ru
- *  @date 01/04/2002 
+ *  @date 01/04/2002
  */
 // ============================================================================
 DECLARE_COMPONENT( CaloExtraDigits )
@@ -39,38 +39,38 @@ CaloExtraDigits::CaloExtraDigits
 ( const std::string&  type   ,
   const std::string&  name   ,
   const IInterface*   parent )
-  : GaudiTool            ( type, name , parent ) 
+  : GaudiTool            ( type, name , parent )
 {
   //
   declareInterface<ICaloHypoTool>     (this);
   //
   if ( std::string::npos != name.find ( "Prs"  ) )
   { m_toDet.value().push_back ( "Prs"  ) ; }
-  if ( std::string::npos != name.find ( "Spd"  ) ) 
+  if ( std::string::npos != name.find ( "Spd"  ) )
   { m_toDet.value().push_back ( "Spd"  ) ; }
-  if ( std::string::npos != name.find ( "Hcal" ) ) 
+  if ( std::string::npos != name.find ( "Hcal" ) )
   { m_toDet.value().push_back ( "Hcal" ) ; }
-  if ( std::string::npos != name.find ( "Ecal" ) ) 
-  { m_toDet.value().push_back ( "Ecal" ) ; }  
+  if ( std::string::npos != name.find ( "Ecal" ) )
+  { m_toDet.value().push_back ( "Ecal" ) ; }
 }
 // ============================================================================
-StatusCode CaloExtraDigits::initialize () 
+StatusCode CaloExtraDigits::initialize ()
 {
-  // initilaize the base class 
+  // initilaize the base class
   StatusCode sc = GaudiTool::initialize ();
-  if( sc.isFailure() ) 
-  { return Error ( "Could not initialize the base class GaudiTool!", sc ) ; }  
+  if( sc.isFailure() )
+  { return Error ( "Could not initialize the base class GaudiTool!", sc ) ; }
   //
-  if ( m_toDet.empty() ) 
-  { return Error ( "List of 'ExtraDigitsFrom' is empty!" ) ; }  
+  if ( m_toDet.empty() )
+  { return Error ( "List of 'ExtraDigitsFrom' is empty!" ) ; }
   //
-  for ( std::vector<std::string>::iterator idet = m_toDet.begin(); 
+  for ( std::vector<std::string>::iterator idet = m_toDet.begin();
         idet!=m_toDet.end();idet++)
   {
     m_toCalo[*idet]=tool<ICaloHypo2Calo>("CaloHypo2Calo", "CaloHypo2" + *idet , this );
     m_toCalo[*idet]->setCalos(m_det,*idet);
   }
-  // 
+  //
   counterStat = tool<ICounterLevel>("CounterLevel");
   return StatusCode::SUCCESS ;
 }
@@ -79,26 +79,26 @@ StatusCode CaloExtraDigits::process    ( LHCb::CaloHypo* hypo  ) const
 { return (*this) ( hypo ); }
 // ============================================================================
 StatusCode CaloExtraDigits::operator() ( LHCb::CaloHypo* hypo  ) const
-{  
-  if ( 0 == hypo        ) { return Error("CaloHypo* points to NULL!" , 200 ) ; }
+{
+  if ( 0 == hypo        ) { return Error("CaloHypo* points to NULL!" , StatusCode{200} ) ; }
   //
-  for ( std::map<std::string,ICaloHypo2Calo*>::const_iterator 
+  for ( std::map<std::string,ICaloHypo2Calo*>::const_iterator
           idet = m_toCalo.begin(); idet!=m_toCalo.end();idet++)
   {
     ICaloHypo2Calo*    tool   = idet->second ;
     const std::string& toCalo = idet->first  ;
     unsigned int count = 0 ;
     const std::vector<LHCb::CaloDigit*>& digits = tool->digits ( *hypo, toCalo );
-    for ( std::vector<LHCb::CaloDigit*>::const_iterator id = digits.begin() ; 
+    for ( std::vector<LHCb::CaloDigit*>::const_iterator id = digits.begin() ;
           id != digits.end(); id++)
     {
       hypo->addToDigits( *id );
       ++count;
     }
     //
-    if (UNLIKELY( msgLevel(MSG::DEBUG) ) )debug() << "Adding " << count << " digits from "<< *idet << endmsg; 
+    if (UNLIKELY( msgLevel(MSG::DEBUG) ) )debug() << "Adding " << count << " digits from "<< *idet << endmsg;
     //
     if(counterStat->isVerbose() )counter ( toCalo ) += count ;
   }
-  return StatusCode::SUCCESS ;  
+  return StatusCode::SUCCESS ;
 }
diff --git a/Calo/CaloReco/src/CaloShowerOverlap.cpp b/Calo/CaloReco/src/CaloShowerOverlap.cpp
index 1804b8f077c14100508a3e9a5cf990418c28ce70..8529eb123d529f5d88607e4c8ddd8932f283d226 100644
--- a/Calo/CaloReco/src/CaloShowerOverlap.cpp
+++ b/Calo/CaloReco/src/CaloShowerOverlap.cpp
@@ -8,9 +8,8 @@
 * granted to it by virtue of its status as an Intergovernmental Organization  *
 * or submit itself to any jurisdiction.                                       *
 \*****************************************************************************/
-// Include files 
-
- // from Gaudi
+// Include files
+// from Gaudi
 #include "CaloUtils/CaloAlgUtils.h"
 // local
 #include "CaloShowerOverlap.h"
@@ -44,7 +43,7 @@ StatusCode CaloShowerOverlap::initialize() {
   if ( sc.isFailure() ) return sc;  // error printed already by GaudiAlgorithm
 
   if ( msgLevel(MSG::DEBUG) ) debug() << "==> Initialize" << endmsg;
-  
+
   m_oTool   = tool<ICaloShowerOverlapTool>("CaloShowerOverlapTool","PhotonShowerOverlap",this);
   m_tagger  = tool<SubClusterSelectorTool>( "SubClusterSelectorTool" , "EcalClusterTag" , this );
 
@@ -69,15 +68,15 @@ StatusCode CaloShowerOverlap::execute() {
   for( LHCb::CaloClusters::iterator i1 = clusters->begin() ; clusters->end() != i1 ; ++i1 ){
     double et1 = eT( *i1 );
     if( et1 < m_etMin )continue; // neglect overlap from/to low ET clusters
-    const LHCb::CaloCellID id1=(*i1)->seed();     
+    const LHCb::CaloCellID id1=(*i1)->seed();
     const LHCb::CaloDigit* spd1 = (spds == NULL) ? NULL : spds->object( (*i1)->seed() );
     for( LHCb::CaloClusters::iterator i2 = i1+1 ; clusters->end() != i2 ; ++i2 ){
       double et2=eT( *i2 );
       if(  et2 < m_etMin )continue; // neglect overlap from/to low ET clusters
       if(  et1 < m_etMin2 && et2 < m_etMin2 )continue; // require at least one cluster above threshold (speed-up)
-      const LHCb::CaloCellID id2=(*i2)->seed();    
+      const LHCb::CaloCellID id2=(*i2)->seed();
       if( id1.area() != id2.area() ) continue;
-      if( abs( int(id1.col()) - int(id2.col()) ) > m_dMin || abs( int(id1.row()) - int(id2.row()) ) > m_dMin )continue; 
+      if( abs( int(id1.col()) - int(id2.col()) ) > m_dMin || abs( int(id1.row()) - int(id2.row()) ) > m_dMin )continue;
       const LHCb::CaloDigit* spd2 = (spds == NULL) ? NULL : spds->object( (*i2)->seed() );
       int  s1= (spd1 == NULL) ? 0 : int(spd1->e() > 0.) ;
       int  s2= (spd2 == NULL) ? 0 : int(spd2->e() > 0.) ;
@@ -91,13 +90,13 @@ StatusCode CaloShowerOverlap::execute() {
           if( e1->digit()->cellID() == e2->digit()->cellID() ){
             const auto totE = ( cl1->e() + cl2->e() );
             e1->setFraction( cl1->e() / totE );
-            e2->setFraction( cl2->e() / totE );            
-          }    
+            e2->setFraction( cl2->e() / totE );
+          }
         }
       }
       // tag the cluster position to have correct corrections
-      const StatusCode sc = ( m_tagger->tagPosition(  cl1  ) &&
-                              m_tagger->tagPosition(  cl2  ) );
+      const StatusCode sc = StatusCode{ m_tagger->tagPosition(  cl1  ) &&
+                                        m_tagger->tagPosition(  cl2  ) };
       if( sc.isFailure() )Warning("Cluster tagging failed - keep the initial 3x3 tagging").ignore();
       // correct entry weight for shower overlap (assuming EM cluster)
       m_oTool->process(*i1,*i2, s1*10+s2, m_iter);
diff --git a/Muon/MuonID/src/component/CLTool.cpp b/Muon/MuonID/src/component/CLTool.cpp
index 5e379e8c989c1d68b5225fa6ae32be291ddb7dd6..9d7fa9b6101cf9e164a9c602d89544100caabbe3 100644
--- a/Muon/MuonID/src/component/CLTool.cpp
+++ b/Muon/MuonID/src/component/CLTool.cpp
@@ -43,7 +43,7 @@ StatusCode CLTool::initialize() {
   //check if tool has to be initialized
   if (std::any_of( m_rangeNmuons.begin(), m_rangeNmuons.end(),
                    [](double x) { return x == -1.;} )) {
-    m_init.setCode(500);
+    m_init = StatusCode{500};
     // return Error("CLTOOL: NOT INITIALIZED!",m_init);
     return sc;
   }
@@ -57,7 +57,7 @@ StatusCode CLTool::initialize() {
   m_mombinsCenter[m_nrange-1]=m_lbinCenter;
 
   if (m_signal.size()%m_nrange!=0){
-    m_init.setCode(501);
+    m_init = StatusCode{501};
     // return Error( "CLTOOL: INPUT VALUES, WRONG SIZE PER MOM BIN FOR MUONS",m_init );
     return sc;
   }
@@ -79,7 +79,7 @@ StatusCode CLTool::initialize() {
   // check min momentum and initialize
   if (m_range[0]!=m_rangeNmuons[0])
   {
-    m_init.setCode(502);
+    m_init = StatusCode{502};
     // return Error( "CLTOOL: MIN MOM NOT THE SAME FOR MUONS AND NOT MUONS!", m_init);
     return sc;
   }
@@ -98,7 +98,7 @@ StatusCode CLTool::initialize() {
   }
 
   if (m_bkg.size()%m_nrangeNmuons!=0){
-    m_init.setCode(503);
+    m_init = StatusCode{503};
     // m_init.setChecked();
     // return m_init;
     // return Error( "CLTOOL: INPUT VALUES, WRONG SIZE PER MOMENTUM BIN FOR NON MUONS", m_init);
@@ -110,7 +110,7 @@ StatusCode CLTool::initialize() {
 
   //check number of elements per momentum bin is the same for signal and bkg
   if (m_nvals!=nvalsNmuons){
-    m_init.setCode(504);
+    m_init = StatusCode{504};
     // m_init.setChecked();
     // return m_init;
     // return Error( "CLTOOL: DIFFERENT SIZE FOR MUONS AND NON MUONS FOR CL", m_init);
@@ -130,7 +130,7 @@ StatusCode CLTool::initialize() {
   StatusCode stc2=getClValues(sb::bkg);
 
   if  (stc1.isFailure() || stc2.isFailure()) {
-    m_init.setCode(505);
+    m_init = StatusCode{505};
     // return Error("CLTOOL: UNIFORMED FUNCTIONS FOR SIGNAL,BKG FAIL!",m_init);
     return sc;
   }
@@ -266,11 +266,11 @@ StatusCode CLTool::cl(const double value, double& cls, double& clb, double& clr,
 
   StatusCode sc = StatusCode::SUCCESS;
   if (m_init.isFailure()) {
-    sc.setCode(501);
+    sc = StatusCode{501};
     return Error("CLTool: TOOL NOT INITIALIZED",sc);
   }
   if (value<=0.0) {
-    sc.setCode(502);
+    sc = StatusCode{502};
     return Error("CLTool: NOT A VALID VALUE FOR QUANTITY", sc);
   }
 
@@ -278,7 +278,7 @@ StatusCode CLTool::cl(const double value, double& cls, double& clb, double& clr,
   int p_r;
   StatusCode sc1=findMomRange(mom,p_r,sb::sig);
   if (sc1.isFailure()) {
-    sc.setCode(503);
+    sc = StatusCode{503};
     if ( msgLevel(MSG::DEBUG)) debug()<<"NOT VALID RANGE OF P SIGNAL"<<endmsg;
     return sc;
   }
@@ -292,7 +292,7 @@ StatusCode CLTool::cl(const double value, double& cls, double& clb, double& clr,
   int p_r_nmuons;
   StatusCode sc2=findMomRange(mom,p_r_nmuons,sb::bkg);
   if (sc2.isFailure()) {
-    sc.setCode(504);
+    sc = StatusCode{504};
     if ( msgLevel(MSG::DEBUG)) debug()<<"NOT VALID RANGE OF P BKG"<<endmsg;
     return sc;
   }
diff --git a/Muon/MuonID/src/component/Chi2MuIDTool.cpp b/Muon/MuonID/src/component/Chi2MuIDTool.cpp
index 1b11d43038c1b653d1d7fd958736319a5a4d36c7..3d54433424a0c7f79793c759e197500a378421b8 100644
--- a/Muon/MuonID/src/component/Chi2MuIDTool.cpp
+++ b/Muon/MuonID/src/component/Chi2MuIDTool.cpp
@@ -98,14 +98,14 @@ StatusCode Chi2MuIDTool::isGoodSeed(const LHCb::Track& seed)
   if (seed.p()<m_PreSelMomentum)
   {
     if ( msgLevel(MSG::DEBUG)) debug() << "Track mom below momentum threshold of "<<m_PreSelMomentum<<endmsg;
-    sc.setCode(101); return sc;
+    sc = StatusCode{101}; return sc;
   }
 
   //track not in acceptance (standard definition)
   if (!(isTrackInAcceptance(seed)))
   {
     if (msgLevel(MSG::DEBUG) ) debug()<< "Track not in MuonChambers acceptance"<<endmsg;
-    sc.setCode(102); return sc;
+    sc = StatusCode{102}; return sc;
   }
   return sc;
 }
@@ -123,7 +123,7 @@ StatusCode Chi2MuIDTool::muonCandidate(const LHCb::Track& seed,
 
   if (ids_init.empty()) {
     if ( !exist<SmartMuonMeasProvider>("Rec/Muon/SmartMuonMeasProvider") ) {
-      sc.setCode(201);
+      sc = StatusCode{201};
       return Error("SmartMuonMeasProvider not in TES, please load",sc);
     }
     // access muon hits info from TES
@@ -204,13 +204,13 @@ StatusCode Chi2MuIDTool::muonCandidate(const LHCb::Track& seed,
     if (sc.isFailure())
     {
       if (msgLevel(MSG::DEBUG) ) debug()<< "muonCandidate: fit failed"<<endmsg;
-      sc.setCode(203);
+      sc = StatusCode{203};
       return sc;
     }
     else{
       if (msgLevel(MSG::DEBUG) ) debug()<< "muonCandidate: myquality="<<myquality<<endmsg;
       if (myquality>=m_chi2cut) {
-        sc.setCode(203);
+        sc = StatusCode{203};
         return sc;
       }
 
@@ -230,13 +230,13 @@ StatusCode Chi2MuIDTool::muonQuality(LHCb::Track& muTrack, double& Quality)
     Warning("muonQuality:: MUTRACK WITH MORE THAN ONE SEED STATE ON IT",StatusCode::SUCCESS).ignore();
   else if (muTrack.states().size()<1)
   {
-    sc.setCode(301);
+    sc = StatusCode{301};
     return Error("muonQuality:: MUTRACK WITHOUT ANY SEED STATE ON IT",sc);
   }
 
   if (muTrack.lhcbIDs().empty())
   {
-    sc.setCode(302);
+    sc = StatusCode{302};
     return Error("muonQuality:: NO LHCbIDs ON TRACK!",sc);
 
   }
@@ -252,9 +252,8 @@ StatusCode Chi2MuIDTool::muonQuality(LHCb::Track& muTrack, double& Quality)
     debug()<<"sc2.isFailure()"<<sc2.isFailure()<<endmsg;
   }
 
-  if (sc2.isFailure())
-  {
-    sc.setCode(303);
+  if (sc2.isFailure()) {
+    sc = StatusCode{303};
     return Error("WRONG FIT PERFORMED",sc);
   }
 
@@ -426,7 +425,7 @@ StatusCode Chi2MuIDTool::makeStates(const LHCb::Track& seed) {
 
   const std::vector<LHCb::State*> & muStates = seed.states();
   if (muStates.size()==0) {
-    sc.setCode(200);
+    sc = StatusCode{200};
     return Error("MAKE STATES ERROR: NO AVAILABLE STATES IN SEED");
   }
 
@@ -562,7 +561,7 @@ StatusCode Chi2MuIDTool::search(const LHCb::Track& seed, LHCb::Track& muTrack) {
   StatusCode sc1 = makeStates(seed);
   if (sc1.isFailure())
   {
-    sc.setCode(202);
+    sc = StatusCode{202};
     return Error("search: make states",sc);
   }
 
@@ -578,14 +577,14 @@ StatusCode Chi2MuIDTool::search(const LHCb::Track& seed, LHCb::Track& muTrack) {
   // apply isMuon
   if (!m_applyIsMuon){
     if (!muTrack.lhcbIDs().empty()) return sc;
-    sc.setCode(204);
+    sc = StatusCode{204};
     return sc;
   }
 
   bool ism = m_IsMuonTool->IsMuonCandidate(muTrack);
   if (!ism)
   {
-    sc.setCode(203); return sc;
+    sc = StatusCode{203}; return sc;
   }
 
 
@@ -603,7 +602,7 @@ StatusCode Chi2MuIDTool::findTrackRegions(const LHCb::Track& muTrack,  std::vect
   sc=makeStates(muTrack);
   if (sc.isFailure())
   {
-    sc.setCode(303);
+    sc = StatusCode{303};
     return sc;
   }
 
diff --git a/Muon/MuonID/src/component/DLLMuonTool.cpp b/Muon/MuonID/src/component/DLLMuonTool.cpp
index 4d32905890ea7414a15099e6863976523fd50bec..97ae48dccbbd8d5bb6f009b4660b5dc10436d1d7 100644
--- a/Muon/MuonID/src/component/DLLMuonTool.cpp
+++ b/Muon/MuonID/src/component/DLLMuonTool.cpp
@@ -426,7 +426,7 @@ bool DLLMuonTool::calcNShared(
               << endmsg;
     if (dsquare1 < 0.) {
       muonid->setNShared(100);
-      return Warning("calcDist 1 failure", false);
+      return Warning("calcDist 1 failure", StatusCode::FAILURE).isSuccess();
     }
     // Store distance in the muon map
     m_muonDistMap[muonid] = dsquare1;
@@ -473,7 +473,7 @@ bool DLLMuonTool::calcNShared(
                   << endmsg;
         if (dsquare2 < 0.) {
           muonid->setNShared(100);
-          return Warning("calcDist 2 failure", false);
+          return Warning("calcDist 2 failure", StatusCode::FAILURE).isSuccess();
         }
         if (msgLevel(MSG::DEBUG))
           debug() << "            For SECONDARY track with momentum = "
diff --git a/Muon/MuonID/src/component/DistMuIDTool.cpp b/Muon/MuonID/src/component/DistMuIDTool.cpp
index fa2b4a7fa4b6152b0ae64281a1ea008c6399f395..2029eb2c81f3dcd80b77796839221c3d3e6a889d 100644
--- a/Muon/MuonID/src/component/DistMuIDTool.cpp
+++ b/Muon/MuonID/src/component/DistMuIDTool.cpp
@@ -33,14 +33,14 @@ StatusCode DistMuIDTool::muonQuality(LHCb::Track& muTrack, double& Quality)
   if (muTrack.states().size()>1) warning()<<"MUTRACK WITH MORE THAN ONE SEED STATE ON IT"<<endmsg;
   else if (muTrack.states().empty())
   {
-    sc.setCode(301);
+    sc = StatusCode{301};
     Quality=0;
     return Error("MUTRACK WITHOUT ANY SEED STATE ON IT",sc);
   }
 
   if (muTrack.lhcbIDs().empty())
   {
-    sc.setCode(302);
+    sc = StatusCode{302};
     Quality=0;
     return Error("NO LHCbIDs ON TRACK. IMPOSSIBLE TO CALCULATE QUALITY",sc);
   }
@@ -70,7 +70,7 @@ StatusCode DistMuIDTool::computeDistance(const LHCb::Track& muTrack, double& dis
 
   sc=makeStates(muTrack);
   if (sc.isFailure()) {
-    sc.setCode(303);
+    sc = StatusCode{303};
     return sc;
   }
 
diff --git a/Muon/MuonID/src/component/GetArrival.cpp b/Muon/MuonID/src/component/GetArrival.cpp
index b86d694a5ac7bf3d8eb318a984b76cad3814784b..73cd2f9c368a93b68bd30e327f36664d731b1d55 100644
--- a/Muon/MuonID/src/component/GetArrival.cpp
+++ b/Muon/MuonID/src/component/GetArrival.cpp
@@ -48,12 +48,12 @@ StatusCode GetArrival::initialize() {
   auto un_init = [](double x) { return x == -1. ; };
   if (m_useFunct) {
     if (std::any_of(m_beta.begin(), m_beta.end(),un_init)) {
-      m_init.setCode(401);
+      m_init = StatusCode{401};
       return sc;
       // return Error( "BETAS NOT INITIALIZED", m_init);
     }
     if (std::any_of(m_alpha.begin(), m_alpha.end(),un_init)) {
-      m_init.setCode(401);
+      m_init = StatusCode{401};
       return sc;
       // return Error( "ALPHAS NOT INITIALIZED", m_init);
     }
@@ -61,7 +61,7 @@ StatusCode GetArrival::initialize() {
     //check if tool has been initialized
     if (std::any_of(m_moms.begin(), m_moms.end(), un_init)) {
       //TODO: sure?
-      m_init.setCode(401);
+      m_init = StatusCode{401};
       if (msgLevel(MSG::DEBUG) ) debug() << "ARRIVAL TOOL NOT INITIALIZED"<<endmsg;
       // m_init.setChecked();
       return sc;
@@ -71,7 +71,7 @@ StatusCode GetArrival::initialize() {
     unsigned int npoints = m_moms.size();
     if (msgLevel(MSG::DEBUG) ) debug() << " npoints: " << npoints << endmsg;
     if ((m_probs.size()%npoints)!=0){
-      m_init.setCode(402);
+      m_init = StatusCode{402};
       return sc;
       // return Error( "INPUT VALUES WRONG SIZE PER STATION", m_init);
     }
@@ -212,7 +212,7 @@ StatusCode GetArrival::getArrivalFromTrack(const LHCb::Track& mutrack,double& pa
   }
 
   if (mutrack.lhcbIDs().empty()) {
-    sc.setCode(410);
+    sc = StatusCode{410};
     return Error("NO LHCbIDs ON TRACK. IMPOSSIBLE TO CALCULATE QUALITY",sc);
   }
 
@@ -220,7 +220,7 @@ StatusCode GetArrival::getArrivalFromTrack(const LHCb::Track& mutrack,double& pa
   sc = getStationsFromTrack(mutrack,type_st);
   if (sc.isFailure())
   {
-    sc.setCode(411);
+    sc = StatusCode{411};
     return Error("COULD NOT RETRIEVE STS FROM LHCbIDs",sc);
   }
 
@@ -303,7 +303,7 @@ StatusCode GetArrival::clArrival(const LHCb::Track& muTrack, double& clarr){
   }
 
   if (muTrack.lhcbIDs().empty()) {
-    sc.setCode(410);
+    sc = StatusCode{410};
     return Error("NO LHCbIDs ON TRACK. IMPOSSIBLE TO CALCULATE CL",sc);
   }
 
@@ -312,7 +312,7 @@ StatusCode GetArrival::clArrival(const LHCb::Track& muTrack, double& clarr){
   sc = getStationsFromTrack(muTrack,type_st);
   if (sc.isFailure()) {
     clarr=0.;
-    sc.setCode(411);
+    sc = StatusCode{411};
     return Error("COULD NOT RETRIEVE STS FROM LHCbIDs",sc);
   }
   return clArrival(muTrack.p(), type_st, clarr);
@@ -324,7 +324,7 @@ StatusCode GetArrival::clArrival(const double p,const std::vector<int>& type_st,
   StatusCode sc = StatusCode::SUCCESS;
 
   if (countArray(type_st,4,1)<m_minhits) {
-    sc.setCode(412);
+    sc = StatusCode{412};
     if (msgLevel(MSG::DEBUG) ) debug()<<"number of hits less than min"<<endmsg;
     return sc;
   }
diff --git a/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDCommonBase.icpp b/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDCommonBase.icpp
index 275e22d4631c92e0f255ef6f529b1815b761ca3c..f47395dab2dd98bbd4076ea4e9bce3ecf0e01430 100644
--- a/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDCommonBase.icpp
+++ b/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDCommonBase.icpp
@@ -64,7 +64,7 @@ StatusCode ANNGlobalPID::ChargedProtoANNPIDCommonBase<PBASE>::initialize()
   IIncidentSvc * incSvc =
     this -> template svc<IIncidentSvc>( "IncidentSvc", true );
   incSvc->addListener( this, IncidentType::EndEvent );
-  sc = sc && this -> releaseSvc(incSvc);
+  if( sc ) sc = this -> releaseSvc(incSvc);
 
   return sc;
 }
diff --git a/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTrainingTuple.cpp b/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTrainingTuple.cpp
index 49cfd1f42b5b80c71d43839cc81dd8fd2a5cdcfa..fa7fc47e5be2cadb230b422507bfe9053be88346 100644
--- a/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTrainingTuple.cpp
+++ b/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTrainingTuple.cpp
@@ -68,9 +68,9 @@ StatusCode ChargedProtoANNPIDTrainingTuple::execute()
     // make a tuple
     auto tuple = nTuple( "annInputs", "ProtoParticle PID Information for ANN Training" );
     // Fill variables
-    sc = sc && m_tuple->fill(tuple,P);
+    if ( sc ) sc = m_tuple->fill(tuple,P);
     // Finally, write the tuple for this ProtoParticle
-    sc = sc && tuple->write();
+    if ( sc ) sc = tuple->write();
   }
 
   // return
diff --git a/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTupleTool.cpp b/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTupleTool.cpp
index e5173a5c246f188f3d670bee74b7f893848029e7..d59419437abe9836a4905bac336ad8bc45fdfb7b 100644
--- a/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTupleTool.cpp
+++ b/Rec/ChargedProtoANNPID/src/ChargedProtoANNPIDTupleTool.cpp
@@ -125,21 +125,21 @@ StatusCode ChargedProtoANNPIDTupleTool::fill( Tuples::Tuple& tuple,
   for ( const auto & i : m_inputs )
   {
     // get the variable and fill ntuple
-    sc = sc && tuple->column( i.first, (float) i.second->value(proto) );
+    if ( sc ) sc = tuple->column( i.first, (float) i.second->value(proto) );
   }
 
   // PID info
-  sc = sc && tuple->column( "RecoPIDcode", pid.pid() );
+  if ( sc ) sc = tuple->column( "RecoPIDcode", pid.pid() );
 
   // MC variables
 
   // First get the MCParticle, if associated
   const auto * mcPart = m_truth->mcParticle(track);
-  sc = sc && tuple->column( "HasMC",          mcPart != nullptr );
-  sc = sc && tuple->column( "MCParticleType", mcPart ? mcPart->particleID().pid() : 0    );
-  sc = sc && tuple->column( "MCParticleP",    mcPart ? mcPart->p()                : -999 );
-  sc = sc && tuple->column( "MCParticlePt",   mcPart ? mcPart->pt()               : -999 );
-  sc = sc && tuple->column( "MCVirtualMass",  mcPart ? mcPart->virtualMass()      : -999 );
+  if ( sc ) sc = tuple->column( "HasMC",          mcPart != nullptr );
+  if ( sc ) sc = tuple->column( "MCParticleType", mcPart ? mcPart->particleID().pid() : 0    );
+  if ( sc ) sc = tuple->column( "MCParticleP",    mcPart ? mcPart->p()                : -999 );
+  if ( sc ) sc = tuple->column( "MCParticlePt",   mcPart ? mcPart->pt()               : -999 );
+  if ( sc ) sc = tuple->column( "MCVirtualMass",  mcPart ? mcPart->virtualMass()      : -999 );
 
   // MC history flags
   bool fromB(false), fromD(false);
@@ -156,15 +156,15 @@ StatusCode ChargedProtoANNPIDTupleTool::fill( Tuples::Tuple& tuple,
     mcParent = mcParent->mother();
   }
   // Save MC parent info
-  sc = sc && tuple->column( "MCFromB", fromB );
-  sc = sc && tuple->column( "MCFromD", fromD );
+  if ( sc ) sc = tuple->column( "MCFromB", fromB );
+  if ( sc ) sc = tuple->column( "MCFromD", fromD );
 
   // Get info on the MC vertex type
   const auto * mcVert = ( mcPart ? mcPart->originVertex() : nullptr );
-  sc = sc && tuple->column( "MCVertexType", mcVert ? (int)mcVert->type()    : -999   );
-  sc = sc && tuple->column( "MCVertexX",    mcVert ? mcVert->position().x() : -999.0 );
-  sc = sc && tuple->column( "MCVertexY",    mcVert ? mcVert->position().y() : -999.0 );
-  sc = sc && tuple->column( "MCVertexZ",    mcVert ? mcVert->position().z() : -999.0 );
+  if ( sc ) sc = tuple->column( "MCVertexType", mcVert ? (int)mcVert->type()    : -999   );
+  if ( sc ) sc = tuple->column( "MCVertexX",    mcVert ? mcVert->position().x() : -999.0 );
+  if ( sc ) sc = tuple->column( "MCVertexY",    mcVert ? mcVert->position().y() : -999.0 );
+  if ( sc ) sc = tuple->column( "MCVertexZ",    mcVert ? mcVert->position().z() : -999.0 );
 
   // return
   return sc;
diff --git a/Rec/GlobalReco/src/ChargedProtoParticleAddVeloInfo.cpp b/Rec/GlobalReco/src/ChargedProtoParticleAddVeloInfo.cpp
index 8d64dbefe45a7bd8dca52b47bb734948b5786af4..d899cf9d2820fd259ab45f107bb7fee74c1d908b 100644
--- a/Rec/GlobalReco/src/ChargedProtoParticleAddVeloInfo.cpp
+++ b/Rec/GlobalReco/src/ChargedProtoParticleAddVeloInfo.cpp
@@ -64,7 +64,7 @@ StatusCode ChargedProtoParticleAddVeloInfo::execute()
   auto * protos = getIfExists<LHCb::ProtoParticles>(m_protoPath);
   if ( !protos )
   {
-    return Warning( "No existing ProtoParticle container at " +  
+    return Warning( "No existing ProtoParticle container at " +
                     m_protoPath + " thus do nothing.",
                     StatusCode::SUCCESS );
   }
@@ -82,7 +82,7 @@ StatusCode ChargedProtoParticleAddVeloInfo::execute()
 //=============================================================================
 // Add VELO dE/dx info to the protoparticle
 //=============================================================================
-bool 
+bool
 ChargedProtoParticleAddVeloInfo::addVelodEdx( LHCb::ProtoParticle * proto ) const
 {
   // clear current Velo info
@@ -95,7 +95,7 @@ ChargedProtoParticleAddVeloInfo::addVelodEdx( LHCb::ProtoParticle * proto ) cons
   { proto->addInfo( LHCb::ProtoParticle::VeloCharge, veloNtks ); }
 
   // return status
-  return sc;
+  return sc.isSuccess();
 }
 
 //-----------------------------------------------------------------------------
diff --git a/Rec/GlobalReco/src/ChargedProtoParticleTupleAlg.cpp b/Rec/GlobalReco/src/ChargedProtoParticleTupleAlg.cpp
index e7940556ad449acf574e3e0831723e88202d986e..49b97acf4be1b4b1596221207b78b6bd44a36608 100755
--- a/Rec/GlobalReco/src/ChargedProtoParticleTupleAlg.cpp
+++ b/Rec/GlobalReco/src/ChargedProtoParticleTupleAlg.cpp
@@ -92,102 +92,102 @@ StatusCode ChargedProtoParticleTupleAlg::execute()
     // reco variables
 
     // some track info
-    sc = sc && tuple->column( "TrackP",          track->p()  );
-    sc = sc && tuple->column( "TrackPt",         track->pt() );
-    sc = sc && tuple->column( "TrackChi2PerDof", track->chi2PerDoF() );
-    sc = sc && tuple->column( "TrackNumDof",     track->nDoF() );
-    sc = sc && tuple->column( "TrackType",       track->type() );
-    sc = sc && tuple->column( "TrackHistory",    track->history() );
-    sc = sc && tuple->column( "TrackGhostProb",  track->ghostProbability() );
-    sc = sc && tuple->column( "TrackLikelihood", track->likelihood() );
-    sc = sc && tuple->column( "TrackCloneDist",  track->info(LHCb::Track::CloneDist,9e10) );
+    if ( sc ) sc = tuple->column( "TrackP",          track->p()  );
+    if ( sc ) sc = tuple->column( "TrackPt",         track->pt() );
+    if ( sc ) sc = tuple->column( "TrackChi2PerDof", track->chi2PerDoF() );
+    if ( sc ) sc = tuple->column( "TrackNumDof",     track->nDoF() );
+    if ( sc ) sc = tuple->column( "TrackType",       track->type() );
+    if ( sc ) sc = tuple->column( "TrackHistory",    track->history() );
+    if ( sc ) sc = tuple->column( "TrackGhostProb",  track->ghostProbability() );
+    if ( sc ) sc = tuple->column( "TrackLikelihood", track->likelihood() );
+    if ( sc ) sc = tuple->column( "TrackCloneDist",  track->info(LHCb::Track::CloneDist,9e10) );
 
     // rich
     static LHCb::RichPID tmpRPID;
     tmpRPID.setPidResultCode( static_cast<int>(proto->info(LHCb::ProtoParticle::RichPIDStatus,0)) );
-    sc = sc && tuple->column( "RichDLLe",      proto->info ( LHCb::ProtoParticle::RichDLLe,  0 ) );
-    sc = sc && tuple->column( "RichDLLmu",     proto->info ( LHCb::ProtoParticle::RichDLLmu, 0 ) );
-    sc = sc && tuple->column( "RichDLLpi",     proto->info ( LHCb::ProtoParticle::RichDLLpi, 0 ) );
-    sc = sc && tuple->column( "RichDLLk",      proto->info ( LHCb::ProtoParticle::RichDLLk,  0 ) );
-    sc = sc && tuple->column( "RichDLLp",      proto->info ( LHCb::ProtoParticle::RichDLLp,  0 ) );
-    sc = sc && tuple->column( "RichDLLd",      proto->info ( LHCb::ProtoParticle::RichDLLd,  0 ) );
-    sc = sc && tuple->column( "RichDLLbt",     proto->info ( LHCb::ProtoParticle::RichDLLbt, 0 ) );
-    sc = sc && tuple->column( "RichUsedAero",     tmpRPID.usedAerogel()  );
-    sc = sc && tuple->column( "RichUsedR1Gas",    tmpRPID.usedRich1Gas() );
-    sc = sc && tuple->column( "RichUsedR2Gas",    tmpRPID.usedRich2Gas() );
-    sc = sc && tuple->column( "RichAboveElThres", tmpRPID.electronHypoAboveThres() );
-    sc = sc && tuple->column( "RichAboveMuThres", tmpRPID.muonHypoAboveThres() );
-    sc = sc && tuple->column( "RichAbovePiThres", tmpRPID.pionHypoAboveThres() );
-    sc = sc && tuple->column( "RichAboveKaThres", tmpRPID.kaonHypoAboveThres() );
-    sc = sc && tuple->column( "RichAbovePrThres", tmpRPID.protonHypoAboveThres() );
-    sc = sc && tuple->column( "RichAboveDeThres", tmpRPID.deuteronHypoAboveThres() );
-    sc = sc && tuple->column( "RichBestPID",      (int)tmpRPID.bestParticleID() );
+    if ( sc ) sc = tuple->column( "RichDLLe",      proto->info ( LHCb::ProtoParticle::RichDLLe,  0 ) );
+    if ( sc ) sc = tuple->column( "RichDLLmu",     proto->info ( LHCb::ProtoParticle::RichDLLmu, 0 ) );
+    if ( sc ) sc = tuple->column( "RichDLLpi",     proto->info ( LHCb::ProtoParticle::RichDLLpi, 0 ) );
+    if ( sc ) sc = tuple->column( "RichDLLk",      proto->info ( LHCb::ProtoParticle::RichDLLk,  0 ) );
+    if ( sc ) sc = tuple->column( "RichDLLp",      proto->info ( LHCb::ProtoParticle::RichDLLp,  0 ) );
+    if ( sc ) sc = tuple->column( "RichDLLd",      proto->info ( LHCb::ProtoParticle::RichDLLd,  0 ) );
+    if ( sc ) sc = tuple->column( "RichDLLbt",     proto->info ( LHCb::ProtoParticle::RichDLLbt, 0 ) );
+    if ( sc ) sc = tuple->column( "RichUsedAero",     tmpRPID.usedAerogel()  );
+    if ( sc ) sc = tuple->column( "RichUsedR1Gas",    tmpRPID.usedRich1Gas() );
+    if ( sc ) sc = tuple->column( "RichUsedR2Gas",    tmpRPID.usedRich2Gas() );
+    if ( sc ) sc = tuple->column( "RichAboveElThres", tmpRPID.electronHypoAboveThres() );
+    if ( sc ) sc = tuple->column( "RichAboveMuThres", tmpRPID.muonHypoAboveThres() );
+    if ( sc ) sc = tuple->column( "RichAbovePiThres", tmpRPID.pionHypoAboveThres() );
+    if ( sc ) sc = tuple->column( "RichAboveKaThres", tmpRPID.kaonHypoAboveThres() );
+    if ( sc ) sc = tuple->column( "RichAbovePrThres", tmpRPID.protonHypoAboveThres() );
+    if ( sc ) sc = tuple->column( "RichAboveDeThres", tmpRPID.deuteronHypoAboveThres() );
+    if ( sc ) sc = tuple->column( "RichBestPID",      (int)tmpRPID.bestParticleID() );
 
     // muon
     static LHCb::MuonPID tmpMPID;
     tmpMPID.setStatus( static_cast<int>(proto->info(LHCb::ProtoParticle::MuonPIDStatus,0)) );
-    sc = sc && tuple->column( "MuonBkgLL",    proto->info ( LHCb::ProtoParticle::MuonBkgLL, 0 ) );
-    sc = sc && tuple->column( "MuonMuLL",     proto->info ( LHCb::ProtoParticle::MuonMuLL,  0 ) );
-    sc = sc && tuple->column( "MuonNShared",  proto->info ( LHCb::ProtoParticle::MuonNShared, 0 ) );
-    sc = sc && tuple->column( "MuonIsLooseMuon", tmpMPID.IsMuonLoose() );
-    sc = sc && tuple->column( "MuonIsMuon",      tmpMPID.IsMuon() );
-    sc = sc && tuple->column( "MuonInAcc",  proto->info ( LHCb::ProtoParticle::InAccMuon, false ) );
+    if ( sc ) sc = tuple->column( "MuonBkgLL",    proto->info ( LHCb::ProtoParticle::MuonBkgLL, 0 ) );
+    if ( sc ) sc = tuple->column( "MuonMuLL",     proto->info ( LHCb::ProtoParticle::MuonMuLL,  0 ) );
+    if ( sc ) sc = tuple->column( "MuonNShared",  proto->info ( LHCb::ProtoParticle::MuonNShared, 0 ) );
+    if ( sc ) sc = tuple->column( "MuonIsLooseMuon", tmpMPID.IsMuonLoose() );
+    if ( sc ) sc = tuple->column( "MuonIsMuon",      tmpMPID.IsMuon() );
+    if ( sc ) sc = tuple->column( "MuonInAcc",  proto->info ( LHCb::ProtoParticle::InAccMuon, false ) );
 
     // calo
-    sc = sc && tuple->column( "InAccSpd",   proto->info ( LHCb::ProtoParticle::InAccSpd,  false ) );
-    sc = sc && tuple->column( "InAccPrs",   proto->info ( LHCb::ProtoParticle::InAccPrs,  false ) );
-    sc = sc && tuple->column( "InAccEcal",  proto->info ( LHCb::ProtoParticle::InAccEcal, false ) );
-    sc = sc && tuple->column( "InAccHcal",  proto->info ( LHCb::ProtoParticle::InAccHcal, false ) );
-    sc = sc && tuple->column( "InAccBrem",  proto->info ( LHCb::ProtoParticle::InAccBrem, false ) );
-    sc = sc && tuple->column( "CaloTrMatch",       proto->info ( LHCb::ProtoParticle::CaloTrMatch, 0 ) );
-    sc = sc && tuple->column( "CaloElectronMatch", proto->info ( LHCb::ProtoParticle::CaloElectronMatch, 0 ) );
-    sc = sc && tuple->column( "CaloBremMatch",     proto->info ( LHCb::ProtoParticle::CaloBremMatch, 0 ) );
-    sc = sc && tuple->column( "CaloChargedSpd",    proto->info ( LHCb::ProtoParticle::CaloChargedSpd, 0 ) );
-    sc = sc && tuple->column( "CaloChargedPrs",    proto->info ( LHCb::ProtoParticle::CaloChargedPrs, 0 ) );
-    sc = sc && tuple->column( "CaloChargedEcal",   proto->info ( LHCb::ProtoParticle::CaloChargedEcal, 0 ) );
-    sc = sc && tuple->column( "CaloSpdE",   proto->info ( LHCb::ProtoParticle::CaloSpdE,   0 ) );
-    sc = sc && tuple->column( "CaloPrsE",   proto->info ( LHCb::ProtoParticle::CaloPrsE,   0 ) );
-    sc = sc && tuple->column( "CaloEcalChi2", proto->info ( LHCb::ProtoParticle::CaloEcalChi2, 0 ) );
-    sc = sc && tuple->column( "CaloClusChi2", proto->info ( LHCb::ProtoParticle::CaloClusChi2, 0 ) );
-    sc = sc && tuple->column( "CaloBremChi2", proto->info ( LHCb::ProtoParticle::CaloBremChi2, 0 ) );
-    sc = sc && tuple->column( "CaloPrsE",   proto->info ( LHCb::ProtoParticle::CaloPrsE,   0 ) );
-    sc = sc && tuple->column( "CaloEcalE",  proto->info ( LHCb::ProtoParticle::CaloEcalE,  0 ) );
-    sc = sc && tuple->column( "CaloHcalE",  proto->info ( LHCb::ProtoParticle::CaloHcalE,  0 ) );
-    sc = sc && tuple->column( "CaloTrajectoryL", proto->info ( LHCb::ProtoParticle::CaloTrajectoryL, 0 ) );
-    sc = sc && tuple->column( "EcalPIDe",   proto->info ( LHCb::ProtoParticle::EcalPIDe,  0 ) );
-    sc = sc && tuple->column( "HcalPIDe",   proto->info ( LHCb::ProtoParticle::HcalPIDe,  0 ) );
-    sc = sc && tuple->column( "PrsPIDe",    proto->info ( LHCb::ProtoParticle::PrsPIDe,   0 ) );
-    sc = sc && tuple->column( "BremPIDe",   proto->info ( LHCb::ProtoParticle::BremPIDe,  0 ) );
-    sc = sc && tuple->column( "EcalPIDmu",  proto->info ( LHCb::ProtoParticle::EcalPIDmu, 0 ) );
-    sc = sc && tuple->column( "HcalPIDmu",  proto->info ( LHCb::ProtoParticle::HcalPIDmu, 0 ) );
+    if ( sc ) sc = tuple->column( "InAccSpd",   proto->info ( LHCb::ProtoParticle::InAccSpd,  false ) );
+    if ( sc ) sc = tuple->column( "InAccPrs",   proto->info ( LHCb::ProtoParticle::InAccPrs,  false ) );
+    if ( sc ) sc = tuple->column( "InAccEcal",  proto->info ( LHCb::ProtoParticle::InAccEcal, false ) );
+    if ( sc ) sc = tuple->column( "InAccHcal",  proto->info ( LHCb::ProtoParticle::InAccHcal, false ) );
+    if ( sc ) sc = tuple->column( "InAccBrem",  proto->info ( LHCb::ProtoParticle::InAccBrem, false ) );
+    if ( sc ) sc = tuple->column( "CaloTrMatch",       proto->info ( LHCb::ProtoParticle::CaloTrMatch, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloElectronMatch", proto->info ( LHCb::ProtoParticle::CaloElectronMatch, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloBremMatch",     proto->info ( LHCb::ProtoParticle::CaloBremMatch, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloChargedSpd",    proto->info ( LHCb::ProtoParticle::CaloChargedSpd, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloChargedPrs",    proto->info ( LHCb::ProtoParticle::CaloChargedPrs, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloChargedEcal",   proto->info ( LHCb::ProtoParticle::CaloChargedEcal, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloSpdE",   proto->info ( LHCb::ProtoParticle::CaloSpdE,   0 ) );
+    if ( sc ) sc = tuple->column( "CaloPrsE",   proto->info ( LHCb::ProtoParticle::CaloPrsE,   0 ) );
+    if ( sc ) sc = tuple->column( "CaloEcalChi2", proto->info ( LHCb::ProtoParticle::CaloEcalChi2, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloClusChi2", proto->info ( LHCb::ProtoParticle::CaloClusChi2, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloBremChi2", proto->info ( LHCb::ProtoParticle::CaloBremChi2, 0 ) );
+    if ( sc ) sc = tuple->column( "CaloPrsE",   proto->info ( LHCb::ProtoParticle::CaloPrsE,   0 ) );
+    if ( sc ) sc = tuple->column( "CaloEcalE",  proto->info ( LHCb::ProtoParticle::CaloEcalE,  0 ) );
+    if ( sc ) sc = tuple->column( "CaloHcalE",  proto->info ( LHCb::ProtoParticle::CaloHcalE,  0 ) );
+    if ( sc ) sc = tuple->column( "CaloTrajectoryL", proto->info ( LHCb::ProtoParticle::CaloTrajectoryL, 0 ) );
+    if ( sc ) sc = tuple->column( "EcalPIDe",   proto->info ( LHCb::ProtoParticle::EcalPIDe,  0 ) );
+    if ( sc ) sc = tuple->column( "HcalPIDe",   proto->info ( LHCb::ProtoParticle::HcalPIDe,  0 ) );
+    if ( sc ) sc = tuple->column( "PrsPIDe",    proto->info ( LHCb::ProtoParticle::PrsPIDe,   0 ) );
+    if ( sc ) sc = tuple->column( "BremPIDe",   proto->info ( LHCb::ProtoParticle::BremPIDe,  0 ) );
+    if ( sc ) sc = tuple->column( "EcalPIDmu",  proto->info ( LHCb::ProtoParticle::EcalPIDmu, 0 ) );
+    if ( sc ) sc = tuple->column( "HcalPIDmu",  proto->info ( LHCb::ProtoParticle::HcalPIDmu, 0 ) );
 
     // combined DLLs
-    sc = sc && tuple->column( "CombDLLe",   proto->info ( LHCb::ProtoParticle::CombDLLe,  0 ) );
-    sc = sc && tuple->column( "CombDLLmu",  proto->info ( LHCb::ProtoParticle::CombDLLmu, 0 ) );
-    sc = sc && tuple->column( "CombDLLpi",  proto->info ( LHCb::ProtoParticle::CombDLLpi, 0 ) );
-    sc = sc && tuple->column( "CombDLLk",   proto->info ( LHCb::ProtoParticle::CombDLLk,  0 ) );
-    sc = sc && tuple->column( "CombDLLp",   proto->info ( LHCb::ProtoParticle::CombDLLp,  0 ) );
+    if ( sc ) sc = tuple->column( "CombDLLe",   proto->info ( LHCb::ProtoParticle::CombDLLe,  0 ) );
+    if ( sc ) sc = tuple->column( "CombDLLmu",  proto->info ( LHCb::ProtoParticle::CombDLLmu, 0 ) );
+    if ( sc ) sc = tuple->column( "CombDLLpi",  proto->info ( LHCb::ProtoParticle::CombDLLpi, 0 ) );
+    if ( sc ) sc = tuple->column( "CombDLLk",   proto->info ( LHCb::ProtoParticle::CombDLLk,  0 ) );
+    if ( sc ) sc = tuple->column( "CombDLLp",   proto->info ( LHCb::ProtoParticle::CombDLLp,  0 ) );
 
     // ANN PID Probabilities
-    sc = sc && tuple->column( "ProbNNe",     proto->info ( LHCb::ProtoParticle::ProbNNe,  -1 ) );
-    sc = sc && tuple->column( "ProbNNmu",    proto->info ( LHCb::ProtoParticle::ProbNNmu, -1 ) );
-    sc = sc && tuple->column( "ProbNNpi",    proto->info ( LHCb::ProtoParticle::ProbNNpi, -1 ) );
-    sc = sc && tuple->column( "ProbNNk",     proto->info ( LHCb::ProtoParticle::ProbNNk,  -1 ) );
-    sc = sc && tuple->column( "ProbNNp",     proto->info ( LHCb::ProtoParticle::ProbNNp,  -1 ) );
-    sc = sc && tuple->column( "ProbNNghost", proto->info ( LHCb::ProtoParticle::ProbNNghost, -1 ) );
+    if ( sc ) sc = tuple->column( "ProbNNe",     proto->info ( LHCb::ProtoParticle::ProbNNe,  -1 ) );
+    if ( sc ) sc = tuple->column( "ProbNNmu",    proto->info ( LHCb::ProtoParticle::ProbNNmu, -1 ) );
+    if ( sc ) sc = tuple->column( "ProbNNpi",    proto->info ( LHCb::ProtoParticle::ProbNNpi, -1 ) );
+    if ( sc ) sc = tuple->column( "ProbNNk",     proto->info ( LHCb::ProtoParticle::ProbNNk,  -1 ) );
+    if ( sc ) sc = tuple->column( "ProbNNp",     proto->info ( LHCb::ProtoParticle::ProbNNp,  -1 ) );
+    if ( sc ) sc = tuple->column( "ProbNNghost", proto->info ( LHCb::ProtoParticle::ProbNNghost, -1 ) );
 
     // VeloCharge
-    sc = sc && tuple->column( "VeloCharge", proto->info ( LHCb::ProtoParticle::VeloCharge, 0 ) );
+    if ( sc ) sc = tuple->column( "VeloCharge", proto->info ( LHCb::ProtoParticle::VeloCharge, 0 ) );
 
     // MCParticle information
     const auto * mcPart = m_truth->mcParticle( track );
-    sc = sc && tuple->column( "MCParticleType", mcPart ? mcPart->particleID().pid() : 0 );
-    sc = sc && tuple->column( "MCParticleP",    mcPart ? mcPart->p() : -99999 );
-    sc = sc && tuple->column( "MCParticlePt",   mcPart ? mcPart->pt() : -99999 );
-    sc = sc && tuple->column( "MCVirtualMass",  mcPart ? mcPart->virtualMass() : -99999 );
+    if ( sc ) sc = tuple->column( "MCParticleType", mcPart ? mcPart->particleID().pid() : 0 );
+    if ( sc ) sc = tuple->column( "MCParticleP",    mcPart ? mcPart->p() : -99999 );
+    if ( sc ) sc = tuple->column( "MCParticlePt",   mcPart ? mcPart->pt() : -99999 );
+    if ( sc ) sc = tuple->column( "MCVirtualMass",  mcPart ? mcPart->virtualMass() : -99999 );
 
     // write the tuple for this protoP
-    sc = sc && tuple->write();
+    if ( sc ) sc = tuple->write();
 
     if ( sc.isFailure() ) return sc;
 
diff --git a/Rich/RichFutureRecCheckers/src/RichPIDQC.cpp b/Rich/RichFutureRecCheckers/src/RichPIDQC.cpp
index 29f1a8ced78ceb0aa4f811fee7e9d3e1e8230ea2..de3c010fa5617ef01e918ba03ba6dbc3fb11d9d9 100644
--- a/Rich/RichFutureRecCheckers/src/RichPIDQC.cpp
+++ b/Rich/RichFutureRecCheckers/src/RichPIDQC.cpp
@@ -24,7 +24,7 @@ PIDQC::PIDQC( const std::string& name, ISvcLocator* pSvcLocator )
   : Consumer( name, pSvcLocator,
               { KeyValue{ "TracksLocation",    LHCb::TrackLocation::Default },
                 KeyValue{ "RichPIDsLocation",  LHCb::RichPIDLocation::Default },
-                KeyValue{ "TrackToMCParticlesRelations", 
+                KeyValue{ "TrackToMCParticlesRelations",
                           Rich::Future::MC::Relations::TrackToMCParticles } } )
 {
   // Initialise
@@ -41,16 +41,14 @@ StatusCode PIDQC::initialize()
   if ( !sc ) return sc;
 
   // get tools
-  sc = sc && m_tkSel.retrieve();
-
-  return sc;
+  return m_tkSel.retrieve();
 }
 
 //-----------------------------------------------------------------------------
 
 void PIDQC::operator()( const LHCb::Track::Selection& tracks,
                         const LHCb::RichPIDs& pids,
-                        const Rich::Future::MC::Relations::TkToMCPRels& rels ) const 
+                        const Rich::Future::MC::Relations::TkToMCPRels& rels ) const
 {
 
   // track selector shortcut
@@ -106,10 +104,10 @@ void PIDQC::operator()( const LHCb::Track::Selection& tracks,
     else
     {
       // Get the sum off all MCP weights
-      const double wSum = 
+      const double wSum =
         std::accumulate( mcPs.begin(), mcPs.end(), 0.0,
                          []( const auto sum, const auto w )
-                         { return sum + w.weight(); } );        
+                         { return sum + w.weight(); } );
       // fill once per associated MCP
       for ( const auto MC : mcPs )
       {
@@ -122,7 +120,7 @@ void PIDQC::operator()( const LHCb::Track::Selection& tracks,
         // If unknown, set to below threshold (i.e. ghost).
         if ( Rich::Unknown == mcpid        ) { mcpid = Rich::BelowThreshold; }
         // If a real type, but below threshold, set below threshold
-        if ( !pid->isAboveThreshold(mcpid) ) { mcpid = Rich::BelowThreshold; } 
+        if ( !pid->isAboveThreshold(mcpid) ) { mcpid = Rich::BelowThreshold; }
         // fill table
         fillTable( bpid, mcpid, mcPW );
       }
@@ -176,7 +174,7 @@ StatusCode PIDQC::finalize()
       eff[iRec]    = ( trueTot[iRec]>0 ? 100*m_sumTab[iRec][iRec]/trueTot[iRec] : 0 );
       purity[iRec] = ( recTot[iRec]>0  ? 100*m_sumTab[iRec][iRec]/recTot[iRec]  : 0 );
     }
-    
+
     // Kaon / Pion seperation
     const auto truePi = trueTotExcludeX[Rich::Pion];
     const auto trueKa = trueTotExcludeX[Rich::Kaon];
@@ -200,13 +198,13 @@ StatusCode PIDQC::finalize()
                                        m_sumTab[Rich::Pion][Rich::Proton] +
                                        m_sumTab[Rich::Pion][Rich::Deuteron] ) / truePi : 0 );
     piMisIDEff[1] = ( truePi>0 ? std::sqrt(piMisIDEff[0]*(100.-piMisIDEff[0]) / truePi ) : 0 );
-    
+
     // Scale entries to percent of total number of entries
     for ( auto & i : m_sumTab )
     {
       for ( auto & j : i ) { j = 100.0 * j / sumTot; }
     }
-    
+
     // compute event and track PID success rates
     std::array<double,2> evPIDRate = {0,0};
     evPIDRate[0] = ( m_nEvents[0]>0 ? 100.*m_nEvents[1]/m_nEvents[0] : 100 );
@@ -216,7 +214,7 @@ StatusCode PIDQC::finalize()
     trPIDRate[1] = ( m_nTracks[0]>0 ? std::sqrt(trPIDRate[0]*(100.-trPIDRate[0])/m_nTracks[0]) : 100 );
     info() << "-------------+---------------------------------------------------------------+------------"
            << endmsg;
-    info() << "   " << name() 
+    info() << "   " << name()
            << " #Tracks = " << m_nTracks[0] << ", With RICH info = " << m_nTracks[1] << endmsg;
     info() << "-------------+---------------------------------------------------------------+------------"
            << endmsg
@@ -246,39 +244,39 @@ StatusCode PIDQC::finalize()
            << "     |" << endmsg;
     info() << "-------------+---------------------------------------------------------------+------------"
            << endmsg;
-    
+
     info() << " % ID eff    |  K->K,Pr,D : "
            << boost::format( "%6.2f +-%6.2f   pi->e,m,pi : %6.2f +-%6.2f " ) %
-      kaonIDEff[0] % kaonIDEff[1] % piIDEff[0] % piIDEff[1] 
+      kaonIDEff[0] % kaonIDEff[1] % piIDEff[0] % piIDEff[1]
            << "  |" << endmsg;
     info() << " % MisID eff |  K->e,m,pi : "
            << boost::format( "%6.2f +-%6.2f   pi->K,Pr,D : %6.2f +-%6.2f " ) %
-      kaonMisIDEff[0] % kaonMisIDEff[1] % piMisIDEff[0] % piMisIDEff[1] 
+      kaonMisIDEff[0] % kaonMisIDEff[1] % piMisIDEff[0] % piMisIDEff[1]
            << "  |" << endmsg;
     info() << " % ID rate   |  Events    : "
            << boost::format( "%6.2f +-%6.2f   Tracks     : %6.2f +-%6.2f " ) %
-      evPIDRate[0] % evPIDRate[1] % trPIDRate[0] % trPIDRate[1] 
+      evPIDRate[0] % evPIDRate[1] % trPIDRate[0] % trPIDRate[1]
            << "  |" << endmsg;
-    
+
     for ( const auto& RC : m_radCount )
     {
       const auto effR = ( m_nTracks[0]>0 ? 100.*((double)RC.second)/m_nTracks[0]    : 100.0 );
       const auto errR = ( m_nTracks[0]>0 ? std::sqrt(effR*(100.-effR)/m_nTracks[0]) : 100.0 );
       info() << "             |  -> With "
              << RC.first.radiators()
-             << boost::format( "   : %6.2f +-%6.2f" ) % effR % errR 
+             << boost::format( "   : %6.2f +-%6.2f" ) % effR % errR
              << "   |" << endmsg;
     }
-    
+
     info() << "-------------+---------------------------------------------------------------+------------"
            << endmsg;
-    
+
   }
   else
   {
     warning() << "NO ENTRIES -> PID table skipped ..." << endmsg;
   }
-  
+
   return Consumer::finalize();
 }
 
diff --git a/Rich/RichFutureRecMonitors/src/RichDetectorHits.cpp b/Rich/RichFutureRecMonitors/src/RichDetectorHits.cpp
index cb9902727ce3e68328d334fa6209ec806d735de3..44d24bcfe7b8a2c56036143b7fe2dc56b247aef4 100644
--- a/Rich/RichFutureRecMonitors/src/RichDetectorHits.cpp
+++ b/Rich/RichFutureRecMonitors/src/RichDetectorHits.cpp
@@ -32,13 +32,13 @@ StatusCode DetectorHits::prebookHistograms()
   StatusCode sc = StatusCode::SUCCESS;
   for ( const auto rich : Rich::detectors() )
   {
-    sc = sc && richHisto1D( Rich::HistogramID("nTotalPixsPerPD",rich),
-                            "Average overall PD occupancy (nHits>0)",
-                            0.5, 150.5, 150 );
-    sc = sc && richHisto1D( Rich::HistogramID("nTotalPixs",rich), 
-                            "Overall occupancy (nHits>0)", 0, m_maxPixels, nBins1D() );
-    sc = sc && richHisto1D( Rich::HistogramID("nActivePDs",rich), 
-                            "# Active PDs (nHits>0)", -0.5, 300.5, 301 );
+    if ( sc ) sc = StatusCode{richHisto1D( Rich::HistogramID("nTotalPixsPerPD",rich),
+                                           "Average overall PD occupancy (nHits>0)",
+                                           0.5, 150.5, 150 ) != nullptr};
+    if ( sc ) sc = StatusCode{richHisto1D( Rich::HistogramID("nTotalPixs",rich),
+                                           "Overall occupancy (nHits>0)", 0, m_maxPixels, nBins1D() ) != nullptr};
+    if ( sc ) sc = StatusCode{richHisto1D( Rich::HistogramID("nActivePDs",rich),
+                                           "# Active PDs (nHits>0)", -0.5, 300.5, 301 ) != nullptr};
   }
 
   return sc;
@@ -78,8 +78,8 @@ void DetectorHits::operator()( const Rich::DAQ::L1Map& data ) const
           const auto rich = pd.rich();
 
           // Do we have any hits
-          if ( !rawIDs.empty() ) 
-          { 
+          if ( !rawIDs.empty() )
+          {
             // Fill average HPD occ plot
             richHisto1D( Rich::HistogramID("nTotalPixsPerPD",rich) ) -> fill(rawIDs.size());
             // count active PDs
diff --git a/Rich/RichFutureRecMonitors/src/RichPhotonCherenkovAngles.cpp b/Rich/RichFutureRecMonitors/src/RichPhotonCherenkovAngles.cpp
index 384d60a9b792f01888c2841a40385e4c5daaafa1..369613b48636a9dcdb9b8e614b2d8e3976a1a17d 100644
--- a/Rich/RichFutureRecMonitors/src/RichPhotonCherenkovAngles.cpp
+++ b/Rich/RichFutureRecMonitors/src/RichPhotonCherenkovAngles.cpp
@@ -42,7 +42,7 @@ StatusCode PhotonCherenkovAngles::initialize()
   if ( !sc ) return sc;
 
   // get tools
-  sc = sc && m_tkSel.retrieve();
+  sc = m_tkSel.retrieve();
 
   // RichDet
   m_RichSys = getDet<DeRichSystem>( DeRichLocations::RichSystem );
diff --git a/Rich/RichFutureRecMonitors/src/RichPixelClusters.cpp b/Rich/RichFutureRecMonitors/src/RichPixelClusters.cpp
index e308de91b4404ace8bb106459de17aace0c4d169..2ff8fa233bc9e80f5556b0290ee80436b5078aff 100644
--- a/Rich/RichFutureRecMonitors/src/RichPixelClusters.cpp
+++ b/Rich/RichFutureRecMonitors/src/RichPixelClusters.cpp
@@ -31,9 +31,9 @@ StatusCode PixelClusters::prebookHistograms()
 {
   StatusCode sc = StatusCode::SUCCESS;
   for ( const auto rich : Rich::detectors() )
-  { 
-    sc = sc && richHisto1D( Rich::HistogramID( "clusterSize", rich ), 
-                            "Pixel Cluster Sizes", -0.5, 100.5, 101 );
+  {
+    if ( sc ) sc = StatusCode{richHisto1D( Rich::HistogramID( "clusterSize", rich ),
+                                           "Pixel Cluster Sizes", -0.5, 100.5, 101 ) != nullptr};
   }
   return sc;
 }
@@ -48,12 +48,12 @@ void PixelClusters::operator()( const Rich::PDPixelCluster::Vector& clusters ) c
   for ( const auto & cluster : clusters )
   {
     if ( UNLIKELY( cluster.empty() ) )
-    { 
+    {
       Warning("Empty cluster !",StatusCode::SUCCESS).ignore();
     }
     else
     {
-      richHisto1D( HID("clusterSize",cluster.rich()) ) -> fill( cluster.size() ); 
+      richHisto1D( HID("clusterSize",cluster.rich()) ) -> fill( cluster.size() );
     }
   }
 
diff --git a/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterGlobalPositions.cpp b/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterGlobalPositions.cpp
index 7c33231aea8980d991ee16e1854537d9afd6f66c..cebdb41f8ca76608a3f3bb1755aa305a9e451393 100644
--- a/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterGlobalPositions.cpp
+++ b/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterGlobalPositions.cpp
@@ -21,7 +21,7 @@ using namespace Rich::Future::Rec;
 //-----------------------------------------------------------------------------
 
 PixelClusterGlobalPositions::
-PixelClusterGlobalPositions( const std::string& name, 
+PixelClusterGlobalPositions( const std::string& name,
                              ISvcLocator* pSvcLocator )
   : Transformer ( name, pSvcLocator,
                   { KeyValue{ "RichPixelClustersLocation", Rich::PDPixelClusterLocation::Default } },
@@ -39,14 +39,12 @@ StatusCode PixelClusterGlobalPositions::initialize()
   if ( !sc ) return sc;
 
   // load tools
-  sc = sc && m_idTool.retrieve();
-
-  return sc;
+  return m_idTool.retrieve();
 }
 
 //=============================================================================
 
-SpacePointVector 
+SpacePointVector
 PixelClusterGlobalPositions::operator()( const Rich::PDPixelCluster::Vector& clusters ) const
 {
   // the container to return
diff --git a/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterLocalPositions.cpp b/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterLocalPositions.cpp
index 8c04181031f4963dd0d005c5683f3ec798a06ad2..d8999f555cb6bf1e6eca9fe6acb34550f1d4e73f 100644
--- a/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterLocalPositions.cpp
+++ b/Rich/RichFutureRecPixelAlgorithms/src/RichPixelClusterLocalPositions.cpp
@@ -20,12 +20,12 @@ using namespace Rich::Future::Rec;
 // 2016-09-30 : Chris Jones
 //-----------------------------------------------------------------------------
 
-PixelClusterLocalPositions::PixelClusterLocalPositions( const std::string& name, 
+PixelClusterLocalPositions::PixelClusterLocalPositions( const std::string& name,
                                                         ISvcLocator* pSvcLocator )
   : Transformer ( name, pSvcLocator,
-                  { KeyValue{ "RichPixelGlobalPositionsLocation", 
+                  { KeyValue{ "RichPixelGlobalPositionsLocation",
                         SpacePointLocation::PixelsGlobal } },
-                  { KeyValue{ "RichPixelLocalPositionsLocation", 
+                  { KeyValue{ "RichPixelLocalPositionsLocation",
                         SpacePointLocation::PixelsLocal } } )
 {
   declareProperty( "SmartIDTool", m_idTool );
@@ -40,26 +40,24 @@ StatusCode PixelClusterLocalPositions::initialize()
   if ( !sc ) return sc;
 
   // load tools
-  sc = sc && m_idTool.retrieve();
-
-  return sc;
+  return m_idTool.retrieve();
 }
 
 //=============================================================================
 
-SpacePointVector 
+SpacePointVector
 PixelClusterLocalPositions::operator()( const SpacePointVector& gPoints ) const
 {
   // the container to return
   SpacePointVector lPoints;
   lPoints.reserve( gPoints.size() );
-  
+
   for ( const auto & gPos : gPoints )
-  { 
-    lPoints.emplace_back( m_idTool.get()->globalToPDPanel(gPos) ); 
+  {
+    lPoints.emplace_back( m_idTool.get()->globalToPDPanel(gPos) );
     _ri_debug << gPos << " -> " << lPoints.back() << endmsg;
   }
-  
+
   // return the final space points
   return lPoints;
 }
diff --git a/Rich/RichFutureRecTrackAlgorithms/src/RichDetailedTrSegMakerFromTracks.cpp b/Rich/RichFutureRecTrackAlgorithms/src/RichDetailedTrSegMakerFromTracks.cpp
index 39bd0eb5422df08e755a86f9a5fb98075cb40658..69e81134a93667550ab7bf78758134f02e70b00c 100644
--- a/Rich/RichFutureRecTrackAlgorithms/src/RichDetailedTrSegMakerFromTracks.cpp
+++ b/Rich/RichFutureRecTrackAlgorithms/src/RichDetailedTrSegMakerFromTracks.cpp
@@ -73,14 +73,14 @@ StatusCode DetailedTrSegMakerFromTracks::initialize()
 
   // load primary track extrapolator now if it is going to be used to perform
   // the state extrapolations   ( backup is loaded on-demand )
-  if ( !m_useStateProvider ) { sc = sc && m_trExt.retrieve(); }
+  if ( !m_useStateProvider ) { if ( sc ) sc = m_trExt.retrieve(); }
 
   // Load the state provider if it is to be used
-  if ( m_createMissingStates || m_useStateProvider ) { sc = sc && m_trStateP.retrieve(); }
+  if ( m_createMissingStates || m_useStateProvider ) { if ( sc ) sc = m_trStateP.retrieve(); }
 
   // load tools and services
   m_magFieldSvc = svc<IMagneticFieldSvc>("MagneticFieldSvc");
-  sc = sc && m_radTool.retrieve();
+  if ( sc ) sc = m_radTool.retrieve();
 
   // get Detector elements for RICH1 and RICH2
   m_rich[Rich::Rich1] = getDet<DeRich>( DeRichLocations::Rich1 );
@@ -710,7 +710,7 @@ DetailedTrSegMakerFromTracks::correctRadExitMirror( const DeRichRadiator* radiat
 
   // move state to be on the inside of the mirror
   _ri_verbo << "    --> Moving state first to be inside mirror" << endmsg;
-  sc = sc && moveState( state, track, state.z() - m_mirrShift[rich], refState );
+  if ( sc ) sc = moveState( state, track, state.z() - m_mirrShift[rich], refState );
 
   // find mirror intersection using the reflect method
   auto intersection = state.position();
@@ -736,12 +736,12 @@ DetailedTrSegMakerFromTracks::correctRadExitMirror( const DeRichRadiator* radiat
   if ( correct )
   {
     _ri_verbo << "    --> Found correction is needed" << endmsg;
-    sc = sc && moveState( state, track, intersection.z(), refState );
+    if ( sc ) sc = moveState( state, track, intersection.z(), refState );
   }
   else
   {
     _ri_verbo << "    --> Found correction not needed. Moving back to original position" << endmsg;
-    sc = sc && moveState( state, track, initialZ, refState );
+    if ( sc ) sc = moveState( state, track, initialZ, refState );
   }
 
   if ( !sc ) Warning( "Problem correcting segment exit to mirror intersection" ).ignore();
diff --git a/Rich/RichFutureRecTrackAlgorithms/src/RichEmittedPhotonYields.cpp b/Rich/RichFutureRecTrackAlgorithms/src/RichEmittedPhotonYields.cpp
index ac88ecad436042b6095bc29bd9a975877baec109..c43a273c17a2c1fc2c83c9be28dd479762b44d6c 100644
--- a/Rich/RichFutureRecTrackAlgorithms/src/RichEmittedPhotonYields.cpp
+++ b/Rich/RichFutureRecTrackAlgorithms/src/RichEmittedPhotonYields.cpp
@@ -39,14 +39,14 @@ StatusCode EmittedPhotonYields::initialize()
   m_Rich1DE = getDet<DeRich1>( DeRichLocations::Rich1 );
 
   // load tools
-  sc = sc && m_detParams.retrieve();
+  if ( sc ) sc = m_detParams.retrieve();
 
   // register for UMS updates
   //updMgrSvc()->registerCondition( this, m_Rich1DE, &SellmeirFunc::umsUpdate );
   // force first updates
   //sc = updMgrSvc()->update(this);
   // CRJ : UMS does not work because Rich1 has no conditions (yet)
-  sc = sc && umsUpdate();
+  if ( sc ) sc = umsUpdate();
 
   // return
   return sc;
diff --git a/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceCherenkovCones.cpp b/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceCherenkovCones.cpp
index 0b47bf75b398aa1fe1eb9c72b036933bdfa48ef1..717befcf06606673eef53fe9edf1b89d19439327 100644
--- a/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceCherenkovCones.cpp
+++ b/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceCherenkovCones.cpp
@@ -38,7 +38,8 @@ StatusCode RayTraceCherenkovCones::initialize()
   if ( !sc ) return sc;
 
   // load tools
-  sc = sc && m_rayTrace.retrieve() && m_idTool.retrieve();
+  if ( sc ) sc = m_rayTrace.retrieve();
+  if ( sc ) sc = m_idTool.retrieve();
 
   // loop over radiators
   for ( const auto rad : Rich::radiators() )
diff --git a/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackGlobalPoints.cpp b/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackGlobalPoints.cpp
index fcffd551014f42e8526716b5087863ec7fe7d817..e1c527897df2fde284aa97edf04d219e78a97029 100644
--- a/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackGlobalPoints.cpp
+++ b/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackGlobalPoints.cpp
@@ -17,7 +17,7 @@ using namespace Rich::Future::Rec;
 
 //=============================================================================
 
-RayTraceTrackGlobalPoints::RayTraceTrackGlobalPoints( const std::string& name, 
+RayTraceTrackGlobalPoints::RayTraceTrackGlobalPoints( const std::string& name,
                                                       ISvcLocator* pSvcLocator )
   : Transformer ( name, pSvcLocator,
                   { KeyValue{ "TrackSegmentsLocation",     LHCb::RichTrackSegmentLocation::Default } },
@@ -40,7 +40,7 @@ StatusCode RayTraceTrackGlobalPoints::initialize()
   if ( !sc ) return sc;
 
   // load tools
-  sc = sc && m_rayTrace.retrieve();
+  if ( sc ) sc = m_rayTrace.retrieve();
 
   // track ray tracing
   m_traceMode[Rich::Aerogel].setAeroRefraction(true);
@@ -61,7 +61,7 @@ StatusCode RayTraceTrackGlobalPoints::initialize()
 //=============================================================================
 
 SegmentPanelSpacePoints::Vector
-RayTraceTrackGlobalPoints::operator()( const LHCb::RichTrackSegment::Vector& segments ) const 
+RayTraceTrackGlobalPoints::operator()( const LHCb::RichTrackSegment::Vector& segments ) const
 {
   // the global points to return
   SegmentPanelSpacePoints::Vector points;
@@ -77,11 +77,11 @@ RayTraceTrackGlobalPoints::operator()( const LHCb::RichTrackSegment::Vector& seg
     // rich and radiator
     const auto rich = trSeg.rich();
     const auto rad  = trSeg.radiator();
-    
+
     // best start point and direction
     const auto & trackDir = trSeg.bestMomentum();
     const auto & trackPtn = trSeg.bestPoint();
-    
+
     // ray trace the best point
     auto result = m_rayTrace.get()->traceToDetector( rich, trackPtn, trackDir, photon,
                                                      trSeg, m_traceMode[rad],
@@ -89,28 +89,28 @@ RayTraceTrackGlobalPoints::operator()( const LHCb::RichTrackSegment::Vector& seg
     const auto OK = m_traceMode[rad].traceWasOK(result);
     if ( OK )
     {
-      
+
       // save point and side for the best tracing
       const auto bestPoint = photon.detectionPoint();
       const auto bestSide  = photon.smartID().panel();
 
       // closest PD
       const auto closestPD = photon.smartID().pdID();
-      
+
       // Now do the forced left/right up/down tracings
-      
+
       // left/top
       result = m_rayTrace.get()->traceToDetector( rich, trackPtn, trackDir, photon,
                                                   trSeg, m_fTraceMode[rad],
                                                   Rich::left );
-      const auto lPos = ( m_fTraceMode[rad].traceWasOK(result) ? 
+      const auto lPos = ( m_fTraceMode[rad].traceWasOK(result) ?
                           photon.detectionPoint() : SpacePoint{0,0,0} );
-      
+
       // right/bottom
       result = m_rayTrace.get()->traceToDetector( rich, trackPtn, trackDir, photon,
                                                   trSeg, m_fTraceMode[rad],
                                                   Rich::right );
-      const auto rPos = ( m_fTraceMode[rad].traceWasOK(result) ? 
+      const auto rPos = ( m_fTraceMode[rad].traceWasOK(result) ?
                           photon.detectionPoint() : SpacePoint{0,0,0} );
 
       // save the data
diff --git a/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackLocalPoints.cpp b/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackLocalPoints.cpp
index fba51f8731b06e045d4784999b6be53427621094..10e127cadae602c35f4f823d969c5a76ea517686 100644
--- a/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackLocalPoints.cpp
+++ b/Rich/RichFutureRecTrackAlgorithms/src/RichRayTraceTrackLocalPoints.cpp
@@ -17,7 +17,7 @@ using namespace Rich::Future::Rec;
 
 //=============================================================================
 
-RayTraceTrackLocalPoints::RayTraceTrackLocalPoints( const std::string& name, 
+RayTraceTrackLocalPoints::RayTraceTrackLocalPoints( const std::string& name,
                                                       ISvcLocator* pSvcLocator )
   : Transformer ( name, pSvcLocator,
                   { KeyValue{ "TrackGlobalPointsLocation", SpacePointLocation::SegmentsGlobal } },
@@ -35,16 +35,13 @@ StatusCode RayTraceTrackLocalPoints::initialize()
   if ( !sc ) return sc;
 
   // load tools
-  sc = sc && m_idTool.retrieve();
-
-  // return
-  return sc;
+  return m_idTool.retrieve();
 }
 
 //=============================================================================
 
 SegmentPanelSpacePoints::Vector
-RayTraceTrackLocalPoints::operator()( const SegmentPanelSpacePoints::Vector& gPoints ) const 
+RayTraceTrackLocalPoints::operator()( const SegmentPanelSpacePoints::Vector& gPoints ) const
 {
   SegmentPanelSpacePoints::Vector lPoints;
   lPoints.reserve( gPoints.size() );
@@ -58,7 +55,7 @@ RayTraceTrackLocalPoints::operator()( const SegmentPanelSpacePoints::Vector& gPo
       lPoints.emplace_back( m_idTool.get()->globalToPDPanel( gPoint.point() ),
                             m_idTool.get()->globalToPDPanel( gPoint.point(Rich::left)  ),
                             m_idTool.get()->globalToPDPanel( gPoint.point(Rich::right) ),
-                            gPoint.bestSide(), gPoint.closestPD() ); 
+                            gPoint.bestSide(), gPoint.closestPD() );
     }
     else
     {
@@ -66,7 +63,7 @@ RayTraceTrackLocalPoints::operator()( const SegmentPanelSpacePoints::Vector& gPo
       lPoints.emplace_back( );
     }
   }
-  
+
   return lPoints;
 }
 
diff --git a/Rich/RichFutureRecTrackAlgorithms/src/RichTrackCherenkovAngles.cpp b/Rich/RichFutureRecTrackAlgorithms/src/RichTrackCherenkovAngles.cpp
index d14e87fc11c6448188eb13e53f1167ad7f16a6bc..e83e9f48bf5e0f3399a7e56c1e383de262bd6dc3 100644
--- a/Rich/RichFutureRecTrackAlgorithms/src/RichTrackCherenkovAngles.cpp
+++ b/Rich/RichFutureRecTrackAlgorithms/src/RichTrackCherenkovAngles.cpp
@@ -25,10 +25,7 @@ StatusCode TrackCherenkovAnglesBase::initialize()
   if ( !sc ) return sc;
 
   // load tools
-  sc = sc && m_refIndex.retrieve();
-
-  // return
-  return sc;
+  return m_refIndex.retrieve();
 }
 
 //=============================================================================
@@ -67,35 +64,34 @@ TrackCherenkovAnglesBase::run( const LHCb::RichTrackSegment::Vector& segments,
       {
 
         //_ri_verbo << std::setprecision(9) << id << " yield = " << yields[id] << endmsg;
-      
+
         // compute track beta
         const auto beta = richPartProps()->beta( segment.bestMomentumMag(), id );
         if ( beta > 0 )
         {
-          
+
           // loop over energy bins
           for ( unsigned int iEnBin = 0; iEnBin < spectra.energyBins(); ++iEnBin )
           {
-            const auto refIn = m_refIndex.get()->refractiveIndex( segment.radIntersections(), 
+            const auto refIn = m_refIndex.get()->refractiveIndex( segment.radIntersections(),
                                                                   spectra.binEnergy(iEnBin) );
             const auto temp = beta * refIn;
             //_ri_verbo << std::setprecision(9)
             //          << " bin " << iEnBin << " " << beta << " " << refIn << endmsg;
-            if ( temp>1 ) 
+            if ( temp>1 )
             {
               const auto f  = vdt::fast_acos(1.0/temp);
               const auto en = (spectra.energyDist(id))[iEnBin];
               //_ri_verbo << std::setprecision(9) << "     " << " " << f << " " << en << endmsg;
               angle += ( en * f );
             }
-          }   
+          }
           // normalise the angle
           angle /= yields[id];
-          
+
         }
 
       }
-      
       // save the final angle for this hypo
       //_ri_verbo << std::setprecision(9) << id << " CK theta " << angle << endmsg;
       angles.setData(id,angle);
diff --git a/Rich/RichFutureRecTrackAlgorithms/src/RichTrackFunctionalCherenkovResolutions.cpp b/Rich/RichFutureRecTrackAlgorithms/src/RichTrackFunctionalCherenkovResolutions.cpp
index 284c0021f46cd275cd6cb94df272c094f226d4c5..9a48f3622bf534b529fcd861634d29a337fb7ef5 100644
--- a/Rich/RichFutureRecTrackAlgorithms/src/RichTrackFunctionalCherenkovResolutions.cpp
+++ b/Rich/RichFutureRecTrackAlgorithms/src/RichTrackFunctionalCherenkovResolutions.cpp
@@ -25,7 +25,7 @@ TrackFunctionalCherenkovResolutions( const std::string& name,
                     KeyValue{ "SignalCherenkovAnglesLocation", CherenkovAnglesLocation::Signal },
                     KeyValue{ "MassHypothesisRingsLocation",   MassHypoRingsLocation::Emitted } },
                   { KeyValue{ "CherenkovResolutionsLocation", CherenkovResolutionsLocation::Default } } )
-{ 
+{
   declareProperty( "RefractiveIndexTool", m_refIndex  );
   declareProperty( "DetParametersTool",   m_detParams );
   // debug
@@ -41,7 +41,8 @@ StatusCode TrackFunctionalCherenkovResolutions::initialize()
   if ( !sc ) return sc;
 
   // get tools
-  sc = sc && m_refIndex.retrieve() && m_detParams.retrieve();
+  if ( sc ) sc = m_refIndex.retrieve();
+  if ( sc ) sc = m_detParams.retrieve();
 
   // services
   m_transSvc = svc<ITransportSvc>( "TransportSvc", true  );
@@ -51,7 +52,7 @@ StatusCode TrackFunctionalCherenkovResolutions::initialize()
 
   // Create accelerator cache for the transport service
   auto tsCache = m_transSvc->createCache();
-  
+
   // Fixed vector start/end points for each radiator
   const RadiatorArray< std::pair<Gaudi::XYZPoint,Gaudi::XYZPoint> > radVs
   {{
@@ -59,7 +60,7 @@ StatusCode TrackFunctionalCherenkovResolutions::initialize()
       { { 150, 150, 1500  }, { 150, 150, 1700  } }, // RICH1 gas
       { { 500, 500, 10000 }, { 500, 500, 11000 } }  // RICH2 gas
     }};
-  // Use the fixed vectors to compute from the TS the radiation length / mm 
+  // Use the fixed vectors to compute from the TS the radiation length / mm
   // in each RICH radiator medium
   for ( const auto rad : Rich::radiators() )
   {
@@ -70,7 +71,7 @@ StatusCode TrackFunctionalCherenkovResolutions::initialize()
                                                           tsCache, 0, altGeom() );
       const auto length = std::sqrt( ( radVs[rad].second - radVs[rad].first ) .mag2() );
       m_radLenPerUnitL[rad] = ( length > 0 ? effL/length : 0.0 );
-      _ri_debug << std::setprecision(9) 
+      _ri_debug << std::setprecision(9)
                 << rad << " radiation length / mm = " << m_radLenPerUnitL[rad] << endmsg;
     }
   }
@@ -85,7 +86,7 @@ CherenkovResolutions::Vector
 TrackFunctionalCherenkovResolutions::
 operator()( const LHCb::RichTrackSegment::Vector& segments,
             const CherenkovAngles::Vector& ckAngles,
-            const MassHypoRingsVector& massRings ) const 
+            const MassHypoRingsVector& massRings ) const
 {
   using namespace Gaudi::Units;
 
@@ -138,7 +139,7 @@ operator()( const LHCb::RichTrackSegment::Vector& segments,
         // Full TS treatment ...
         try { effL = m_transSvc->distanceInRadUnits_r( segment.entryPoint(),
                                                        segment.exitPoint(),
-                                                       tsCache, 0, altGeom() ); }  
+                                                       tsCache, 0, altGeom() ); }
         catch ( const TransportSvcException & excpt )
         {
           Warning( "Problem computing radiation length : " + excpt.message() ).ignore();
@@ -153,19 +154,19 @@ operator()( const LHCb::RichTrackSegment::Vector& segments,
         //_ri_debug << std::setprecision(9) << " Scattering error = " << scattErr << endmsg;
         res2 += scattErr;
       }
-      
+
       //-------------------------------------------------------------------------------
       // track curvature in the radiator volume
       //-------------------------------------------------------------------------------
-      const auto curvErr = 
+      const auto curvErr =
         ( Rich::Aerogel == rad ? 0 :
           std::pow( Rich::Geom::AngleBetween( segment.entryMomentum(),
                                               segment.exitMomentum() ) * 0.25, 2 ) );
       //_ri_debug << std::setprecision(9) << " Curvature error = " << curvErr << endmsg;
       res2 += curvErr;
-        
+
       //-------------------------------------------------------------------------------
-      
+
       //-------------------------------------------------------------------------------
       // tracking direction errors
       //-------------------------------------------------------------------------------
@@ -179,11 +180,11 @@ operator()( const LHCb::RichTrackSegment::Vector& segments,
       {
         // start with the hypo independent part
         double hypo_res2 = res2;
-        
+
         //-------------------------------------------------------------------------------
         // RICH contributions (pixel, PSF errors etc...)
         // Uses the supplied reference contribution for the given pixel area, and scales
-        // according to the area for the associated PD  
+        // according to the area for the associated PD
         //-------------------------------------------------------------------------------
         auto pdErr = std::pow( m_pdErr[rad], 2 );
         // Are we using the full treatment to deal with PD size difference ?
@@ -210,20 +211,19 @@ operator()( const LHCb::RichTrackSegment::Vector& segments,
               }
             }
             // Scale PD errors by average pixel size using reference size
-            if ( totalInPD > 0 ) 
+            if ( totalInPD > 0 )
             {
               totalSize /= (double)totalInPD;
               pdErr *= totalSize / m_pdRefArea[rad];
             }
-          } 
+          }
         }
         //_ri_debug << std::setprecision(9) << " HPD error = " << pdErr << endmsg;
         hypo_res2 += pdErr;
-        
+
         // Expected CK theta
         if ( angles[hypo] > 1e-6 )
         {
-          
           // cache tan(cktheta)
           const auto tanCkExp = vdt::fast_tan(angles[hypo]);
           //_ri_debug << std::setprecision(9) << "  " << hypo
@@ -266,9 +266,9 @@ operator()( const LHCb::RichTrackSegment::Vector& segments,
         res.setData( hypo, ckRes );
 
       } // hypo loop
-      
+
     }
-    
+
   }
 
   return resV;
diff --git a/Tf/PatAlgorithms/src/PatMakeV0.cpp b/Tf/PatAlgorithms/src/PatMakeV0.cpp
index 7be59df4ca1d3ddff16e1d614f63c8db0a279dfe..c63653f4f2b746a72a2f7ba1b92d650a7d365468 100644
--- a/Tf/PatAlgorithms/src/PatMakeV0.cpp
+++ b/Tf/PatAlgorithms/src/PatMakeV0.cpp
@@ -406,7 +406,7 @@ StatusCode PatMakeV0::execute() {
 
   selectSols();
 
-  return SUCCESS;
+  return StatusCode::SUCCESS;
 }
 
 //============================================================
diff --git a/Tf/TfTools/src/component/ResetHits.cpp b/Tf/TfTools/src/component/ResetHits.cpp
index aee7ccc04b2fc72e979f0ba8528ceba831430348..d5c984cf80b62bb8191c65a439ba2c63773a829a 100644
--- a/Tf/TfTools/src/component/ResetHits.cpp
+++ b/Tf/TfTools/src/component/ResetHits.cpp
@@ -31,12 +31,12 @@ ResetHits::ResetHits( const std::string& name,
     m_othitcreator   ( "Tf::OTHitCreator/OTHitCreator" ),
     m_ithitcreator   ( "Tf::STHitCreator<Tf::IT>/ITHitCreator" ),
     m_tthitcreator   ( "Tf::STHitCreator<Tf::TT>/TTHitCreator")
-{ 
-  declareProperty( "ResetVeloHits",       m_veloHits = true ); 
+{
+  declareProperty( "ResetVeloHits",       m_veloHits = true );
   declareProperty( "ResetTTHits",         m_TTHits   = true );
   declareProperty( "ResetOTHits",         m_OTHits   = true );
   declareProperty( "ResetITHits",         m_ITHits   = true );
-  
+
 }
 //=============================================================================
 // Destructor
@@ -53,12 +53,9 @@ StatusCode ResetHits::initialize() {
   if(msgLevel(MSG::DEBUG)) debug() << "==> Initialize" << endmsg;
 
   // load our hit creators
-    sc = ( m_othitcreator.retrieve() &&
-           m_ithitcreator.retrieve() &&
-	   m_tthitcreator.retrieve());
-    if ( sc.isFailure() ) return sc;
-  
-  return StatusCode::SUCCESS;
+  return StatusCode{m_othitcreator.retrieve() &&
+                    m_ithitcreator.retrieve() &&
+	            m_tthitcreator.retrieve()};
 }
 
 
@@ -68,12 +65,12 @@ StatusCode ResetHits::initialize() {
 StatusCode ResetHits::execute() {
 
   if (m_OTHits)
-   m_othitcreator->resetUsedFlagOfHits(); 
+   m_othitcreator->resetUsedFlagOfHits();
   if (m_ITHits)
    m_ithitcreator->resetUsedFlagOfHits();
   if (m_TTHits)
    m_tthitcreator->resetUsedFlagOfHits();
-  
+
   return StatusCode::SUCCESS;
 }
 
diff --git a/Tr/TrackExtrapolators/src/MaterialLocatorBase.cpp b/Tr/TrackExtrapolators/src/MaterialLocatorBase.cpp
index d12c53689b8a624af7583acbe421f37ecb32188b..daef7b74c39ade060c8c69b823320657fd61ff79 100644
--- a/Tr/TrackExtrapolators/src/MaterialLocatorBase.cpp
+++ b/Tr/TrackExtrapolators/src/MaterialLocatorBase.cpp
@@ -47,10 +47,11 @@ StatusCode MaterialLocatorBase::initialize()
   m_dedxtool       = tool<IStateCorrectionTool>( m_dedxtoolname, "GeneralDedxTool", this);
   m_scatteringTool = tool<IStateCorrectionTool>( m_msCorrectionToolName, "StateMSCorrectionTool", this );
 
-  sc = sc && m_tSvc.retrieve();
-  m_accelCache = m_tSvc->createCache();
+  if ( sc ) sc = m_tSvc.retrieve();
+  if ( sc ) m_accelCache = m_tSvc->createCache();
 
-  return sc && m_elecdedxtool.retrieve() ;
+  if ( sc ) sc = m_elecdedxtool.retrieve();
+  return sc;
 }
 
 size_t MaterialLocatorBase::intersect_r( const Gaudi::XYZPoint& p,
diff --git a/Tr/TrackMonitors/src/TrackVertexMonitor.cpp b/Tr/TrackMonitors/src/TrackVertexMonitor.cpp
index 5ef2feadca865e4594f1bb40b6c090ee77f7cafb..7889943bdb4b928eddc543729525b69e9a14ef1e 100755
--- a/Tr/TrackMonitors/src/TrackVertexMonitor.cpp
+++ b/Tr/TrackMonitors/src/TrackVertexMonitor.cpp
@@ -187,7 +187,7 @@ StatusCode TrackVertexMonitor::initialize()
 //=============================================================================
 StatusCode TrackVertexMonitor::finalize()
 {
-  return m_vertexer.release() && GaudiHistoAlg::finalize() ;
+  return StatusCode{m_vertexer.release() && GaudiHistoAlg::finalize()};
 }
 
 namespace {
diff --git a/Tr/TrackTools/src/HltV0Upgrade.cpp b/Tr/TrackTools/src/HltV0Upgrade.cpp
index 054e1000294f751e8124ba81b6cb075b0891ede3..faf26f25f5c5851afdb8ce72fa619c2c2a74fbe4 100644
--- a/Tr/TrackTools/src/HltV0Upgrade.cpp
+++ b/Tr/TrackTools/src/HltV0Upgrade.cpp
@@ -67,7 +67,7 @@ StatusCode HltV0Upgrade::process( LHCb::TwoProngVertex& vertex ) const
   LHCb::Track* trackB = const_cast<LHCb::Track*>(vertex.trackB()) ;
 
   // fit the tracks if necessary
-  sc = fittrack(*trackA) && fittrack(*trackB) ;
+  sc = StatusCode{fittrack(*trackA) && fittrack(*trackB)};
 
   // only do the rest if both tracks fitted successfully
   if( sc.isSuccess() ) {
diff --git a/Tr/TrackUtils/src/NumberOfTracksFilter.cpp b/Tr/TrackUtils/src/NumberOfTracksFilter.cpp
index 4f808cafd55597c26449b3dabc22f636635c8526..5d3e6943b5b4bf72d3901a71cc28674eb0cd2723 100644
--- a/Tr/TrackUtils/src/NumberOfTracksFilter.cpp
+++ b/Tr/TrackUtils/src/NumberOfTracksFilter.cpp
@@ -72,7 +72,7 @@ StatusCode NumberOfTracksFilter::execute() {
                             [&](int n, const std::string& p) {
     LHCb::Track::Container* inTracks = getIfExists< LHCb::Track::Container>(p);
     if ( !inTracks ){
-      Warning("No tracks at "+p,1).ignore();
+      Warning("No tracks at "+p, StatusCode::SUCCESS).ignore();
     } else {
       if (msgLevel(MSG::VERBOSE)) verbose() << "Container " << p << " contains "
                                             << inTracks->size() << " Tracks" << endmsg ;