From ad3407b71db411b721892bcfca571fe9c2a8ef38 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 18 Aug 2016 18:39:33 +0100 Subject: [PATCH] Small changes to support building against a 64 bit RichSmartID --- Rich/RichTools/src/RichHPDHotPixelFinder.cpp | 2 +- Rich/RichTools/src/RichHPDOccupancyTool.cpp | 10 +++++----- Rich/RichTools/src/RichHPDOccupancyTool.h | 1 + Rich/RichTools/src/RichSmartIDTool.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Rich/RichTools/src/RichHPDHotPixelFinder.cpp b/Rich/RichTools/src/RichHPDHotPixelFinder.cpp index 4edf60be1..d6de15cc9 100755 --- a/Rich/RichTools/src/RichHPDHotPixelFinder.cpp +++ b/Rich/RichTools/src/RichHPDHotPixelFinder.cpp @@ -101,7 +101,7 @@ void HPDHotPixelFinder::findHotPixels() _ri_verbo << " -> pixel is hot ...." << endmsg; std::ostringstream mess; HPDC.first.fillStream(mess,false); // No bits in both opt and dbg builds - mess << " (" << (unsigned int)(HPDC.first) << ") At least " + mess << " (" << HPDC.first.key() << ") At least " << 100.0*m_hotOcc << "% hot in " << m_nEventsForAverage << " events"; // make result object diff --git a/Rich/RichTools/src/RichHPDOccupancyTool.cpp b/Rich/RichTools/src/RichHPDOccupancyTool.cpp index 44a111cb0..7acde74c0 100755 --- a/Rich/RichTools/src/RichHPDOccupancyTool.cpp +++ b/Rich/RichTools/src/RichHPDOccupancyTool.cpp @@ -139,9 +139,8 @@ StatusCode HPDOccupancyTool::umsUpdateRICH2() StatusCode HPDOccupancyTool::initOccMap( const Rich::DetectorType rich ) { - if ( msgLevel(MSG::VERBOSE) ) - verbose() << "Update triggered for " << rich - << " HPD average occupancies" << endmsg; + _ri_verbo << "Update triggered for " << rich + << " HPD average occupancies" << endmsg; // clear the map m_occMap[rich].clear(); @@ -160,7 +159,8 @@ StatusCode HPDOccupancyTool::initOccMap( const Rich::DetectorType rich ) try { // extract numbers from string - const LHCb::RichSmartID HPD( std::stoi( s.substr(0,slash) ) ); + const LHCb::RichSmartID::KeyType key( std::stoi( s.substr(0,slash) ) ); + const LHCb::RichSmartID HPD( key ); const double occ{ std::stod( s.substr(slash+1) ) }; // update local data map @@ -310,7 +310,7 @@ void HPDOccupancyTool::createHPDBackXML( const Rich::DetectorType rich ) const if ( d.fillCount() > m_minFills ) { std::ostringstream entry; - entry << (int)s.first << "/" << occ; // force key to be printed as a _signed_ int... + entry << (int64_t)s.first << "/" << occ; // force key to be printed as a _signed_ int... entries.push_back( entry.str() ); } } diff --git a/Rich/RichTools/src/RichHPDOccupancyTool.h b/Rich/RichTools/src/RichHPDOccupancyTool.h index 65006b8bc..200b7a48a 100755 --- a/Rich/RichTools/src/RichHPDOccupancyTool.h +++ b/Rich/RichTools/src/RichHPDOccupancyTool.h @@ -14,6 +14,7 @@ // STD #include +#include // from Gaudi #include "GaudiKernel/IToolSvc.h" diff --git a/Rich/RichTools/src/RichSmartIDTool.cpp b/Rich/RichTools/src/RichSmartIDTool.cpp index 6f471b7e5..402ac4c4e 100755 --- a/Rich/RichTools/src/RichSmartIDTool.cpp +++ b/Rich/RichTools/src/RichSmartIDTool.cpp @@ -183,7 +183,7 @@ Rich::SmartIDTool::smartID ( const Gaudi::XYZPoint& globalPoint, Error ( "Caught GaudiException " + excpt.tag() + " message '" + excpt.message() + "'" ); // reset smartid to an invalid one - smartid = LHCb::RichSmartID(0); + smartid = LHCb::RichSmartID( LHCb::RichSmartID::KeyType(0) ); // return failure status return false; -- GitLab