ATLAS Offline Software
CaloShowerContainerCnv_p2.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 
12  CaloShowerContainer* trans,
13  MsgStream&) const
14 {
18  pers->m_nClusters,
19  momentStoreIterator) ||
21  pers->m_nClusters,
22  samplingState))
23  {
24  REPORT_MESSAGE_WITH_CONTEXT(MSG::WARNING, "CaloShowerContainerCnv_p2")
25  << "Not converting CaloShowerContainer.";
26  return;
27  }
28 
29  trans->clear();
30  trans->reserve(pers->m_nClusters);
31  for (unsigned i=0;i<pers->m_nClusters;++i) {
32  CaloShower* shower=new CaloShower();
33  //trans->at(i)=shower;
35  momentStoreIterator);
37  samplingState);
38  trans->push_back(shower);
39  }
40 }
41 
42 
45  MsgStream& log) const
46 {
47  pers->m_nClusters=trans->size();
50  if (it!=it_e) {
51  //The var-type pattern and the sampling pattern are stored in CaloSamplingDataContainer_p1
52  //(once for the entire container)
53  //pers->m_samplingDataContainer.m_varTypePattern=(*it)->m_samplingStore.m_varTypePattern;
54  //pers->m_samplingDataContainer.m_samplingPattern=(*it)->m_samplingStore.m_samplingPattern; *** TO BE SOLVED !!!!!
55  pers->m_momentContainer.m_nMoments=(*it)->getMomentStore().size();
56 
57  }
58  for(;it!=it_e;++it) {
59  m_momentContainerCnv.transToPers(&((*it)->getMomentStore()),&(pers->m_momentContainer));
60  m_samplingContainerCnv.transToPers(&((*it)->getSamplingStore()),&(pers->m_samplingDataContainer),log);
61  }
62 }
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
CaloClusterMomentContainer_p1::m_nMoments
unsigned short m_nMoments
Definition: CaloClusterMomentContainer_p1.h:19
CaloClusterMomentContainer_p1::const_iterator
std::vector< ClusterMoment_p >::const_iterator const_iterator
Definition: CaloClusterMomentContainer_p1.h:20
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
CaloShowerContainer
Container class for CaloShower.
Definition: CaloShowerContainer.h:15
CaloShowerContainerCnv_p2::m_samplingContainerCnv
CaloSamplingDataContainerCnv_p1 m_samplingContainerCnv
Definition: CaloShowerContainerCnv_p2.h:41
CaloShowerContainer_p2::m_nClusters
unsigned int m_nClusters
Definition: CaloShowerContainer_p2.h:19
CaloShowerContainerCnv_p2.h
CaloSamplingDataContainerCnv_p1::persToTrans
void persToTrans(const CaloSamplingDataContainer_p1 *pers, CaloSamplingData *trans, State &state) const
Definition: CaloSamplingDataContainerCnv_p1.cxx:29
skel.it
it
Definition: skel.GENtoEVGEN.py:396
CaloShower
Data class for cluster variables associated with a CaloCluster.
Definition: CaloShower.h:12
CaloShower::getSamplingStore
const sampling_store & getSamplingStore() const
Retrieves the non-modifiable sampling data store.
Definition: CaloShower.h:77
CaloShowerContainerCnv_p2::persToTrans
virtual void persToTrans(const CaloShowerContainer_p2 *pers, CaloShowerContainer *trans, MsgStream &) const override
Definition: CaloShowerContainerCnv_p2.cxx:11
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloShowerContainerCnv_p2::transToPers
virtual void transToPers(const CaloShowerContainer *trans, CaloShowerContainer_p2 *pers, MsgStream &) const override
Definition: CaloShowerContainerCnv_p2.cxx:43
CaloShowerContainerCnv_p2::m_momentContainerCnv
CaloClusterMomentContainerCnv_p1 m_momentContainerCnv
Definition: CaloShowerContainerCnv_p2.h:40
CaloSamplingDataContainerCnv_p1::State
Definition: CaloSamplingDataContainerCnv_p1.h:18
CaloShowerContainer.h
CaloClusterMomentContainerCnv_p1::persToTrans
void persToTrans(const CaloClusterMomentContainer_p1 *pers, CaloClusterMomentStore *trans, CaloClusterMomentContainer_p1::const_iterator &momentStoreIterator) const
Definition: CaloClusterMomentContainerCnv_p1.cxx:27
DataVector::clear
void clear()
Erase all the elements in the collection.
REPORT_MESSAGE_WITH_CONTEXT
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:345
CaloShower::getMomentStore
const moment_store & getMomentStore() const
Access cluster moment store.
Definition: CaloShower.h:71
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CaloSamplingDataContainerCnv_p1::transToPers
void transToPers(const CaloSamplingData *trans, CaloSamplingDataContainer_p1 *pers, MsgStream &log) const
Definition: CaloSamplingDataContainerCnv_p1.cxx:9
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
CaloClusterMomentContainerCnv_p1::transToPers
void transToPers(const CaloClusterMomentStore *trans, CaloClusterMomentContainer_p1 *pers) const
Definition: CaloClusterMomentContainerCnv_p1.cxx:14
CaloShowerContainer_p2::m_samplingDataContainer
CaloSamplingDataContainer_p1 m_samplingDataContainer
Definition: CaloShowerContainer_p2.h:18
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CaloShowerContainer_p2
Definition: CaloShowerContainer_p2.h:14
CaloClusterMomentContainerCnv_p1::setIterator
bool setIterator(const CaloClusterMomentContainer_p1 *pers, unsigned int ncluster, CaloClusterMomentContainer_p1::const_iterator &momentStoreIterator) const
Definition: CaloClusterMomentContainerCnv_p1.cxx:47
CaloSamplingDataContainerCnv_p1::setState
bool setState(const CaloSamplingDataContainer_p1 *pers, unsigned int ncluster, State &state) const
Definition: CaloSamplingDataContainerCnv_p1.cxx:59
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloShowerContainer_p2.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
CaloShowerContainer_p2::m_momentContainer
CaloClusterMomentContainer_p1 m_momentContainer
Definition: CaloShowerContainer_p2.h:17
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.