ATLAS Offline Software
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 
11 
12 #include <vector>
13 using std::vector;
14 
15 namespace Analysis {
16 
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 
40  {
41  // Clear vector
42  *pb = SoftElectronInfo();
43 
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) {
53  pb->addTrackInfo (info);
54  }
55 
56  }
57 
58 }
grepfile.info
info
Definition: grepfile.py:38
Analysis::SoftElectronInfo_p1::m_vectorOfTrackProb
std::vector< float > m_vectorOfTrackProb
All of this data will be written out.
Definition: SoftElectronInfo_p1.h:28
fitman.sz
sz
Definition: fitman.py:527
Analysis::SoftElectronInfo_p1
Definition: SoftElectronInfo_p1.h:20
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
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
BaseTagInfoCnv_p1.h
Analysis::SoftElectronInfo
Definition: SoftElectronInfo.h:47
Analysis::SoftElectronInfo::numTrackInfo
int numTrackInfo() const
Number of muon track info objects stored.
Definition: SoftElectronInfo.h:77
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::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
SoftElectronInfo.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
Analysis::SoftElectronInfo_p1::m_trackinfo
std::vector< TPObjRef > m_trackinfo
Vector of SETrackInfo objects.
Definition: SoftElectronInfo_p1.h:31
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::SoftElectronInfoCnv_p1::m_baseTagCnv
BaseTagInfoCnv_p1 * m_baseTagCnv
Definition: SoftElectronInfoCnv_p1.h:31
Analysis::SoftElectronInfo::nTrackProb
double nTrackProb(void) const
Definition: SoftElectronInfo.h:110
Analysis::SoftElectronInfoCnv_p1::m_seTrackInfoCnv
ITPConverterFor< SETrackInfo > * m_seTrackInfoCnv
Definition: SoftElectronInfoCnv_p1.h:32
Analysis::SoftElectronInfo_p1::m_BaseTagInfo
TPObjRef m_BaseTagInfo
Basic info.
Definition: SoftElectronInfo_p1.h:25
Analysis::SETrackInfo
Definition: SETrackInfo.h:20
SoftElectronInfoCnv_p1.h
Analysis::SoftElectronInfo_p1::m_nTrackProb
float m_nTrackProb
Definition: SoftElectronInfo_p1.h:29
Analysis::SoftElectronInfo::getTrackInfo
const SETrackInfo & getTrackInfo(uint i) const
Get a track info object.
Definition: SoftElectronInfo.h:81
Analysis::SoftElectronInfo::vectorTrackProb
const FloatVec & vectorTrackProb(void) const
Definition: SoftElectronInfo.h:106
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7