ATLAS Offline Software
AFP_TDLocRecoEvCollectionCnv_p1.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "GaudiKernel/MsgStream.h"
7 
8 static const AFP_TDLocRecoEventCnv_p1 recConv;
9 
11 
12  persObj->resize(transObj->size());
13 
14  for (unsigned int i=0; i<transObj->size(); ++i) {
15 
16  AFP_TDLocRecoEvent_p1& locRec = (*persObj)[i];
17 
18  recConv.transToPers((*transObj)[i], &locRec, log);
19  }
20 }
21 
23 
24  transObj->reserve(persObj->size());
25 
26  for (unsigned int i=0; i<persObj->size(); ++i) {
27 
28  const AFP_TDLocRecoEvent_p1* locRec = &((*persObj)[i]);
29 
30  transObj->push_back(recConv.createTransientConst(locRec, log));
31  }
32 }
33 
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
AFP_TDLocRecoEvCollectionCnv_p1.h
AFP_TDLocRecoEventCnv_p1::transToPers
virtual void transToPers(const AFP_TDLocRecoEvent *transObj, AFP_TDLocRecoEvent_p1 *persObj, MsgStream &log) const override
Definition: AFP_TDLocRecoEventCnv_p1.cxx:26
AFP_TDLocRecoEvCollection_p1
Definition: AFP_TDLocRecoEvCollection_p1.h:16
lumiFormat.i
int i
Definition: lumiFormat.py:92
AFP_TDLocRecoEvCollection
Definition: AFP_TDLocRecoEvCollection.h:13
AFP_TDLocRecoEvent_p1
Definition: AFP_TDLocRecoEvent_p1.h:11
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
AFP_TDLocRecoEventCnv_p1
Definition: AFP_TDLocRecoEventCnv_p1.h:17
AFP_TDLocRecoEvCollectionCnv_p1::persToTrans
virtual void persToTrans(const AFP_TDLocRecoEvCollection_p1 *persObj, AFP_TDLocRecoEvCollection *transObj, MsgStream &log) const override
Definition: AFP_TDLocRecoEvCollectionCnv_p1.cxx:22
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
AFP_TDLocRecoEvCollectionCnv_p1::transToPers
virtual void transToPers(const AFP_TDLocRecoEvCollection *transObj, AFP_TDLocRecoEvCollection_p1 *persObj, MsgStream &log) const override
Definition: AFP_TDLocRecoEvCollectionCnv_p1.cxx:10
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TPConverterConstBase::createTransientConst
virtual TRANS * createTransientConst(const PERS *persObj, MsgStream &log) const