Skip to content
Snippets Groups Projects

Fix getSourceID for HltLumiSummary (follow !4119 !4141)

Merged Rosen Matev requested to merge rm-follow-4119-2 into master
All threads resolved!
1 file
+ 14
1
Compare changes
  • Side-by-side
  • Inline
@@ -11,6 +11,7 @@
#pragma once
#include "Event/PackedData.h"
#include "Event/RawBank.h"
#include <GaudiKernel/GaudiException.h>
#include <GaudiKernel/StatusCode.h>
#include <GaudiKernel/StringKey.h>
#include <iomanip>
@@ -108,6 +109,14 @@ namespace LHCb::Hlt::DAQ {
: b.version() == 2 ? SourceID{( static_cast<unsigned int>( b.sourceID() ) >> 13 )}
: SourceID{extract<v3::SourceIDMasks::Process>( b.sourceID() )};
}
template <>
inline SourceID getSourceID<RawBank::HltLumiSummary>( const RawBank& b ) {
return b.version() < 2 ? SourceID::Dummy : SourceID{extract<v3::SourceIDMasks::Process>( b.sourceID() )};
}
template <>
inline SourceID getSourceID<RawBank::HltRoutingBits>( const RawBank& b ) {
return SourceID{extract<v3::SourceIDMasks::Process>( b.sourceID() )};
}
inline SourceID getSourceID( RawBank const& b ) {
switch ( b.type() ) {
@@ -115,10 +124,14 @@ namespace LHCb::Hlt::DAQ {
return getSourceID<RawBank::HltSelReports>( b );
case RawBank::HltDecReports:
return getSourceID<RawBank::HltDecReports>( b );
case RawBank::HltLumiSummary:
return getSourceID<RawBank::HltLumiSummary>( b );
case RawBank::HltRoutingBits:
return getSourceID<RawBank::HltRoutingBits>( b );
case RawBank::DstData:
return getSourceID<RawBank::DstData>( b );
default:
return SourceID::Dummy;
throw GaudiException( "Raw bank type " + b.typeName() + " not known", __PRETTY_FUNCTION__, StatusCode::FAILURE );
}
}
Loading