ATLAS Offline Software
LUCID_DigitContainerCnv_p2.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 LUCID_DigitCnv_p2 digitConv_p2;
9 
11 
12  log << MSG::DEBUG << "In LUCID_DigitContainerCnv_p2::transToPers" << endmsg;
13 
14  persObj->resize(transObj->size());
15 
16  for (unsigned int i=0; i<transObj->size(); ++i) {
17 
18  LUCID_Digit_p2& digit = (*persObj)[i];
19 
20  digitConv_p2.transToPers((*transObj)[i], &digit, log);
21  }
22 }
23 
25 
26  log << MSG::DEBUG << "In LUCID_DigitContainerCnv_p2::persToTrans" << endmsg;
27 
28  transObj->reserve(persObj->size());
29 
30  for (unsigned int i=0; i<persObj->size(); ++i) {
31 
32  const LUCID_Digit_p2* digit = &((*persObj)[i]);
33 
34  transObj->push_back(digitConv_p2.createTransientConst(digit, log));
35  }
36 }
37 
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
LUCID_DigitContainer
Definition: LUCID_DigitContainer.h:13
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
lumiFormat.i
int i
Definition: lumiFormat.py:92
LUCID_DigitContainerCnv_p2.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LUCID_Digit_p2
Definition: LUCID_Digit_p2.h:8
LUCID_DigitCnv_p2
Definition: LUCID_DigitCnv_p2.h:14
LUCID_DigitContainer_p2
Definition: LUCID_DigitContainer_p2.h:16
LUCID_DigitCnv_p2::transToPers
virtual void transToPers(const LUCID_Digit *transObj, LUCID_Digit_p2 *persObj, MsgStream &log) const override
Definition: LUCID_DigitCnv_p2.cxx:22
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LUCID_DigitContainerCnv_p2::persToTrans
virtual void persToTrans(const LUCID_DigitContainer_p2 *persObj, LUCID_DigitContainer *transObj, MsgStream &log) const override
Definition: LUCID_DigitContainerCnv_p2.cxx:24
LUCID_DigitContainerCnv_p2::transToPers
virtual void transToPers(const LUCID_DigitContainer *transObj, LUCID_DigitContainer_p2 *persObj, MsgStream &log) const override
Definition: LUCID_DigitContainerCnv_p2.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