ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
InDetByteStreamErrorsAthenaPool
src
InDetBSErrContainerCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
InDetBSErrContainerCnv_p1.h
"
6
7
void
InDetBSErrContainerCnv_p1::transToPers
8
(
const
InDetBSErrContainer
* transCont,
InDetBSErrContainer_p1
* persCont, MsgStream&
/*log*/
)
9
{
10
InDetBSErrContainer::const_iterator
it = transCont->
begin
();
11
InDetBSErrContainer::const_iterator
itEnd = transCont->
end
();
12
(persCont->
m_bsErrs
).reserve(transCont->
size
());
13
14
for
(; it != itEnd; ++it) {
15
// FIXME: Should change type of m_bsErrs, but don't want to cause possible
16
// back-compatibility problems.
17
std::pair<IdentifierHash, int>* ptr
ATLAS_THREAD_SAFE
=
const_cast<
std::pair<IdentifierHash, int>*
>
(*it);
18
(persCont->
m_bsErrs
).push_back(ptr);
19
}
20
}
21
22
void
InDetBSErrContainerCnv_p1::persToTrans
(
const
InDetBSErrContainer_p1
* persCont,
InDetBSErrContainer
* transCont, MsgStream&
/*log*/
)
23
{
24
std::vector<std::pair<IdentifierHash, int>* >
::const_iterator
it = (persCont->
m_bsErrs
).begin();
25
std::vector<std::pair<IdentifierHash, int>* >
::const_iterator
itEnd = (persCont->
m_bsErrs
).end();
26
transCont->
reserve
((persCont->
m_bsErrs
).size());
27
28
for
(; it != itEnd; ++it) {
29
transCont->
push_back
(*it);
30
}
31
32
}
33
34
//================================================================
35
InDetBSErrContainer
*
InDetBSErrContainerCnv_p1::createTransient
(
const
InDetBSErrContainer_p1
* persObj, MsgStream& log) {
36
std::unique_ptr<InDetBSErrContainer> trans(std::make_unique<InDetBSErrContainer>());
37
persToTrans
(persObj, trans.get(), log);
38
return
(trans.release());
39
}
InDetBSErrContainerCnv_p1.h
InDetBSErrContainer
DataVector< std::pair< IdentifierHash, int > > InDetBSErrContainer
Definition
InDetBSErrContainer.h:19
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition
checker_macros.h:211
const_iterator
DataVector< std::pair< IdentifierHash, int > >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
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.
InDetBSErrContainerCnv_p1::transToPers
virtual void transToPers(const InDetBSErrContainer *transCont, InDetBSErrContainer_p1 *persCont, MsgStream &log)
Definition
InDetBSErrContainerCnv_p1.cxx:8
InDetBSErrContainerCnv_p1::persToTrans
virtual void persToTrans(const InDetBSErrContainer_p1 *persCont, InDetBSErrContainer *transCont, MsgStream &log)
Definition
InDetBSErrContainerCnv_p1.cxx:22
InDetBSErrContainerCnv_p1::createTransient
virtual InDetBSErrContainer * createTransient(const InDetBSErrContainer_p1 *persObj, MsgStream &log)
Definition
InDetBSErrContainerCnv_p1.cxx:35
InDetBSErrContainer_p1
Definition
InDetBSErrContainer_p1.h:16
InDetBSErrContainer_p1::m_bsErrs
std::vector< std::pair< IdentifierHash, int32_t > * > m_bsErrs
Definition
InDetBSErrContainer_p1.h:22
Generated on
for ATLAS Offline Software by
1.17.0