ATLAS Offline Software
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>
15 using std::vector;
16 
17 namespace Analysis {
18 
20  SoftLeptonTruthInfo_p1 *persObj,
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) {
44  transObj->addSLTrueInfo (info);
45  }
46  }
47 }
grepfile.info
info
Definition: grepfile.py:38
Analysis::SoftLeptonTruthInfo::addSLTrueInfo
void addSLTrueInfo(const SLTrueInfo &i)
Insert a new track info object.
Definition: SoftLeptonTruthInfo.h:42
Analysis::SoftLeptonTruthInfo_p1::m_BaseTagInfo
TPObjRef m_BaseTagInfo
Definition: SoftLeptonTruthInfo_p1.h:19
fitman.sz
sz
Definition: fitman.py:527
Analysis::SoftLeptonTruthInfo_p1
Definition: SoftLeptonTruthInfo_p1.h:14
Analysis::SoftLeptonTruthInfoCnv_p1::m_baseTagCnv
BaseTagInfoCnv_p1 * m_baseTagCnv
Definition: SoftLeptonTruthInfoCnv_p1.h:36
SoftLeptonTruthInfoCnv_p1.h
BaseTagInfoCnv_p1.h
TPObjRef
Definition: TPObjRef.h:20
ITPConverterFor< TRANS_BASE >::fillTransFromPStore
void fillTransFromPStore(CNV **cnv, const TPObjRef &ref, TRANS_T *trans, MsgStream &log) const
Convert persistent object, stored in the the top-level persistent object and referenced by the TP Ref...
Definition: TPConverter.h:145
Analysis::SoftLeptonTruthInfo_p1::m_infoList
std::vector< TPObjRef > m_infoList
Definition: SoftLeptonTruthInfo_p1.h:21
Analysis::SoftLeptonTruthInfo::numSLTrueInfo
int numSLTrueInfo() const
Number of truth lepton info objects stored.
Definition: SoftLeptonTruthInfo.h:40
Analysis::SoftLeptonTruthInfoCnv_p1::transToPers
virtual void transToPers(const SoftLeptonTruthInfo *transObj, SoftLeptonTruthInfo_p1 *persObj, MsgStream &log)
Definition: SoftLeptonTruthInfoCnv_p1.cxx:19
lumiFormat.i
int i
Definition: lumiFormat.py:92
Analysis::SoftLeptonTruthInfo
Class SoftLeptonTruthInfo: Class to store truth information about lepton in jet.
Definition: SoftLeptonTruthInfo.h:18
ITPConverterFor< TRANS_BASE >::toPersistent
TPObjRef toPersistent(CNV **cnv, const typename CNV::TransBase_t *transObj, MsgStream &log) const
Persistify an object and store the persistent represenation in the storage vector of the top-level pe...
Definition: TPConverter.h:119
ITPConverterFor< TRANS_BASE >::baseToPersistent
TPObjRef baseToPersistent(CNV **cnv, const typename CNV::Trans_t *transObj, MsgStream &log) const
Persistify bass class of a given object and store the persistent represenation in the storage vector ...
Definition: TPConverter.h:97
Analysis
The namespace of all packages in PhysicsAnalysis/JetTagging.
Definition: BTaggingCnvAlg.h:20
Analysis::SoftLeptonTruthInfo::getSLTrueInfo
const SLTrueInfo & getSLTrueInfo(uint i) const
Get a track info object.
Definition: SoftLeptonTruthInfo.h:44
Analysis::SLTrueInfo
Definition: SLTrueInfo.h:15
ref
const boost::regex ref(r_ef)
Analysis::SoftLeptonTruthInfoCnv_p1::m_sltCnv
ITPConverterFor< SLTrueInfo > * m_sltCnv
Definition: SoftLeptonTruthInfoCnv_p1.h:37
Analysis::SoftLeptonTruthInfoCnv_p1::persToTrans
virtual void persToTrans(const SoftLeptonTruthInfo_p1 *persObj, SoftLeptonTruthInfo *transObj, MsgStream &log)
Definition: SoftLeptonTruthInfoCnv_p1.cxx:32
SoftLeptonTruthInfo.h
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7