ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloCnv
CaloTPCnv
src
CaloCellLinkContainerCnv_p1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
CaloTPCnv/CaloCellLinkContainerCnv_p1.h
"
6
7
#include "
CaloEvent/CaloCellLinkContainer.h
"
8
#include "
CaloTPCnv/CaloCellLinkContainer_p1.h
"
9
#include "
AthenaKernel/getThinningCache.h
"
10
11
12
void
CaloCellLinkContainerCnv_p1::persToTransWithKey
(
const
CaloCellLinkContainer_p1
* pers,
13
CaloCellLinkContainer
* trans,
14
const
std::string&
/*key*/
,
15
MsgStream &log)
const
16
{
17
trans->
reserve
(pers->
m_links
.size());
18
for
(
const
CaloCellLinkContainer_p1::CellLink
& l : pers->
m_links
) {
19
auto
lnk = std::make_unique<CaloCellLink>();
20
m_converter
.persToTrans (l, *lnk, log);
21
trans->
push_back
(std::move (lnk));
22
}
23
}
24
25
26
void
CaloCellLinkContainerCnv_p1::transToPersWithKey
(
const
CaloCellLinkContainer
* trans,
27
CaloCellLinkContainer_p1
* pers,
28
const
std::string&
/*key*/
,
29
MsgStream &log)
const
30
{
31
pers->
m_links
.resize(trans->
size
());
32
const
SG::ThinningCache
* cache =
SG::getThinningCache
();
33
std::vector<CaloCellLinkContainer_p1::CellLink>::size_type i=0;
34
for
(
const
CaloCellLink
* l : *trans) {
35
m_converter
.transToPers (*l, pers->
m_links
[i], cache, log);
36
++i;
37
}
38
}
CaloCellLinkContainerCnv_p1.h
CaloCellLinkContainer.h
CaloCellLinkContainer_p1.h
CaloCellLinkContainerCnv_p1::transToPersWithKey
virtual void transToPersWithKey(const CaloCellLinkContainer *, CaloCellLinkContainer_p1 *, const std::string &key, MsgStream &log) const override
Definition
CaloCellLinkContainerCnv_p1.cxx:26
CaloCellLinkContainerCnv_p1::persToTransWithKey
virtual void persToTransWithKey(const CaloCellLinkContainer_p1 *, CaloCellLinkContainer *, const std::string &key, MsgStream &log) const override
Definition
CaloCellLinkContainerCnv_p1.cxx:12
CaloCellLinkContainerCnv_p1::m_converter
NavigableCnv_p1< Navigable< CaloCellContainer, double >, float > m_converter
Definition
CaloCellLinkContainerCnv_p1.h:39
CaloCellLinkContainer_p1
Definition
CaloCellLinkContainer_p1.h:13
CaloCellLinkContainer_p1::CellLink
Navigable_p1< unsigned int, float > CellLink
Definition
CaloCellLinkContainer_p1.h:16
CaloCellLinkContainer_p1::m_links
std::vector< CellLink > m_links
Definition
CaloCellLinkContainer_p1.h:17
CaloCellLinkContainer
Container class for CaloCellLink.
Definition
CaloCellLinkContainer.h:26
CaloCellLink
Simple store for CaloCell links.
Definition
CaloCellLink.h:15
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::size
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ThinningCache
Cache thinning decisions for converters.
Definition
ThinningCache.h:48
getThinningCache.h
Helpers to retrieve the current thinning cache from the event context.
SG::getThinningCache
const SG::ThinningCache * getThinningCache()
Retrieve the current thinning cache from the current event context.
Definition
getThinningCache.cxx:41
Generated on
for ATLAS Offline Software by
1.17.0