ATLAS Offline Software
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 
11 {
12 }
13 
15  CaloShowerContainer* trans,
16  MsgStream& /*log*/) const
17 {
18  const std::vector<CaloShowerContainer_p1::CaloShower>& persCont=pers->m_container;
19  trans->resize(persCont.size());
21  CaloShowerContainer_p1::const_iterator it_e=persCont.end();
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 }
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
CaloShowerContainerCnv_p1.h
CaloShowerContainer
Container class for CaloShower.
Definition: CaloShowerContainer.h:15
CaloShowerContainer_p1::const_iterator
std::vector< CaloShower >::const_iterator const_iterator
Definition: CaloShowerContainer_p1.h:27
skel.it
it
Definition: skel.GENtoEVGEN.py:423
CaloClusterMomentStoreCnv_p1::persToTrans
void persToTrans(const CaloClusterMomentStore_p1 *, CaloClusterMomentStore *) const
Definition: CaloClusterMomentStoreCnv_p1.cxx:22
CaloSamplingDataCnv_p1::persToTrans
void persToTrans(const CaloSamplingData_p1 *, CaloSamplingData *) const
Definition: CaloSamplingDataCnv_p1.cxx:18
CaloShower
Data class for cluster variables associated with a CaloCluster.
Definition: CaloShower.h:12
CaloShowerContainerCnv_p1::m_momentStoreCnv
CaloClusterMomentStoreCnv_p1 m_momentStoreCnv
Definition: CaloShowerContainerCnv_p1.h:38
CaloClusterMomentStoreCnv_p1::transToPers
void transToPers(const CaloClusterMomentStore *, CaloClusterMomentStore_p1 *) const
Definition: CaloClusterMomentStoreCnv_p1.cxx:40
CaloShower::getSamplingStore
const sampling_store & getSamplingStore() const
Retrieves the non-modifiable sampling data store.
Definition: CaloShower.h:77
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloShowerContainer.h
CaloShowerContainerCnv_p1::m_samplingDataCnv
CaloSamplingDataCnv_p1 m_samplingDataCnv
Definition: CaloShowerContainerCnv_p1.h:39
CaloShower::getMomentStore
const moment_store & getMomentStore() const
Access cluster moment store.
Definition: CaloShower.h:71
DataVector::resize
void resize(size_type sz)
Resizes the collection to the specified number of elements.
CaloShowerContainerCnv_p1::transToPers
virtual void transToPers(const CaloShowerContainer *, CaloShowerContainer_p1 *, MsgStream &log) const override final
Definition: CaloShowerContainerCnv_p1.cxx:31
CaloShowerContainerCnv_p1::persToTrans
virtual void persToTrans(const CaloShowerContainer_p1 *, CaloShowerContainer *, MsgStream &log) const override final
Definition: CaloShowerContainerCnv_p1.cxx:14
CaloSamplingDataCnv_p1::transToPers
void transToPers(const CaloSamplingData *, CaloSamplingData_p1 *) const
Definition: CaloSamplingDataCnv_p1.cxx:45
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CaloShowerContainer_p1::m_container
std::vector< CaloShower > m_container
Definition: CaloShowerContainer_p1.h:26
CaloShowerContainer_p1.h
CaloShowerContainerCnv_p1::CaloShowerContainerCnv_p1
CaloShowerContainerCnv_p1()
Definition: CaloShowerContainerCnv_p1.cxx:10
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
DataVector< CaloShower >::size_type
BASE::size_type size_type
Definition: DataVector.h:813
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
CaloShowerContainer_p1
Definition: CaloShowerContainer_p1.h:15
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.