ATLAS Offline Software
RpcByteStreamErrorContainerCnv_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 
5 //-----------------------------------------------------------------------------
6 // file: copied from ChamberT0sCnv_p1.cxx
7 //-----------------------------------------------------------------------------
8 
11 #include <utility>
12 
15 {
16  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "RpcByteStreamErrorContainerCnv_p1::persToTrans" << endmsg;
17  transObj->clear();
18  DataVector<std::pair<IdentifierHash, int> >::const_iterator it=persObj->m_errorVector.begin(), itEnd=persObj->m_errorVector.end();
19  for (;it!=itEnd;++it) {
20  transObj->addError ((*it)->first, (*it)->second);
21  }
22 }
23 
25 transToPers( const Muon::RpcByteStreamErrorContainer *transObj, Muon::RpcByteStreamErrorContainer_p1 *persObj, MsgStream & log ) const
26 {
27  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "RpcByteStreamErrorContainerCnv_p1::transToPers" << endmsg;
29  transObj->getAllErrors();
30  persObj->m_errorVector.reserve( errs.size() );
31  for (const std::pair<IdentifierHash, int>* p : errs) {
32  persObj->m_errorVector.push_back( new std::pair<IdentifierHash, int>( p->first, p->second) );
33  }
34 }
35 
36 
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
skel.it
it
Definition: skel.GENtoEVGEN.py:423
Muon::RpcByteStreamErrorContainer::getAllErrors
const DataVector< std::pair< IdentifierHash, int > > & getAllErrors() const
Definition: RpcByteStreamErrorContainer.cxx:22
Muon::RpcByteStreamErrorContainer
Definition: RpcByteStreamErrorContainer.h:54
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
RpcByteStreamErrorContainerCnv_p1::persToTrans
virtual void persToTrans(const Muon::RpcByteStreamErrorContainer_p1 *persObj, Muon::RpcByteStreamErrorContainer *transObj, MsgStream &log) const override
Definition: RpcByteStreamErrorContainerCnv_p1.cxx:14
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
RpcByteStreamErrorContainerCnv_p1::transToPers
virtual void transToPers(const Muon::RpcByteStreamErrorContainer *transObj, Muon::RpcByteStreamErrorContainer_p1 *persObj, MsgStream &log) const override
Definition: RpcByteStreamErrorContainerCnv_p1.cxx:25
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
RpcByteStreamErrorContainerCnv_p1.h
Muon::RpcByteStreamErrorContainer::clear
void clear()
Definition: RpcByteStreamErrorContainer.cxx:34
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
RpcByteStreamErrorContainer.h
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Muon::RpcByteStreamErrorContainer_p1
Definition: RpcByteStreamErrorContainer_p1.h:15
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Muon::RpcByteStreamErrorContainer::addError
void addError(IdentifierHash, int)
Definition: RpcByteStreamErrorContainer.cxx:27
Muon::RpcByteStreamErrorContainer_p1::m_errorVector
DataVector< std::pair< IdentifierHash, int > > m_errorVector
Definition: RpcByteStreamErrorContainer_p1.h:18