diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h index f6382d41025b08df4a146eaf362f014168509acb..9e9faa0037fd0b21fe491408893b01e90f0ad277 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/MuonPrepRawData/MMPrepData_p1.h @@ -43,7 +43,7 @@ namespace Muon std::vector<float> m_stripDriftDist; std::vector<Amg::MatrixX> m_stripDriftErrors; - int m_author; // contains the info about which cluster builder tool produced the PRD + int m_author = 0; // contains the info about which cluster builder tool produced the PRD //@} diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx index 9afba6d518f4fb308b31fff05e12bb8762f61323..da3beb2151df3838d5a4d8fd3bee7cd48938b4fd 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/src/MuonPrepRawData/MMPrepDataCnv_p1.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "MuonPrepRawData/MMPrepData.h" @@ -58,6 +58,7 @@ persToTrans( const Muon::MMPrepData_p1 *persObj, Muon::MMPrepData *transObj,MsgS transObj->identify(), transObj->detectorElement(), log); + transObj->setAuthor(static_cast<Muon::MMPrepData::Author>(persObj->m_author)); } void MMPrepDataCnv_p1:: diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx index bd2f4670d611597afa73154ed4950eb780d40ef3..edd4baa0eb175f6d0e1dfb3f97ab85a8fa13900e 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx @@ -1,8 +1,6 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - -// $Id$ /** * @file MuonEventTPCnv/test/MMPrepDataCnv_p1_test.cxx * @author scott snyder <snyder@bnl.gov> @@ -41,6 +39,7 @@ void compare (const Muon::MuonCluster& p1, void compare (const Muon::MMPrepData& p1, const Muon::MMPrepData& p2) { + assert (p1.author() == p2.author()); compare (static_cast<const Muon::MuonCluster&>(p1), static_cast<const Muon::MuonCluster&>(p2)); assert (p1.detectorElement() == p2.detectorElement()); @@ -80,6 +79,7 @@ void test1() rdoList, new Amg::MatrixX(cov), nullptr); + trans1.setAuthor (Muon::MMPrepData::ConstraintuTPCClusterBuilder); testit (trans1); } diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx index 3dbbe5d65df9a8b70109d07621d565ed70a6d6a6..5f4a64b2b19eeee1880c6ccc77db6ec87171444c 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx +++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/test/MMPrepDataContainerCnv_p1_test.cxx @@ -42,6 +42,7 @@ void compare (const Muon::MuonCluster& p1, void compare (const Muon::MMPrepData& p1, const Muon::MMPrepData& p2) { + assert (p1.author() == p2.author()); assert (p1.identify() == p2.identify()); compare (static_cast<const Muon::MuonCluster&>(p1), static_cast<const Muon::MuonCluster&>(p2)); @@ -117,6 +118,7 @@ makeclusts (const MuonGM::MuonDetectorManager& muo_dd) rdoList, new Amg::MatrixX(cov), muo_dd.getMMReadoutElement (clusId)); + cl->setAuthor (Muon::MMPrepData::ProjectionClusterBuilder); coll->push_back (std::move (cl)); } assert(cont->addCollection (coll.release(), hash)); diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx index 67a2a0f867ba3a8b00c5a209e89a3fa3a1637382..9083f4d7abe22850d4759c254d7b870ab197973d 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "MuonPrepRawData/MMPrepData.h" @@ -31,7 +31,8 @@ namespace Muon m_stripTimes(stripTimes), m_stripCharges(stripCharges), m_stripDriftDist(), - m_stripDriftErrors() + m_stripDriftErrors(), + m_author (SimpleClusterBuilder) { } MMPrepData::MMPrepData( const Identifier& RDOId, @@ -51,7 +52,8 @@ namespace Muon m_chisqProb(0.0), m_stripNumbers(), m_stripTimes(), - m_stripCharges() + m_stripCharges(), + m_author (SimpleClusterBuilder) { } MMPrepData::MMPrepData( const Identifier& RDOId, @@ -72,7 +74,8 @@ namespace Muon m_chisqProb(0.0), m_stripNumbers(), m_stripTimes(), - m_stripCharges() + m_stripCharges(), + m_author (SimpleClusterBuilder) { } MMPrepData::MMPrepData( const Identifier& RDOId, @@ -92,7 +95,8 @@ namespace Muon m_stripTimes(), m_stripCharges(), m_stripDriftDist(), - m_stripDriftErrors() + m_stripDriftErrors(), + m_author (SimpleClusterBuilder) { } // Destructor: @@ -114,7 +118,8 @@ namespace Muon m_stripTimes(), m_stripCharges(), m_stripDriftDist(), - m_stripDriftErrors() + m_stripDriftErrors(), + m_author (SimpleClusterBuilder) { } //copy constructor: @@ -130,7 +135,8 @@ namespace Muon m_stripTimes(RIO.m_stripTimes), m_stripCharges(RIO.m_stripCharges), m_stripDriftDist(RIO.m_stripDriftDist), - m_stripDriftErrors(RIO.m_stripDriftErrors) + m_stripDriftErrors(RIO.m_stripDriftErrors), + m_author(RIO.m_author) { } //move constructor: @@ -146,7 +152,8 @@ namespace Muon m_stripTimes(RIO.m_stripTimes), m_stripCharges(RIO.m_stripCharges), m_stripDriftDist(RIO.m_stripDriftDist), - m_stripDriftErrors(RIO.m_stripDriftErrors) + m_stripDriftErrors(RIO.m_stripDriftErrors), + m_author(RIO.m_author) { } /// set the micro-tpc quantities @@ -185,6 +192,7 @@ namespace Muon m_stripCharges = RIO.m_stripCharges; m_stripDriftDist = RIO.m_stripDriftDist; m_stripDriftErrors = RIO.m_stripDriftErrors; + m_author = RIO.m_author; } return *this; @@ -207,6 +215,7 @@ namespace Muon m_stripCharges = RIO.m_stripCharges; m_stripDriftDist = RIO.m_stripDriftDist; m_stripDriftErrors = RIO.m_stripDriftErrors; + m_author = RIO.m_author; } return *this;