ATLAS Offline Software
ForwardDetectors
ZDC
ZdcCnv
ZdcEventTPCnv
src
ZDC_SimFiberHit_CollectionCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ZdcEventTPCnv/ZDC_SimFiberHitCnv_p1.h
"
6
#include "
ZdcEventTPCnv/ZDC_SimFiberHit_CollectionCnv_p1.h
"
7
#include "GaudiKernel/MsgStream.h"
8
9
static
const
ZDC_SimFiberHitCnv_p1
ZdcFiberHitConv;
10
11
void
ZDC_SimFiberHit_CollectionCnv_p1::transToPers
(
const
ZDC_SimFiberHit_Collection
* transObj,
ZDC_SimFiberHit_Collection_p1
* persObj, MsgStream&
log
)
const
{
12
13
persObj->resize(transObj->
size
());
14
15
for
(
unsigned
int
i
=0;
i
<transObj->
size
(); ++
i
) {
16
17
ZDC_SimFiberHit_p1
& fiberhit = (*persObj)[
i
];
18
const
ZDC_SimFiberHit
& fiberhit_t = (*transObj)[
i
];
19
20
ZdcFiberHitConv.
transToPers
(&fiberhit_t, &fiberhit,
log
);
21
}
22
}
23
24
void
ZDC_SimFiberHit_CollectionCnv_p1::persToTrans
(
const
ZDC_SimFiberHit_Collection_p1
* persObj,
ZDC_SimFiberHit_Collection
* transObj, MsgStream&
log
)
const
{
25
26
//log << MSG::INFO << " size = " << persObj->size() << endmsg;
27
28
transObj->
reserve
(persObj->size());
29
30
for
(
unsigned
int
i
=0;
i
<persObj->size(); ++
i
) {
31
32
//log << MSG::INFO << " i = " << i << endmsg;
33
const
ZDC_SimFiberHit_p1
* fiberhit = &((*persObj)[
i
]);
34
35
std::unique_ptr<ZDC_SimFiberHit>
ptr
(ZdcFiberHitConv.
createTransientConst
(fiberhit,
log
));
36
transObj->
push_back
(*
ptr
);
37
}
38
}
ZDC_SimFiberHitCnv_p1::transToPers
virtual void transToPers(const ZDC_SimFiberHit *transObj, ZDC_SimFiberHit_p1 *persObj, MsgStream &log) const
Definition:
ZDC_SimFiberHitCnv_p1.cxx:18
AtlasHitsVector::reserve
void reserve(size_type n)
Definition:
AtlasHitsVector.h:158
ZDC_SimFiberHit_CollectionCnv_p1::transToPers
virtual void transToPers(const ZDC_SimFiberHit_Collection *transObj, ZDC_SimFiberHit_Collection_p1 *persObj, MsgStream &log) const override
Definition:
ZDC_SimFiberHit_CollectionCnv_p1.cxx:11
dbg::ptr
void * ptr(T *p)
Definition:
SGImplSvc.cxx:74
lumiFormat.i
int i
Definition:
lumiFormat.py:85
ZDC_SimFiberHit_Collection_p1
Definition:
ZDC_SimFiberHit_Collection_p1.h:17
ZDC_SimFiberHitCnv_p1
Definition:
ZDC_SimFiberHitCnv_p1.h:15
ZDC_SimFiberHit_CollectionCnv_p1.h
ZDC_SimFiberHitCnv_p1.h
ZDC_SimFiberHit_p1
Definition:
ZDC_SimFiberHit_p1.h:10
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
AtlasHitsVector::size
size_type size() const
Definition:
AtlasHitsVector.h:143
ZDC_SimFiberHit
Definition:
ZDC_SimFiberHit.h:11
ZDC_SimFiberHit_Collection
Definition:
ZDC_SimFiberHit_Collection.h:16
AtlasHitsVector::push_back
void push_back(const T &t)
Definition:
AtlasHitsVector.h:145
TPConverterConstBase::createTransientConst
virtual TRANS * createTransientConst(const PERS *persObj, MsgStream &log) const
ZDC_SimFiberHit_CollectionCnv_p1::persToTrans
virtual void persToTrans(const ZDC_SimFiberHit_Collection_p1 *persObj, ZDC_SimFiberHit_Collection *transObj, MsgStream &log) const override
Definition:
ZDC_SimFiberHit_CollectionCnv_p1.cxx:24
Generated on Thu Nov 7 2024 21:32:17 for ATLAS Offline Software by
1.8.18