ATLAS Offline Software
Loading...
Searching...
No Matches
SoftLeptonTruthInfoCnv_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
9
13
14#include <vector>
15using std::vector;
16
17namespace Analysis {
18
21 MsgStream &msg)
22 {
23 persObj->m_BaseTagInfo = baseToPersistent(&m_baseTagCnv, transObj, msg);
24
25 size_t sz = transObj->numSLTrueInfo();
26 persObj->m_infoList.reserve(sz);
27 for (size_t i = 0; i < sz; i++) {
28 persObj->m_infoList.push_back(toPersistent(&m_sltCnv, &transObj->getSLTrueInfo(i), msg));
29 }
30 }
31
33 SoftLeptonTruthInfo *transObj,
34 MsgStream &msg)
35 {
36 // Clear vector.
37 *transObj = SoftLeptonTruthInfo();
38
39 fillTransFromPStore (&m_baseTagCnv, persObj->m_BaseTagInfo, transObj, msg);
40
41 for (const TPObjRef& ref : persObj->m_infoList) {
42 SLTrueInfo info;
44 transObj->addSLTrueInfo (info);
45 }
46 }
47}
const boost::regex ref(r_ef)
static Double_t sz
ITPConverterFor< SLTrueInfo > * m_sltCnv
virtual void transToPers(const SoftLeptonTruthInfo *transObj, SoftLeptonTruthInfo_p1 *persObj, MsgStream &log)
virtual void persToTrans(const SoftLeptonTruthInfo_p1 *persObj, SoftLeptonTruthInfo *transObj, MsgStream &log)
Class SoftLeptonTruthInfo: Class to store truth information about lepton in jet.
void addSLTrueInfo(const SLTrueInfo &i)
Insert a new track info object.
int numSLTrueInfo() const
Number of truth lepton info objects stored.
const SLTrueInfo & getSLTrueInfo(uint i) const
Get a track info object.
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Definition TPConverter.h:97
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
This class is an object reference used in Athena persistent data model.
Definition TPObjRef.h:20
The namespace of all packages in PhysicsAnalysis/JetTagging.
MsgStream & msg
Definition testRead.cxx:32