ATLAS Offline Software
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 
7 #include "GaudiKernel/MsgStream.h"
8 
9 static const ZDC_SimFiberHitCnv_p1 ZdcFiberHitConv;
10 
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 
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