ATLAS Offline Software
Loading...
Searching...
No Matches
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
6
10
11
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
28 const std::string& /*key*/,
29 MsgStream &log) const
30{
31 pers->m_links.resize(trans->size());
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}
virtual void transToPersWithKey(const CaloCellLinkContainer *, CaloCellLinkContainer_p1 *, const std::string &key, MsgStream &log) const override
virtual void persToTransWithKey(const CaloCellLinkContainer_p1 *, CaloCellLinkContainer *, const std::string &key, MsgStream &log) const override
NavigableCnv_p1< Navigable< CaloCellContainer, double >, float > m_converter
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.
size_type size() const noexcept
Returns the number of elements in the collection.
Cache thinning decisions for converters.
Helpers to retrieve the current thinning cache from the event context.
const SG::ThinningCache * getThinningCache()
Retrieve the current thinning cache from the current event context.