ATLAS Offline Software
Loading...
Searching...
No Matches
ClusterSplitProbabilityContainerCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/MsgStream.h"
7
8namespace Trk {
11 [[maybe_unused]] MsgStream& log) {
12 persObj->reserve(transObj->m_splitProbMap.size());
15 persObj->emplace_back(elm.first,elm.second.splitProbability1(),elm.second.splitProbability2(),elm.second.isSplit());
16 }
17}
18
21 MsgStream& log) {
22
23 for(const ClusterSplitProbability_p1 &elm : *persObj) {
24 std::pair<std::unordered_map<Trk::ClusterSplitProbabilityContainer::ClusterIdentifier, Trk::ClusterSplitProbabilityContainer::ProbabilityInfo>::iterator, bool>
25 ret = transObj->m_splitProbMap.insert( std::make_pair(elm.m_id,Trk::ClusterSplitProbabilityContainer::ProbabilityInfo(elm.m_splitPrpbability[0],
26 elm.m_splitPrpbability[1])));
27 if (!ret.second) {
28 log << MSG::FATAL << "Failed to insert cluster split probability info for " << elm.m_id << endmsg;
29 }
30 else {
31 ret.first->second.setSplit(elm.m_isSplit);
32 }
33 }
34}
35}
#define endmsg
virtual void transToPers(const ClusterSplitProbabilityContainer *transObj, ClusterSplitProbabilityContainer_p1 *persObj, MsgStream &log) override
virtual void persToTrans(const ClusterSplitProbabilityContainer_p1 *persObj, ClusterSplitProbabilityContainer *transObj, MsgStream &log) override
Container to associate Cluster with cluster splitting probabilities.
std::unordered_map< ClusterIdentifier, ProbabilityInfo > m_splitProbMap
Ensure that the ATLAS eigen extensions are properly loaded.