ATLAS Offline Software
Loading...
Searching...
No Matches
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
14persToTrans( const Muon::RpcByteStreamErrorContainer_p1 *persObj, Muon::RpcByteStreamErrorContainer *transObj,MsgStream & log ) const
15{
16 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "RpcByteStreamErrorContainerCnv_p1::persToTrans" << endmsg;
17 transObj->clear();
19 for (;it!=itEnd;++it) {
20 transObj->addError ((*it)->first, (*it)->second);
21 }
22}
23
25transToPers( 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
#define endmsg
Derived DataVector<T>.
Definition DataVector.h:795
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
DataVector< std::pair< IdentifierHash, int > > m_errorVector
const DataVector< std::pair< IdentifierHash, int > > & getAllErrors() const
virtual void persToTrans(const Muon::RpcByteStreamErrorContainer_p1 *persObj, Muon::RpcByteStreamErrorContainer *transObj, MsgStream &log) const override
virtual void transToPers(const Muon::RpcByteStreamErrorContainer *transObj, Muon::RpcByteStreamErrorContainer_p1 *persObj, MsgStream &log) const override