ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonConditions
MuonConditionsAthenaPool
src
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
9
#include "
MuonByteStreamErrors/RpcByteStreamErrorContainer.h
"
10
#include "
MuonConditionsAthenaPool/MuonByteStreamErrors/RpcByteStreamErrorContainerCnv_p1.h
"
11
#include <utility>
12
13
void
RpcByteStreamErrorContainerCnv_p1::
14
persToTrans
(
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
();
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
24
void
RpcByteStreamErrorContainerCnv_p1::
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
;
28
const
DataVector<std::pair<IdentifierHash, int>
>& errs =
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
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
RpcByteStreamErrorContainerCnv_p1.h
RpcByteStreamErrorContainer.h
const_iterator
DataVector
Derived DataVector<T>.
Definition
DataVector.h:795
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Muon::RpcByteStreamErrorContainer_p1
Definition
RpcByteStreamErrorContainer_p1.h:15
Muon::RpcByteStreamErrorContainer_p1::m_errorVector
DataVector< std::pair< IdentifierHash, int > > m_errorVector
Definition
RpcByteStreamErrorContainer_p1.h:18
Muon::RpcByteStreamErrorContainer
Definition
RpcByteStreamErrorContainer.h:50
Muon::RpcByteStreamErrorContainer::getAllErrors
const DataVector< std::pair< IdentifierHash, int > > & getAllErrors() const
Definition
RpcByteStreamErrorContainer.cxx:22
Muon::RpcByteStreamErrorContainer::addError
void addError(IdentifierHash, int)
Definition
RpcByteStreamErrorContainer.cxx:27
Muon::RpcByteStreamErrorContainer::clear
void clear()
Definition
RpcByteStreamErrorContainer.cxx:34
RpcByteStreamErrorContainerCnv_p1::persToTrans
virtual void persToTrans(const Muon::RpcByteStreamErrorContainer_p1 *persObj, Muon::RpcByteStreamErrorContainer *transObj, MsgStream &log) const override
Definition
RpcByteStreamErrorContainerCnv_p1.cxx:14
RpcByteStreamErrorContainerCnv_p1::transToPers
virtual void transToPers(const Muon::RpcByteStreamErrorContainer *transObj, Muon::RpcByteStreamErrorContainer_p1 *persObj, MsgStream &log) const override
Definition
RpcByteStreamErrorContainerCnv_p1.cxx:25
Generated on
for ATLAS Offline Software by
1.17.0