Skip to content
Snippets Groups Projects
Commit 61b0ffcd authored by Daniel Charles Craik's avatar Daniel Charles Craik Committed by Rosen Matev
Browse files

Initial attempt at decoding lumi schemas defined in JSON

parent 41335c09
No related branches found
No related tags found
1 merge request!3518Extend HltLumiSummary decoding to Run 3 format
......@@ -25,6 +25,7 @@ gaudi_add_module(LumiEvent
LHCb::LHCbAlgsLib
LHCb::DAQEventLib
LHCb::LumiEventLib
LHCb::HltInterfaces
)
gaudi_add_dictionary(LumiEventDict
......
......@@ -14,6 +14,7 @@
#include "Event/LumiSummaryOffsets_V2.h"
#include "Event/RawBank.h"
#include "Event/RawEvent.h"
#include "Kernel/IIndexedLumiSchemaSvc.h"
#include "LHCbAlgs/Transformer.h"
......@@ -106,9 +107,10 @@ namespace LHCb {
auto encodingKey = getField( LHCb::LumiSummaryOffsets::V2::encodingKeyOffset,
LHCb::LumiSummaryOffsets::V2::encodingKeySize, ibank->data() );
if ( encodingKey != 0 ) {
// TODO add new decoding here
warning() << "TCK-based lumiSummary bank decoding not yet implemented."
<< "Unable to decode bank" << endmsg;
auto lumi_schema = m_svc->lumiCounters( encodingKey, 2 );
for ( auto cntr : lumi_schema.counters ) {
hltLumiSummary.addInfo( cntr.name, getField( cntr.offset, cntr.size, ibank->data() ) );
}
} else {
if ( ibank->size() != LHCb::LumiSummaryOffsets::V2::TotalSize ) {
warning() << "Bank size incorrect for HltLumiSummary V2: expected "
......@@ -205,6 +207,8 @@ namespace LHCb {
}
private:
ServiceHandle<IIndexedLumiSchemaSvc> m_svc{this, "DecoderMapping", "HltANNSvc"};
// Statistics, mutable to allow statistics to be kept
mutable Gaudi::Accumulators::AveragingCounter<> m_totDataSize{this, "Average event size / 32-bit words"};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment