ATLAS Offline Software
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 
8 namespace 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) {
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 }
Trk::ClusterSplitProbabilityContainerCnv_p1::persToTrans
virtual void persToTrans(const ClusterSplitProbabilityContainer_p1 *persObj, ClusterSplitProbabilityContainer *transObj, MsgStream &log) override
Definition: ClusterSplitProbabilityContainerCnv_p1.cxx:19
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::ClusterSplitProbabilityContainer::ClusterIdentifier
unsigned int ClusterIdentifier
Definition: ClusterSplitProbabilityContainer.h:20
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo
Definition: ClusterSplitProbabilityContainer.h:22
Trk::ClusterSplitProbabilityContainer_p1
Definition: ClusterSplitProbabilityContainer_p1.h:12
ClusterSplitProbabilityContainerCnv_p1.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
Trk::ClusterSplitProbabilityContainer::m_splitProbMap
std::unordered_map< ClusterIdentifier, ProbabilityInfo > m_splitProbMap
Definition: ClusterSplitProbabilityContainer.h:77
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::ClusterSplitProbabilityContainer
Container to associate Cluster with cluster splitting probabilities.
Definition: ClusterSplitProbabilityContainer.h:17
Trk::ClusterSplitProbability_p1
Definition: ClusterSplitProbability_p1.h:12
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Trk::ClusterSplitProbabilityContainerCnv_p1::transToPers
virtual void transToPers(const ClusterSplitProbabilityContainer *transObj, ClusterSplitProbabilityContainer_p1 *persObj, MsgStream &log) override
Definition: ClusterSplitProbabilityContainerCnv_p1.cxx:9