ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
InDetByteStreamErrorsAthenaPool
src
TRT_BSIdErrContainerCnv_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 "
InDetByteStreamErrorsAthenaPool/TRT_BSIdErrContainer_p1.h
"
6
#include "
InDetByteStreamErrors/TRT_BSIdErrContainer.h
"
7
#include "
TRT_BSIdErrContainerCnv_p1.h
"
8
9
#include "
Identifier/IdentifierHash.h
"
10
#include "
AthAllocators/DataPool.h
"
11
12
#include <iostream>
13
14
void
TRT_BSIdErrContainerCnv_p1::transToPers
15
(
const
TRT_BSIdErrContainer
* transCont,
TRT_BSIdErrContainer_p1
* persCont, MsgStream &
/* log */
)
16
{
17
TRT_BSIdErrContainer::const_iterator
it = transCont->
begin
();
18
TRT_BSIdErrContainer::const_iterator
itEnd = transCont->
end
();
19
(persCont->
m_bsErrs
).reserve(transCont->
size
());
20
21
for
(; it != itEnd; ++it) {
22
// FIXME: Should change type of m_bsErrs, but don't want to cause possible
23
// back-compatibility problems.
24
std::pair<uint8_t, std::pair<uint32_t, uint8_t> >* ptr
ATLAS_THREAD_SAFE
=
const_cast<
std::pair<uint8_t, std::pair<uint32_t, uint8_t>
>
*> (*it);
25
(persCont->
m_bsErrs
).push_back(ptr);
26
}
27
}
28
29
void
TRT_BSIdErrContainerCnv_p1::persToTrans
(
const
TRT_BSIdErrContainer_p1
* persCont,
TRT_BSIdErrContainer
* transCont, MsgStream &
/* log */
)
30
{
31
32
std::vector<std::pair<uint8_t, std::pair<uint32_t, uint8_t> >* >
::const_iterator
it = (persCont->
m_bsErrs
).begin();
33
std::vector<std::pair<uint8_t, std::pair<uint32_t, uint8_t> >* >
::const_iterator
itEnd = (persCont->
m_bsErrs
).end();
34
transCont->
reserve
((persCont->
m_bsErrs
).size());
35
36
for
(; it != itEnd; ++it) {
37
transCont->
push_back
(*it);
38
}
39
40
}
41
42
//================================================================
43
TRT_BSIdErrContainer
*
TRT_BSIdErrContainerCnv_p1::createTransient
(
const
TRT_BSIdErrContainer_p1
* persObj, MsgStream& log) {
44
std::unique_ptr<TRT_BSIdErrContainer> trans(std::make_unique<TRT_BSIdErrContainer>());
45
persToTrans
(persObj, trans.get(), log);
46
return
(trans.release());
47
}
DataPool.h
IdentifierHash.h
TRT_BSIdErrContainerCnv_p1.h
TRT_BSIdErrContainer.h
TRT_BSIdErrContainer
DataVector< std::pair< uint8_t, std::pair< uint32_t, uint8_t > > > TRT_BSIdErrContainer
Definition
TRT_BSIdErrContainer.h:21
TRT_BSIdErrContainer_p1.h
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition
checker_macros.h:211
const_iterator
DataVector< std::pair< uint8_t, std::pair< uint32_t, uint8_t > > >::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.
TRT_BSIdErrContainerCnv_p1::createTransient
virtual TRT_BSIdErrContainer * createTransient(const TRT_BSIdErrContainer_p1 *persObj, MsgStream &log)
Definition
TRT_BSIdErrContainerCnv_p1.cxx:43
TRT_BSIdErrContainerCnv_p1::persToTrans
virtual void persToTrans(const TRT_BSIdErrContainer_p1 *persCont, TRT_BSIdErrContainer *transCont, MsgStream &log)
Definition
TRT_BSIdErrContainerCnv_p1.cxx:29
TRT_BSIdErrContainerCnv_p1::transToPers
virtual void transToPers(const TRT_BSIdErrContainer *transCont, TRT_BSIdErrContainer_p1 *persCont, MsgStream &log)
Definition
TRT_BSIdErrContainerCnv_p1.cxx:15
TRT_BSIdErrContainer_p1
Definition
TRT_BSIdErrContainer_p1.h:12
TRT_BSIdErrContainer_p1::m_bsErrs
std::vector< std::pair< uint8_t, std::pair< uint32_t, uint8_t > > * > m_bsErrs
Definition
TRT_BSIdErrContainer_p1.h:18
Generated on
for ATLAS Offline Software by
1.17.0