ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
JetTagging
JetTagInfoTPCnv
src
SoftElectronInfoCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
7
8
#include "
JetTagInfo/SoftElectronInfo.h
"
9
#include "
JetTagInfoTPCnv/SoftElectronInfoCnv_p1.h
"
10
#include "
JetTagInfoTPCnv/BaseTagInfoCnv_p1.h
"
11
12
#include <vector>
13
using
std::vector;
14
15
namespace
Analysis
{
16
20
void
SoftElectronInfoCnv_p1::transToPers
(
const
SoftElectronInfo
* pa,
SoftElectronInfo_p1
* pb, MsgStream &
msg
) {
21
pb->m_BaseTagInfo =
baseToPersistent
(&
m_baseTagCnv
, pa,
msg
);
22
23
pb->m_vectorOfTrackProb.assign(pa->
vectorTrackProb
().begin(),
24
pa->
vectorTrackProb
().end());
25
pb->m_nTrackProb = pa->
nTrackProb
();
26
27
size_t
sz
= pa->
numTrackInfo
();
28
pb->m_trackinfo.clear();
29
pb->m_trackinfo.reserve(
sz
);
30
for
(
size_t
i = 0; i <
sz
; i++) {
31
pb->m_trackinfo.push_back(
toPersistent
(&
m_seTrackInfoCnv
,
32
&pa->
getTrackInfo
(i),
msg
));
33
}
34
}
35
39
void
SoftElectronInfoCnv_p1::persToTrans
(
const
SoftElectronInfo_p1
* pa,
SoftElectronInfo
* pb, MsgStream &
msg
)
40
{
41
// Clear vector
42
*pb =
SoftElectronInfo
();
43
44
fillTransFromPStore
(&
m_baseTagCnv
, pa->
m_BaseTagInfo
, pb,
msg
);
45
46
pb->setTrackProb (std::vector<double> (pa->
m_vectorOfTrackProb
.begin(),
47
pa->
m_vectorOfTrackProb
.end()));
48
pb->setNTrackProb (pa->
m_nTrackProb
);
49
50
for
(
const
TPObjRef
& pinfo : pa->
m_trackinfo
) {
51
SETrackInfo
info;
52
fillTransFromPStore
(&
m_seTrackInfoCnv
, pinfo, &info,
msg
);
53
pb->addTrackInfo (info);
54
}
55
56
}
57
58
}
BaseTagInfoCnv_p1.h
sz
static Double_t sz
Definition
LArPhysWaveHECTool.cxx:37
SoftElectronInfoCnv_p1.h
SoftElectronInfo.h
Analysis::SETrackInfo
Definition
SETrackInfo.h:20
Analysis::SoftElectronInfoCnv_p1::m_seTrackInfoCnv
ITPConverterFor< SETrackInfo > * m_seTrackInfoCnv
Definition
SoftElectronInfoCnv_p1.h:32
Analysis::SoftElectronInfoCnv_p1::transToPers
virtual void transToPers(const SoftElectronInfo *transObj, SoftElectronInfo_p1 *persObj, MsgStream &log)
Save data to the persistant format.
Definition
SoftElectronInfoCnv_p1.cxx:20
Analysis::SoftElectronInfoCnv_p1::persToTrans
virtual void persToTrans(const SoftElectronInfo_p1 *persObj, SoftElectronInfo *transObj, MsgStream &log)
Fluf the data up again.
Definition
SoftElectronInfoCnv_p1.cxx:39
Analysis::SoftElectronInfoCnv_p1::m_baseTagCnv
BaseTagInfoCnv_p1 * m_baseTagCnv
Definition
SoftElectronInfoCnv_p1.h:31
Analysis::SoftElectronInfo_p1
Definition
SoftElectronInfo_p1.h:20
Analysis::SoftElectronInfo_p1::m_trackinfo
std::vector< TPObjRef > m_trackinfo
Vector of SETrackInfo objects.
Definition
SoftElectronInfo_p1.h:31
Analysis::SoftElectronInfo_p1::m_vectorOfTrackProb
std::vector< float > m_vectorOfTrackProb
All of this data will be written out.
Definition
SoftElectronInfo_p1.h:28
Analysis::SoftElectronInfo_p1::m_BaseTagInfo
TPObjRef m_BaseTagInfo
Basic info.
Definition
SoftElectronInfo_p1.h:25
Analysis::SoftElectronInfo_p1::m_nTrackProb
float m_nTrackProb
Definition
SoftElectronInfo_p1.h:29
Analysis::SoftElectronInfo
Definition
SoftElectronInfo.h:33
Analysis::SoftElectronInfo::nTrackProb
double nTrackProb(void) const
Definition
SoftElectronInfo.h:96
Analysis::SoftElectronInfo::vectorTrackProb
const FloatVec & vectorTrackProb(void) const
Definition
SoftElectronInfo.h:92
Analysis::SoftElectronInfo::getTrackInfo
const SETrackInfo & getTrackInfo(uint i) const
Get a track info object.
Definition
SoftElectronInfo.h:67
Analysis::SoftElectronInfo::numTrackInfo
int numTrackInfo() const
Number of muon track info objects stored.
Definition
SoftElectronInfo.h:63
ITPConverterFor< TRANS_BASE >::baseToPersistent
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Definition
TPConverter.h:97
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Definition
TPConverter.h:145
ITPConverterFor< TRANS_BASE >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Definition
TPConverter.h:119
TPObjRef
This class is an object reference used in Athena persistent data model.
Definition
TPObjRef.h:20
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition
IConstituent.h:25
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0