From 190cc4c515ef19a7c51b22e63e47583577d5c32f Mon Sep 17 00:00:00 2001 From: Sasha Mazurov <Alexander.Mazurov@cern.ch> Date: Wed, 17 Jun 2015 11:07:03 +0200 Subject: [PATCH] PpmByteStreamReadV1V2Tool.cxx: - Follow to the new ROD specification where pedestal correction bit is enabled for encodings 0,1,2 and 6 (TrigT1CaloByteStream-00-09-37-01) * PpmByteStreamReadV1V2Tool.cxx: - Follow to the new ROD specification where pedestal correction bit is enabled for encodings 0,1,2 and 6 * Tagged as TrigT1CaloByteStream-00-09-37-01 2015-06-05 Alexander Mazurov <alexander.mazurov@cern.ch> * ReadLVL1CaloBSRun2_jobOptions.py: - Typo in type name for CPMTowersOverlap key in StoreGate * Disable coverity errors for misused enums * Tagged as TrigT1CaloByteStream-00-09-37 2015-05-21 Alexander Mazurov <alexander.mazurov@cern.ch> * TrigT1CaloByteStream_entries.cxx: - Fix for RUN1: enable CPM towers processing * Tagged as TrigT1CaloByteStream-00-09-36 --- .../share/ReadLVL1CaloBSRun2_jobOptions.py | 2 +- .../TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx | 6 ++++++ .../TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx | 6 ++++++ .../TrigT1CaloByteStream/src/JepRoiByteStreamTool.cxx | 3 +++ .../src/components/TrigT1CaloByteStream_entries.cxx | 6 +++--- .../src/xaod/PpmByteStreamReadV1V2Tool.cxx | 5 ++++- .../TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.h | 1 + 7 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/share/ReadLVL1CaloBSRun2_jobOptions.py b/Trigger/TrigT1/TrigT1CaloByteStream/share/ReadLVL1CaloBSRun2_jobOptions.py index b44502a9997..b9df421e77c 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/share/ReadLVL1CaloBSRun2_jobOptions.py +++ b/Trigger/TrigT1/TrigT1CaloByteStream/share/ReadLVL1CaloBSRun2_jobOptions.py @@ -56,7 +56,7 @@ ByteStreamAddressProviderSvc.TypeNames += [ "xAOD::TriggerTowerAuxContainer/xAOD ByteStreamAddressProviderSvc.TypeNames += [ "xAOD::CPMTowerContainer/CPMTowers" ] ByteStreamAddressProviderSvc.TypeNames += [ "xAOD::CPMTowerAuxContainer/CPMTowersAux." ] -ByteStreamAddressProviderSvc.TypeNames += [ "xAOD::CPMTowerAuxContainer/CPMTowersOverlap" ] +ByteStreamAddressProviderSvc.TypeNames += [ "xAOD::CPMTowerContainer/CPMTowersOverlap" ] ByteStreamAddressProviderSvc.TypeNames += [ "xAOD::CPMTowerAuxContainer/CPMTowersOverlapAux." ] # ============================================================================= # CMXCPTOB diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx index 094af14d8ec..e4683ec4aee 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamTool.cxx @@ -836,6 +836,9 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock, if (source >= m_modules) { if (summing == CmmSubBlock::CRATE && source != CmmEnergySubBlock::LOCAL) continue; + // coverity[mixed_enums : FALSE] + // coverity[switch_on_enum : FALSE] + // coverity[first_enum_type : FALSE] switch (source) { case CmmEnergySubBlock::LOCAL: dataID = LVL1::CMMEtSums::LOCAL; @@ -859,6 +862,9 @@ void JepByteStreamTool::decodeCmmEnergy(CmmEnergySubBlock* subBlock, LVL1::DataError exErrBits(ssError); LVL1::DataError eyErrBits(ssError); LVL1::DataError etErrBits(ssError); + // coverity[mixed_enums : FALSE] + // coverity[switch_on_enum : FALSE] + // coverity[first_enum_type : FALSE] if (dataID == LVL1::CMMEtSums::LOCAL || dataID == LVL1::CMMEtSums::REMOTE || dataID == LVL1::CMMEtSums::TOTAL) { diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx index 037e2015e0b..989b65a2767 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepByteStreamV1Tool.cxx @@ -492,6 +492,9 @@ StatusCode JepByteStreamV1Tool::convert(const LVL1::JEPBSCollectionV1* const jep if (summing == CmmSubBlock::CRATE && dataID != LVL1::CMMJetHits::LOCAL_MAIN && dataID != LVL1::CMMJetHits::LOCAL_FORWARD) continue; + // coverity[mixed_enums : FALSE] + // coverity[switch_on_enum : FALSE] + // coverity[first_enum_type : FALSE] switch (dataID) { case LVL1::CMMJetHits::LOCAL_MAIN: source = CmmJetSubBlock::LOCAL_MAIN; @@ -1130,6 +1133,9 @@ void JepByteStreamV1Tool::decodeCmmJet(CmmJetSubBlock* subBlock, int trigCmm) if (summing == CmmSubBlock::CRATE && source != CmmJetSubBlock::LOCAL_MAIN && source != CmmJetSubBlock::LOCAL_FORWARD) continue; + // coverity[mixed_enums : FALSE] + // coverity[switch_on_enum : FALSE] + // coverity[first_enum_type : FALSE] switch (source) { case CmmJetSubBlock::LOCAL_MAIN: dataID = LVL1::CMMJetHits::LOCAL_MAIN; diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamTool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamTool.cxx index f0fd0c9bee6..92a12acdac2 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamTool.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/JepRoiByteStreamTool.cxx @@ -317,6 +317,9 @@ StatusCode JepRoiByteStreamTool::convert( for (int dataID = 0; dataID < maxDataID; ++dataID) { int source = dataID; if (dataID >= m_modules) { + // coverity[mixed_enums : FALSE] + // coverity[switch_on_enum : FALSE] + // coverity[first_enum_type : FALSE] switch (dataID) { case LVL1::CMMJetHits::LOCAL_MAIN: source = CmmJetSubBlock::LOCAL_MAIN; diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/components/TrigT1CaloByteStream_entries.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/components/TrigT1CaloByteStream_entries.cxx index fb1f39db6b4..1550b95dba5 100755 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/components/TrigT1CaloByteStream_entries.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/components/TrigT1CaloByteStream_entries.cxx @@ -41,7 +41,7 @@ #include "../JepRoiReadByteStreamV1Cnv.h" // Both -//#include "../CpReadByteStreamV1V2Cnv.h" +#include "../CpReadByteStreamV1V2Cnv.h" #include "../JepReadByteStreamV1V2Cnv.h" // ============================================================================ @@ -189,7 +189,7 @@ DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, JepReadJHByteStreamV1CnvT ) DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, JepRoiReadJRByteStreamV1CnvT ) DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, JepRoiReadCRByteStreamV1CnvT ) // Both -//DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, CpReadByteStreamV1V2Cnv ) +DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, CpReadByteStreamV1V2Cnv ) DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, JepReadJEByteStreamV1V2CnvT ) DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, JepReadESByteStreamV1V2CnvT ) DECLARE_NAMESPACE_CONVERTER_FACTORY( LVL1BS, RodHeaderByteStreamCnv ) @@ -268,7 +268,7 @@ DECLARE_FACTORY_ENTRIES( TrigT1CaloByteStream ) DECLARE_NAMESPACE_CONVERTER( LVL1BS, JepRoiReadJRByteStreamV1CnvT ) DECLARE_NAMESPACE_CONVERTER( LVL1BS, JepRoiReadCRByteStreamV1CnvT ) // Both -// DECLARE_NAMESPACE_CONVERTER( LVL1BS, CpReadByteStreamV1V2Cnv ) + DECLARE_NAMESPACE_CONVERTER( LVL1BS, CpReadByteStreamV1V2Cnv ) DECLARE_NAMESPACE_CONVERTER( LVL1BS, JepReadJEByteStreamV1V2CnvT ) DECLARE_NAMESPACE_CONVERTER( LVL1BS, JepReadESByteStreamV1V2CnvT ) // ========================================================================== diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/PpmByteStreamReadV1V2Tool.cxx b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/PpmByteStreamReadV1V2Tool.cxx index d1405d07867..27e183b1648 100644 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/PpmByteStreamReadV1V2Tool.cxx +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/PpmByteStreamReadV1V2Tool.cxx @@ -239,6 +239,7 @@ StatusCode PpmByteStreamReadV1V2Tool::processRobFragment_( ATH_MSG_VERBOSE( "SubBlock version #" << int(m_subBlockHeader.version()) << " format #" << int(m_subBlockHeader.format()) + << " seqNum (compVer) #" << int(m_subBlockHeader.seqNum()) << " nslice1 #" << int(m_subBlockHeader.nSlice1()) << " nslice2 #" << int(m_subBlockHeader.nSlice2()) ); @@ -620,7 +621,6 @@ StatusCode PpmByteStreamReadV1V2Tool::processPpmCompressedR4V1_() { if (present == 1) { interpretPpmHeaderR4V1_(numAdc, encoding, minIndex); CHECK((encoding != -1) && (minIndex != -1)); - // First get the LIT related quantities if (encoding < 3) { // Get the peal finder bits @@ -690,6 +690,9 @@ StatusCode PpmByteStreamReadV1V2Tool::processPpmCompressedR4V1_() { for (uint8_t i = 0; i < numLut; ++i) { pedCor[i] = getPpmBytestreamField_(6) + pedCorBase; + if (m_subBlockHeader.compVer() > 0) { + pedEn[i] = 1; + } } } else { // At the moment there is an enabled bit for every LUT slice diff --git a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.h b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.h index 38c741afe1e..e049e4fa371 100644 --- a/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.h +++ b/Trigger/TrigT1/TrigT1CaloByteStream/src/xaod/SubBlockHeader.h @@ -31,6 +31,7 @@ public: uint8_t module() const; uint8_t nSlice2() const; uint8_t nSlice1() const; + uint8_t compVer() const { return seqNum();} bool isPpmBlock() const; -- GitLab