ATLAS Offline Software
Loading...
Searching...
No Matches
CaloClusterMomentStoreCnv_p1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
10
14
15
16// CaloClusterMomentStore* CaloClusterMomentStoreCnv_p1::createTrans(const CaloClusterMomentStore_p1* pers /*,MsgStream&*/) {
17// CaloClusterMomentStore* trans=new CaloClusterMomentStore();
18// persToTrans(pers,trans);
19// return trans;
20// }
21
23 CaloClusterMomentStore* trans /*,MsgStream&*/) const
24{
25 std::vector<CaloClusterMomentStore_p1::ClusterMoment>::const_iterator it=pers->m_store.begin();
26 std::vector<CaloClusterMomentStore_p1::ClusterMoment>::const_iterator it_e=pers->m_store.end();
27 for (;it!=it_e;++it)
28 trans->insert((CaloClusterMoment::MomentType)it->key,CaloClusterMoment(it->value));
29}
30
31
32
33// CaloClusterMomentStore_p1* CaloClusterMomentStoreCnv_p1::createPers(const CaloClusterMomentStore* trans /*,MsgStream& */) {
34// CaloClusterMomentStore_p1* pers=new CaloClusterMomentStore_p1();
35// transToPers(trans,pers);
36// return pers;
37// }
38
39
41 CaloClusterMomentStore_p1* pers/*,MsgStream&*/) const
42{
45
47 for(;it!=it_e;++it) {
48 mom.key=it.getMomentType();
49 mom.value=it.getMoment().getValue();
50 pers->m_store.push_back(mom);
51 }
52}
void transToPers(const CaloClusterMomentStore *, CaloClusterMomentStore_p1 *) const
void persToTrans(const CaloClusterMomentStore_p1 *, CaloClusterMomentStore *) const
std::vector< ClusterMoment > m_store
Stores CaloClusterMoment in a keyed map.
virtual moment_iterator end() const
iterator loop terminator
CaloClusterMomentIterator moment_iterator
External moment iterator type.
virtual void insert(const moment_type &rMomType, const moment_value &rMomData)
Insert key/data pair.
virtual moment_iterator begin() const
{
defines enums and data types for different moments of CaloCluster
MomentType
enums to identify different moments