ATLAS Offline Software
Loading...
Searching...
No Matches
CaloShowerContainerCnv_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
9
13
16 MsgStream& /*log*/) const
17{
18 const std::vector<CaloShowerContainer_p1::CaloShower>& persCont=pers->m_container;
19 trans->resize(persCont.size());
23 for (;it!=it_e;++it,++i) {
24 CaloShower* shower=new CaloShower();
25 trans->at(i)=shower;
26 m_momentStoreCnv.persToTrans(&it->m_momentStore,&(shower->getMomentStore()));
27 m_samplingDataCnv.persToTrans(&it->m_samplingStore,&(shower->getSamplingStore()));
28 }
29}
30
33 MsgStream& /*log*/) const
34{
35 std::vector<CaloShowerContainer_p1::CaloShower>& persCont=pers->m_container;
36 persCont.resize(trans->size());
39 std::vector<CaloShowerContainer_p1::CaloShower>::size_type i=0;
40 for(;it!=it_e;++it,++i) {
41 m_momentStoreCnv.transToPers(&((*it)->getMomentStore()),&(persCont[i].m_momentStore));
42 m_samplingDataCnv.transToPers(&((*it)->getSamplingStore()),&(persCont[i].m_samplingStore));
43 }
44}
CaloSamplingDataCnv_p1 m_samplingDataCnv
virtual void transToPers(const CaloShowerContainer *, CaloShowerContainer_p1 *, MsgStream &log) const override final
virtual void persToTrans(const CaloShowerContainer_p1 *, CaloShowerContainer *, MsgStream &log) const override final
CaloClusterMomentStoreCnv_p1 m_momentStoreCnv
std::vector< CaloShower > m_container
std::vector< CaloShower >::const_iterator const_iterator
Container class for CaloShower.
Data class for cluster variables associated with a CaloCluster.
Definition CaloShower.h:12
const moment_store & getMomentStore() const
Access cluster moment store.
Definition CaloShower.h:71
const sampling_store & getSamplingStore() const
Retrieves the non-modifiable sampling data store.
Definition CaloShower.h:77
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
void resize(size_type sz)
Resizes the collection to the specified number of elements.
typename DataVectorBase< CaloShower >::Base::size_type size_type
Definition DataVector.h:814
const T * at(size_type n) const
Access an element, as an rvalue.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.