diff --git a/Rich/RichFutureDAQ/src/lib/RichTel40CableMapping.cpp b/Rich/RichFutureDAQ/src/lib/RichTel40CableMapping.cpp index 13d59435dc679f48801febee42906d6479f12b09..ffc6006b15fcd5f358e9e563ebff5f38263be19d 100644 --- a/Rich/RichFutureDAQ/src/lib/RichTel40CableMapping.cpp +++ b/Rich/RichFutureDAQ/src/lib/RichTel40CableMapping.cpp @@ -26,6 +26,10 @@ if ( messenger() ) { ri_debug( __VA_ARGS__ ); } #define verbo( ... ) \ if ( messenger() ) { ri_verbo( __VA_ARGS__ ); } +#define warning( ... ) \ + if ( messenger() ) { ri_warning( __VA_ARGS__ ); } +#define info( ... ) \ + if ( messenger() ) { ri_info( __VA_ARGS__ ); } // boost #include "boost/container/static_vector.hpp" @@ -156,21 +160,23 @@ void Tel40CableMapping::fillCableMaps( const LHCb::Detector::DeLHCb& LHCb::RichSmartID smartID( rich, panel, LHCb::RichSmartID::MaPMTID ); smartID.setLargePMT( isLargePMT ); + // Is link active. Start with value in RICH condition. + bool linkIsActive = ( 0 != status ); #ifdef USE_DD4HEP // Use link status flag from general LHCb condition instead of from RICH condition. const auto linksActive = lhcb.tell40link( sourceID.data() ); if ( !linksActive.has_value() ) { - throw Rich::Exception( "Source ID '" + std::to_string( sourceID.data() ) + - "' is missing in LHCb Tel40 Link condition data" ); + warning( "Source ID '", sourceID.data(), "' is missing in LHCb Tel40 Link condition", endmsg ); + } else { + // LHCb general condition has this source ID so use its value instead. + linkIsActive = linksActive.value().isEnabled( link.data() ); + // temporary sanity check + assert( status == linkIsActive ); } - const bool linkIsActive = linksActive.value().isEnabled( link.data() ); - // temporary sanity check - assert( status == linkIsActive ); #else // with DetDesc just use RICH value // Eventually once DetDesc is dropped the use of the RICH status code can be dropped // entirely both here and from the condition itself in dd4hep. - const bool linkIsActive = ( 0 != status ); #endif // link data struct