From ffaa50645080c395b57b9afdc27e7739b5a9c410 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Tue, 23 Apr 2019 12:31:41 +0000 Subject: [PATCH] Create InDetBSErrContainer_p2 and SCT_ByteStreamErrorsTestAlg classes (ATLASRECTS-4937) --- .../ATLAS_CHECK_THREAD_SAFETY | 1 + .../InDetBSErrContainer_p1.h | 7 +- .../InDetBSErrContainer_p2.h | 25 ++++ .../InDetByteStreamErrorsAthenaPoolCnvDict.h | 5 +- .../SCT_ByteStreamFractionContainer_p1.h | 4 +- .../selection.xml | 1 + .../src/InDetBSErrContainerCnv.cxx | 19 +-- .../src/InDetBSErrContainerCnv.h | 10 +- .../src/InDetBSErrContainerCnv_p1.cxx | 14 +-- .../src/InDetBSErrContainerCnv_p1.h | 4 +- .../src/InDetBSErrContainerCnv_p2.cxx | 36 ++++++ .../src/InDetBSErrContainerCnv_p2.h | 30 +++++ .../SCT_ByteStreamFractionContainerCnv.cxx | 6 +- .../src/SCT_ByteStreamFractionContainerCnv.h | 4 +- .../SCT_ByteStreamFractionContainerCnv_p1.cxx | 4 +- .../SCT_ByteStreamFractionContainerCnv_p1.h | 4 +- .../src/TRT_BSErrContainerCnv.cxx | 8 +- .../src/TRT_BSErrContainerCnv_p1.cxx | 6 +- .../src/TRT_BSIdErrContainerCnv.cxx | 8 +- .../src/TRT_BSIdErrContainerCnv_p1.cxx | 6 +- .../share/testBSError.py | 110 ++++++++++++++++++ .../src/SCT_ByteStreamErrorsTestAlg.cxx | 51 ++++++++ .../src/SCT_ByteStreamErrorsTestAlg.h | 41 +++++++ .../SCT_ConditionsAlgorithms_entries.cxx | 2 + .../src/SCT_ByteStreamErrorsTool.cxx | 8 +- 25 files changed, 363 insertions(+), 51 deletions(-) create mode 100644 InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/ATLAS_CHECK_THREAD_SAFETY create mode 100644 InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p2.h create mode 100644 InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.cxx create mode 100644 InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.h create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testBSError.py create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.cxx create mode 100644 InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.h diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/ATLAS_CHECK_THREAD_SAFETY b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 00000000000..ec7a6ce334d --- /dev/null +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h index efd2e08ebd0..2631924a59c 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h @@ -1,5 +1,7 @@ +// -*- C++ -*- + /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETBYTESTREAMERRORSATHENAPOOL_INDETBSERRCONTAINER_P1_H @@ -18,6 +20,9 @@ class InDetBSErrContainer_p1 friend class InDetBSErrContainerCnv_p1; private: std::vector<std::pair<IdentifierHash, int32_t>* > m_bsErrs; + // Pointer data member is fine for ROOT persistency but has an overhead. + // https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#pointers-and-references-in-persistency + // https://its.cern.ch/jira/browse/ATLASRECTS-4937 }; // inlines diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p2.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p2.h new file mode 100644 index 00000000000..352830b13ac --- /dev/null +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p2.h @@ -0,0 +1,25 @@ +// -*- C++ -*- + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef INDETBYTESTREAMERRORSATHENAPOOL_INDETBSERRCONTAINER_P2_H +#define INDETBYTESTREAMERRORSATHENAPOOL_INDETBSERRCONTAINER_P2_H + +#include "Identifier/IdentifierHash.h" + +#include <utility> +#include <vector> + +class InDetBSErrContainer_p2 +{ + public: + /// Default constructor + InDetBSErrContainer_p2 () {}; + friend class InDetBSErrContainerCnv_p2; + private: + std::vector<std::pair<IdentifierHash, int>> m_bsErrs; +}; + +#endif // InDetBSErrContainer_p2 diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPoolCnvDict.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPoolCnvDict.h index 7646e6ce64f..b0a90ef02e5 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPoolCnvDict.h +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPoolCnvDict.h @@ -1,10 +1,13 @@ +// -*- C++ -*- + /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETBYTESTREAMERRORSATHENAPOOL_INDETBYTESTREAMERRORSATHENAPOOLDICT_H #define INDETBYTESTREAMERRORSATHENAPOOL_INDETBYTESTREAMERRORSATHENAPOOLDICT_H #include "InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h" +#include "InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p2.h" #include "InDetByteStreamErrorsAthenaPool/TRT_BSErrContainer_p1.h" #include "InDetByteStreamErrorsAthenaPool/TRT_BSIdErrContainer_p1.h" #include "InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h" diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h index b7c3fe1bade..7b933c532b0 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h @@ -1,5 +1,7 @@ +// -*- C++ -*- + /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINER_P1_H diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/selection.xml b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/selection.xml index c554a2c40f1..39bb05e4c11 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/selection.xml +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/InDetByteStreamErrorsAthenaPool/selection.xml @@ -1,5 +1,6 @@ <lcgdict> <class name="InDetBSErrContainer_p1" id="FA64DC17-D07E-4305-9B21-18C64F1B4C47" /> + <class name="InDetBSErrContainer_p2" id="ECBBC13B-0A44-4694-AD24-574A7598C627" /> <class name="TRT_BSErrContainer_p1" id="D461AC01-02CA-4A9E-886B-24EC14309121" /> <class name="TRT_BSIdErrContainer_p1" id="26F44F1E-D1F5-43B3-93E9-09376AB37491" /> <class name="SCT_ByteStreamFractionContainer_p1" id="EB75984C-F651-4F40-BA1C-9C2A0A558A55" /> diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.cxx index 92a3fc3e06d..81cfe9d02ca 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -12,19 +12,20 @@ InDetBSErrContainer_PERS* InDetBSErrContainerCnv::createPersistent(InDetBSErrContainer* transCont) { - MsgStream log(msgSvc(), "InDetBSErrContainerCnv" ); - InDetBSErrContainer_PERS *persObj = m_TPConverter.createPersistent( transCont, log ); + MsgStream log{msgSvc(), "InDetBSErrContainerCnv"}; + InDetBSErrContainer_PERS* persObj{m_TPConverter_PERS.createPersistent(transCont, log)}; return persObj; } InDetBSErrContainer* InDetBSErrContainerCnv::createTransient() { - MsgStream log(msgSvc(), "InDetBSErrContainerCnv" ); - static pool::Guid p1_guid("FA64DC17-D07E-4305-9B21-18C64F1B4C47"); - if( compareClassGuid(p1_guid) ) { - /** using auto_ptr ensures deletion of the persistent object */ - std::auto_ptr< InDetBSErrContainer_p1 > col_vect( poolReadObject< InDetBSErrContainer_p1 >() ); - return m_TPConverter.createTransient( col_vect.get(), log ); + MsgStream log{msgSvc(), "InDetBSErrContainerCnv"}; + static const pool::Guid p1_guid{"FA64DC17-D07E-4305-9B21-18C64F1B4C47"}; + static const pool::Guid p2_guid{"ECBBC13B-0A44-4694-AD24-574A7598C627"}; + if (compareClassGuid(p1_guid)) { + return m_TPConverter_p1.createTransient(poolReadObject<InDetBSErrContainer_p1>(), log); + } else if (compareClassGuid(p2_guid)) { + return m_TPConverter_PERS.createTransient(poolReadObject<InDetBSErrContainer_p2>(), log); } throw std::runtime_error("Unsupported persistent version of Data Collection"); } diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.h index 9866fd74955..4d6249d8bef 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.h +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv.h @@ -1,5 +1,7 @@ +// -*- C++ -*- + /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -17,9 +19,10 @@ #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" #include "InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h" #include "InDetBSErrContainerCnv_p1.h" +#include "InDetBSErrContainerCnv_p2.h" /** the latest persistent representation type of DataCollection: */ -typedef InDetBSErrContainer_p1 InDetBSErrContainer_PERS; +typedef InDetBSErrContainer_p2 InDetBSErrContainer_PERS; typedef T_AthenaPoolCustomCnv<InDetBSErrContainer, InDetBSErrContainer_PERS > InDetBSErrContainerCnvBase; class InDetBSErrContainerCnv : public InDetBSErrContainerCnvBase { @@ -30,6 +33,7 @@ protected: virtual InDetBSErrContainer_PERS* createPersistent (InDetBSErrContainer* transCont); virtual InDetBSErrContainer* createTransient (); - InDetBSErrContainerCnv_p1 m_TPConverter; + InDetBSErrContainerCnv_p1 m_TPConverter_p1; + InDetBSErrContainerCnv_p2 m_TPConverter_PERS; // The latest one should be PERS. Currently p2 is PERS. }; #endif diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.cxx index a4c676d04e6..a4963345dcd 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.cxx @@ -1,15 +1,10 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ -#include "InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p1.h" -#include "InDetByteStreamErrors/InDetBSErrContainer.h" #include "InDetBSErrContainerCnv_p1.h" -#include "Identifier/IdentifierHash.h" -#include "AthAllocators/DataPool.h" - -void InDetBSErrContainerCnv_p1::transToPers(const InDetBSErrContainer* transCont, InDetBSErrContainer_p1* persCont, MsgStream & /*log */) +void InDetBSErrContainerCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE (const InDetBSErrContainer* transCont, InDetBSErrContainer_p1* persCont, MsgStream& /*log*/) { InDetBSErrContainer::const_iterator it = transCont->begin(); InDetBSErrContainer::const_iterator itEnd = transCont->end(); @@ -24,9 +19,8 @@ void InDetBSErrContainerCnv_p1::transToPers(const InDetBSErrContainer* transCont return; } -void InDetBSErrContainerCnv_p1::persToTrans(const InDetBSErrContainer_p1* persCont, InDetBSErrContainer* transCont, MsgStream & /*log */) +void InDetBSErrContainerCnv_p1::persToTrans(const InDetBSErrContainer_p1* persCont, InDetBSErrContainer* transCont, MsgStream& /*log*/) { - std::vector<std::pair<IdentifierHash, int>* >::const_iterator it = (persCont->m_bsErrs).begin(); std::vector<std::pair<IdentifierHash, int>* >::const_iterator itEnd = (persCont->m_bsErrs).end(); transCont->reserve((persCont->m_bsErrs).size()); @@ -40,7 +34,7 @@ void InDetBSErrContainerCnv_p1::persToTrans(const InDetBSErrContainer_p1* persC //================================================================ InDetBSErrContainer* InDetBSErrContainerCnv_p1::createTransient(const InDetBSErrContainer_p1* persObj, MsgStream& log) { - std::auto_ptr<InDetBSErrContainer> trans(new InDetBSErrContainer()); + std::unique_ptr<InDetBSErrContainer> trans(std::make_unique<InDetBSErrContainer>()); persToTrans(persObj, trans.get(), log); return(trans.release()); } diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.h index 076db36c5fa..75a3a374b4c 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.h +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p1.h @@ -1,5 +1,7 @@ +// -*- C++ -*- + /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETBYTESTREAMERRORSATHENAPOOL_INDETBSERRCONTAINERCNV_P1_H diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.cxx new file mode 100644 index 00000000000..f85312b1241 --- /dev/null +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.cxx @@ -0,0 +1,36 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#include "InDetBSErrContainerCnv_p2.h" + +void InDetBSErrContainerCnv_p2::transToPers(const InDetBSErrContainer* transCont, InDetBSErrContainer_p2* persCont, MsgStream& log) +{ + (persCont->m_bsErrs).reserve(transCont->size()); + for (const std::pair<IdentifierHash, int>* bsErr: *transCont) { + if (bsErr==nullptr) { + log << MSG::WARNING << "const std::pair<IdentifierHash, int>* is nullptr and skipped." << endmsg; + continue; + } + (persCont->m_bsErrs).push_back(*bsErr); + } + + return; +} + +void InDetBSErrContainerCnv_p2::persToTrans(const InDetBSErrContainer_p2* persCont, InDetBSErrContainer* transCont, MsgStream& /*log*/) +{ + transCont->reserve((persCont->m_bsErrs).size()); + for (const std::pair<IdentifierHash, int>& bsErr: persCont->m_bsErrs) { + transCont->push_back(std::make_unique<std::pair<IdentifierHash, int>>(bsErr)); + } + + return; +} + +//================================================================ +InDetBSErrContainer* InDetBSErrContainerCnv_p2::createTransient(const InDetBSErrContainer_p2* persObj, MsgStream& log) { + std::unique_ptr<InDetBSErrContainer> trans{std::make_unique<InDetBSErrContainer>()}; + persToTrans(persObj, trans.get(), log); + return trans.release(); +} diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.h new file mode 100644 index 00000000000..851284f35d4 --- /dev/null +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/InDetBSErrContainerCnv_p2.h @@ -0,0 +1,30 @@ +// -*- C++ -*- + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef INDETBYTESTREAMERRORSATHENAPOOL_INDETBSERRCONTAINERCNV_P2_H +#define INDETBYTESTREAMERRORSATHENAPOOL_INDETBSERRCONTAINERCNV_P2_H + +#include "InDetByteStreamErrors/InDetBSErrContainer.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h" +#include "InDetByteStreamErrorsAthenaPool/InDetBSErrContainer_p2.h" + +class InDetBSErrContainerCnv_p2 : public T_AthenaPoolTPCnvBase<InDetBSErrContainer, InDetBSErrContainer_p2> +{ + public: + InDetBSErrContainerCnv_p2() {}; + + virtual void persToTrans(const InDetBSErrContainer_p2* persCont, + InDetBSErrContainer* transCont, + MsgStream& log); + virtual void transToPers(const InDetBSErrContainer* transCont, + InDetBSErrContainer_p2* persCont, + MsgStream& log); + virtual InDetBSErrContainer* createTransient(const InDetBSErrContainer_p2* persObj, + MsgStream& log); + +}; + +#endif // INDETBYTESTREAMERRORSATHENAPOOL_INDETBSERRCONTAINERCNV_P2_H diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx index a896010a4d8..2dc51be413f 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -22,8 +22,8 @@ SCT_ByteStreamFractionContainerCnv::createTransient() { MsgStream log(msgSvc(), "SCT_ByteStreamFractionContainerCnv" ); const pool::Guid p1_guid("EB75984C-F651-4F40-BA1C-9C2A0A558A55"); if( compareClassGuid(p1_guid) ) { - /** using auto_ptr ensures deletion of the persistent object */ - std::auto_ptr< SCT_ByteStreamFractionContainer_p1 > col_vect( poolReadObject< SCT_ByteStreamFractionContainer_p1 >() ); + /** using unique_ptr ensures deletion of the persistent object */ + std::unique_ptr< SCT_ByteStreamFractionContainer_p1 > col_vect( poolReadObject< SCT_ByteStreamFractionContainer_p1 >() ); return m_TPConverter.createTransient( col_vect.get(), log ); } throw std::runtime_error("Unsupported persistent version of Data Collection"); diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.h index 7d448fb6de3..c2dc906df43 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.h +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv.h @@ -1,5 +1,7 @@ +// -*- C++ -*- + /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.cxx index 81fde69fdbb..1aea2084cbc 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetByteStreamErrorsAthenaPool/SCT_ByteStreamFractionContainer_p1.h" @@ -40,7 +40,7 @@ void SCT_ByteStreamFractionContainerCnv_p1::persToTrans(const SCT_ByteStreamFrac //================================================================ SCT_ByteStreamFractionContainer* SCT_ByteStreamFractionContainerCnv_p1::createTransient(const SCT_ByteStreamFractionContainer_p1* persObj, MsgStream& log) { - std::auto_ptr<SCT_ByteStreamFractionContainer> trans(new SCT_ByteStreamFractionContainer()); + std::unique_ptr<SCT_ByteStreamFractionContainer> trans(std::make_unique<SCT_ByteStreamFractionContainer>()); persToTrans(persObj, trans.get(), log); return(trans.release()); } diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.h b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.h index 4638154c0b8..9f06438a310 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.h +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/SCT_ByteStreamFractionContainerCnv_p1.h @@ -1,5 +1,7 @@ +// -*- C++ -*- + /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef INDETBYTESTREAMERRORSATHENAPOOL_SCT_BYTESTREAMFRACTIONCONTAINERCNV_P1_H diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv.cxx index a6677ddc301..4d819af74b3 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -23,10 +23,10 @@ TRT_BSErrContainerCnv::createPersistent(TRT_BSErrContainer* transCont) { TRT_BSErrContainer* TRT_BSErrContainerCnv::createTransient() { MsgStream log(msgSvc(), "TRT_BSErrContainerCnv" ); - static pool::Guid p1_guid("D461AC01-02CA-4A9E-886B-24EC14309121"); + static const pool::Guid p1_guid("D461AC01-02CA-4A9E-886B-24EC14309121"); if( compareClassGuid(p1_guid) ) { - // using auto_ptr ensures deletion of the persistent object - std::auto_ptr< TRT_BSErrContainer_p1 > col_vect( poolReadObject< TRT_BSErrContainer_p1 >() ); + // using unique_ptr ensures deletion of the persistent object + std::unique_ptr< TRT_BSErrContainer_p1 > col_vect( poolReadObject< TRT_BSErrContainer_p1 >() ); return m_TPConverter.createTransient( col_vect.get(), log ); } throw std::runtime_error("Unsupported persistent version of Data Collection"); diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv_p1.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv_p1.cxx index 257ad611ce8..3d8d7ff3787 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv_p1.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSErrContainerCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetByteStreamErrorsAthenaPool/TRT_BSErrContainer_p1.h" @@ -11,7 +11,7 @@ #include <iostream> -void TRT_BSErrContainerCnv_p1::transToPers(const TRT_BSErrContainer* transCont, TRT_BSErrContainer_p1* persCont, MsgStream & /* log */) +void TRT_BSErrContainerCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE (const TRT_BSErrContainer* transCont, TRT_BSErrContainer_p1* persCont, MsgStream & /* log */) { TRT_BSErrContainer::const_iterator it = transCont->begin(); TRT_BSErrContainer::const_iterator itEnd = transCont->end(); @@ -42,7 +42,7 @@ void TRT_BSErrContainerCnv_p1::persToTrans(const TRT_BSErrContainer_p1* persCon //================================================================ TRT_BSErrContainer* TRT_BSErrContainerCnv_p1::createTransient(const TRT_BSErrContainer_p1* persObj, MsgStream& log) { - std::auto_ptr<TRT_BSErrContainer> trans(new TRT_BSErrContainer()); + std::unique_ptr<TRT_BSErrContainer> trans(std::make_unique<TRT_BSErrContainer>()); persToTrans(persObj, trans.get(), log); return(trans.release()); } diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv.cxx index c12a6cb1f7a..481e4d5c2b4 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ /** @@ -20,10 +20,10 @@ TRT_BSIdErrContainerCnv::createPersistent(TRT_BSIdErrContainer* transCont) { TRT_BSIdErrContainer* TRT_BSIdErrContainerCnv::createTransient() { MsgStream log(msgSvc(), "TRT_BSIdErrContainerCnv" ); - static pool::Guid p1_guid("26F44F1E-D1F5-43B3-93E9-09376AB37491"); + static const pool::Guid p1_guid("26F44F1E-D1F5-43B3-93E9-09376AB37491"); if( compareClassGuid(p1_guid) ) { - // using auto_ptr ensures deletion of the persistent object - std::auto_ptr< TRT_BSIdErrContainer_p1 > col_vect( poolReadObject< TRT_BSIdErrContainer_p1 >() ); + // using unique_ptr ensures deletion of the persistent object + std::unique_ptr< TRT_BSIdErrContainer_p1 > col_vect( poolReadObject< TRT_BSIdErrContainer_p1 >() ); return m_TPConverter.createTransient( col_vect.get(), log ); } throw std::runtime_error("Unsupported persistent version of Data Collection"); diff --git a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv_p1.cxx b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv_p1.cxx index bb0cfb0b487..e34c7439f0b 100644 --- a/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv_p1.cxx +++ b/InnerDetector/InDetConditions/InDetByteStreamErrorsAthenaPool/src/TRT_BSIdErrContainerCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "InDetByteStreamErrorsAthenaPool/TRT_BSIdErrContainer_p1.h" @@ -11,7 +11,7 @@ #include <iostream> -void TRT_BSIdErrContainerCnv_p1::transToPers(const TRT_BSIdErrContainer* transCont, TRT_BSIdErrContainer_p1* persCont, MsgStream & /* log */) +void TRT_BSIdErrContainerCnv_p1::transToPers ATLAS_NOT_THREAD_SAFE (const TRT_BSIdErrContainer* transCont, TRT_BSIdErrContainer_p1* persCont, MsgStream & /* log */) { TRT_BSIdErrContainer::const_iterator it = transCont->begin(); TRT_BSIdErrContainer::const_iterator itEnd = transCont->end(); @@ -42,7 +42,7 @@ void TRT_BSIdErrContainerCnv_p1::persToTrans(const TRT_BSIdErrContainer_p1* per //================================================================ TRT_BSIdErrContainer* TRT_BSIdErrContainerCnv_p1::createTransient(const TRT_BSIdErrContainer_p1* persObj, MsgStream& log) { - std::auto_ptr<TRT_BSIdErrContainer> trans(new TRT_BSIdErrContainer()); + std::unique_ptr<TRT_BSIdErrContainer> trans(std::make_unique<TRT_BSIdErrContainer>()); persToTrans(persObj, trans.get(), log); return(trans.release()); } diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testBSError.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testBSError.py new file mode 100644 index 00000000000..dcce22f4d8b --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/share/testBSError.py @@ -0,0 +1,110 @@ +import AthenaCommon.AtlasUnixStandardJob + +#-------------------------------------------------------------- +# Thread-specific setup +#-------------------------------------------------------------- +from AthenaCommon.ConcurrencyFlags import jobproperties +numThreads = jobproperties.ConcurrencyFlags.NumThreads() +if numThreads > 0: + from AthenaCommon.AlgScheduler import AlgScheduler + AlgScheduler.CheckDependencies( True ) + AlgScheduler.ShowControlFlow( True ) + AlgScheduler.ShowDataDependencies( True ) + +# use auditors +from AthenaCommon.AppMgr import ServiceMgr +from GaudiSvc.GaudiSvcConf import AuditorSvc +ServiceMgr += AuditorSvc() +theAuditorSvc = ServiceMgr.AuditorSvc +theAuditorSvc.Auditors += ["ChronoAuditor"] +theAuditorSvc.Auditors += ["MemStatAuditor"] +theApp.AuditAlgorithms=True + + +#-------------------------------------------------------------- +# Load Geometry +#-------------------------------------------------------------- +from AthenaCommon.GlobalFlags import globalflags +globalflags.DetDescrVersion="ATLAS-R2-2016-01-00-01" +globalflags.DetGeo="atlas" +globalflags.InputFormat="pool" +globalflags.DataSource="data" +print globalflags + +#-------------------------------------------------------------- +# Set Detector setup +#-------------------------------------------------------------- +# --- switch on InnerDetector +from AthenaCommon.DetFlags import DetFlags +DetFlags.ID_setOff() +DetFlags.Calo_setOff() +DetFlags.Muon_setOff() +DetFlags.Truth_setOff() +DetFlags.LVL1_setOff() +DetFlags.SCT_setOn() + +# ---- switch parts of ID off/on as follows +#switch off tasks +DetFlags.pileup.all_setOff() +DetFlags.simulate.all_setOff() +DetFlags.makeRIO.all_setOff() +DetFlags.writeBS.all_setOff() +DetFlags.readRDOBS.all_setOff() +DetFlags.readRIOBS.all_setOff() +DetFlags.readRIOPool.all_setOff() +DetFlags.writeRIOPool.all_setOff() + + + +import AtlasGeoModel.SetGeometryVersion +import AtlasGeoModel.GeoModelInit + +from AthenaCommon.AlgSequence import AlgSequence + +job = AlgSequence() + +# Set up SCT cabling +from AthenaCommon.Include import include +include('InDetRecExample/InDetRecCabling.py') + +#-------------------------------------------------------------- +# Load IOVDbSvc +#-------------------------------------------------------------- + +IOVDbSvc = Service("IOVDbSvc") +from IOVDbSvc.CondDB import conddb +IOVDbSvc.GlobalTag="CONDBR2-BLKPA-2018-03" + +from SCT_ConditionsTools.SCT_ConfigurationConditionsToolSetup import SCT_ConfigurationConditionsToolSetup +sct_ConfigurationConditionsToolSetup = SCT_ConfigurationConditionsToolSetup() +sct_ConfigurationConditionsToolSetup.setup() +SCT_ConfigurationConditionsTool = sct_ConfigurationConditionsToolSetup.getTool() + +from SCT_ConditionsTools.SCT_ByteStreamErrorsToolSetup import SCT_ByteStreamErrorsToolSetup +sct_ByteStreamErrorsToolSetup = SCT_ByteStreamErrorsToolSetup() +sct_ByteStreamErrorsToolSetup.setConfigTool(SCT_ConfigurationConditionsTool) +sct_ByteStreamErrorsToolSetup.setup() +SCT_ByteStreamErrorsTool = sct_ByteStreamErrorsToolSetup.getTool() + +SCT_ByteStreamErrorsTool.OutputLevel=DEBUG + +from SCT_ConditionsAlgorithms.SCT_ConditionsAlgorithmsConf import SCT_ByteStreamErrorsTestAlg +job+= SCT_ByteStreamErrorsTestAlg(ByteStreamErrorsTool=SCT_ByteStreamErrorsTool) + +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +if numThreads >= 2: + from SCT_ConditionsAlgorithms.SCTCondAlgCardinality import sctCondAlgCardinality + sctCondAlgCardinality.set(numThreads) + job.SCT_ByteStreamErrorsTestAlg.Cardinality = numThreads + +import AthenaPoolCnvSvc.ReadAthenaPool +from PoolSvc.PoolSvcConf import PoolSvc +ServiceMgr += PoolSvc() + +athenaCommonFlags.FilesInput = [ "./ESD.pool.root" ] +ServiceMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput.get_Value() + +theApp.EvtMax = -1 + +ServiceMgr.MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M" + diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.cxx new file mode 100644 index 00000000000..81caf08fbc3 --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.cxx @@ -0,0 +1,51 @@ +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file SCT_ByteStreamErrorsTestAlg.cxx + * + * @brief Class to test SCT_ByteStreamErrorsTool (implementation) + * + * @author Susumu.Oda@cern.ch + **/ + +#include "SCT_ByteStreamErrorsTestAlg.h" + +SCT_ByteStreamErrorsTestAlg::SCT_ByteStreamErrorsTestAlg(const std::string& name, ISvcLocator* pSvcLocator) : + AthReentrantAlgorithm(name, pSvcLocator) { +} + +//Initialize +StatusCode SCT_ByteStreamErrorsTestAlg::initialize() { + ATH_MSG_INFO("Calling initialize"); + + // Retrieve bytestream error tool + ATH_CHECK(m_bsErrTool.retrieve()); + + return StatusCode::SUCCESS; +} + +//Execute +StatusCode SCT_ByteStreamErrorsTestAlg::execute(const EventContext& ctx) const { + ATH_MSG_INFO("Calling execute"); + + const std::array<std::set<IdentifierHash>, SCT_ByteStreamErrors::NUM_ERROR_TYPES>* errorSets{m_bsErrTool->getErrorSets(ctx)}; + ATH_MSG_ALWAYS("------------------------------------------------------------"); + for (unsigned int iErr{0}; iErr<SCT_ByteStreamErrors::NUM_ERROR_TYPES; iErr++) { + ATH_MSG_ALWAYS("BS Error index: " << iErr << " type " << SCT_ByteStreamErrors::errorTypesDescription[iErr].c_str()); + const std::set<IdentifierHash>& errorSet{(*errorSets)[iErr]}; + for (const IdentifierHash& hash: errorSet) { + ATH_MSG_ALWAYS(" Wafer hash : " << hash); + } + ATH_MSG_ALWAYS("------------------------------------------------------------"); + } + + return StatusCode::SUCCESS; +} + +//Finalize +StatusCode SCT_ByteStreamErrorsTestAlg::finalize() { + ATH_MSG_INFO("Calling finalize"); + return StatusCode::SUCCESS; +} diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.h b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.h new file mode 100644 index 00000000000..b5a454c754d --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_ByteStreamErrorsTestAlg.h @@ -0,0 +1,41 @@ +// -*- C++ -*- + +/* + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file SCT_ByteStreamErrorsTestAlg.h + * + * @brief Class to test SCT_ByteStreamErrorsTool (header) + * + * @author Susumu.Oda@cern.ch + **/ + +#ifndef SCT_ByteStreamErrorsTestAlg_H +#define SCT_ByteStreamErrorsTestAlg_H + +//Athena +#include "AthenaBaseComps/AthReentrantAlgorithm.h" + +#include "SCT_ConditionsTools/ISCT_ByteStreamErrorsTool.h" + +//Gaudi +#include "GaudiKernel/ToolHandle.h" + +class SCT_ByteStreamErrorsTestAlg : public AthReentrantAlgorithm { + public: + SCT_ByteStreamErrorsTestAlg(const std::string& name, ISvcLocator* pSvcLocator); + virtual ~SCT_ByteStreamErrorsTestAlg() = default; + + virtual StatusCode initialize() override; + virtual StatusCode execute(const EventContext& ctx) const override; + virtual StatusCode finalize() override; + /** Make this algorithm clonable. */ + virtual bool isClonable() const override { return true; }; + + private: + ToolHandle<ISCT_ByteStreamErrorsTool> m_bsErrTool{this, "ByteStreamErrorsTool", "SCT_ByteStreamErrorsTool", "Tool to retrieve SCT bytestream errors"}; +}; + +#endif // SCT_ByteStreamErrorsTestAlg_H diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx index ec0fbc62f1f..58928ac93b7 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/components/SCT_ConditionsAlgorithms_entries.cxx @@ -1,4 +1,5 @@ #include "../SCT_AlignCondAlg.h" +#include "../SCT_ByteStreamErrorsTestAlg.h" #include "../SCT_ConditionsParameterCondAlg.h" #include "../SCT_ConditionsParameterTestAlg.h" #include "../SCT_ConditionsSummaryTestAlg.h" @@ -35,6 +36,7 @@ #include "../SCT_TdaqEnabledTestAlg.h" DECLARE_COMPONENT( SCT_AlignCondAlg ) +DECLARE_COMPONENT( SCT_ByteStreamErrorsTestAlg ) DECLARE_COMPONENT( SCT_ConditionsParameterCondAlg ) DECLARE_COMPONENT( SCT_ConditionsParameterTestAlg ) DECLARE_COMPONENT( SCT_ConditionsSummaryTestAlg ) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx index 93d53e37eaa..3c60d4b5c67 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsTools/src/SCT_ByteStreamErrorsTool.cxx @@ -396,12 +396,12 @@ SCT_ByteStreamErrorsTool::fillData(const EventContext& ctx) const { /// However, ABCDError_Chip0-ABCDError_Chip5 and TempMaskedChip0-TempMaskedChip5 are not common for two links. if (side==0) { IdentifierHash otherSide{IdentifierHash(elt->first + 1)}; - addError(otherSide,elt->second, ctx); - ATH_MSG_DEBUG("Adding error to side 1 for module with RX redundancy" << otherSide); + addError(otherSide, elt->second, ctx); + ATH_MSG_DEBUG("Adding error to side 1 for module with RX redundancy " << otherSide); } else if (side==1) { IdentifierHash otherSide{IdentifierHash(elt->first - 1)}; - addError(otherSide,elt->second, ctx); - ATH_MSG_DEBUG("Adding error to side 0 for module with RX redundancy" << otherSide); + addError(otherSide, elt->second, ctx); + ATH_MSG_DEBUG("Adding error to side 0 for module with RX redundancy " << otherSide); } } } -- GitLab