ATLAS Offline Software
Tracking
TrkEventCnv
TrkEventTPCnv
src
TrkClusterSplitProbabilityContainer
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
5
#include "
TrkEventTPCnv/TrkClusterSplitProbabilityContainer/ClusterSplitProbabilityContainerCnv_p1.h
"
6
#include "GaudiKernel/MsgStream.h"
7
8
namespace
Trk
{
9
void
ClusterSplitProbabilityContainerCnv_p1::transToPers
(
const
Trk::ClusterSplitProbabilityContainer
* transObj,
10
Trk::ClusterSplitProbabilityContainer_p1
* persObj,
11
[[maybe_unused]] MsgStream&
log
) {
12
persObj->reserve(transObj->
m_splitProbMap
.size());
13
for
(
const
std::pair<
const
Trk::ClusterSplitProbabilityContainer::ClusterIdentifier
,
14
Trk::ClusterSplitProbabilityContainer::ProbabilityInfo
> &elm : transObj->
m_splitProbMap
) {
15
persObj->emplace_back(elm.first,elm.second.splitProbability1(),elm.second.splitProbability2(),elm.second.isSplit());
16
}
17
}
18
19
void
ClusterSplitProbabilityContainerCnv_p1::persToTrans
(
const
Trk::ClusterSplitProbabilityContainer_p1
* persObj,
20
Trk::ClusterSplitProbabilityContainer
* transObj,
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
}
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
Generated on Sun Dec 22 2024 21:08:16 for ATLAS Offline Software by
1.8.18