ATLAS Offline Software
Public Member Functions | List of all members
CaloClusterMomentContainerCnv_p1 Class Reference

#include <CaloClusterMomentContainerCnv_p1.h>

Collaboration diagram for CaloClusterMomentContainerCnv_p1:

Public Member Functions

 CaloClusterMomentContainerCnv_p1 ()
 
void persToTrans (const CaloClusterMomentContainer_p1 *pers, CaloClusterMomentStore *trans, CaloClusterMomentContainer_p1::const_iterator &momentStoreIterator) const
 
void transToPers (const CaloClusterMomentStore *trans, CaloClusterMomentContainer_p1 *pers) const
 
bool setIterator (const CaloClusterMomentContainer_p1 *pers, unsigned int ncluster, CaloClusterMomentContainer_p1::const_iterator &momentStoreIterator) const
 

Detailed Description

Definition at line 17 of file CaloClusterMomentContainerCnv_p1.h.

Constructor & Destructor Documentation

◆ CaloClusterMomentContainerCnv_p1()

CaloClusterMomentContainerCnv_p1::CaloClusterMomentContainerCnv_p1 ( )

Definition at line 10 of file CaloClusterMomentContainerCnv_p1.cxx.

11 {
12 }

Member Function Documentation

◆ persToTrans()

void CaloClusterMomentContainerCnv_p1::persToTrans ( const CaloClusterMomentContainer_p1 pers,
CaloClusterMomentStore trans,
CaloClusterMomentContainer_p1::const_iterator momentStoreIterator 
) const

Definition at line 27 of file CaloClusterMomentContainerCnv_p1.cxx.

30 {
31  typedef CaloClusterMomentStore::moment_store moment_store;
32  typedef moment_store::value_type value_type;
33  moment_store transStore;
34 
35  for (unsigned short i=0;i<pers->m_nMoments;++i) {
36  //trans->insert((CaloClusterMoment::MomentType)momentStoreIterator->key,
37  // CaloClusterMoment(momentStoreIterator->value));
38  //Insert with 'hint', should be faster
39  transStore.insert(transStore.end(),
40  value_type(momentStoreIterator->key,
41  momentStoreIterator->value));
42  ++momentStoreIterator;
43  }
44  trans->setMomentStore (std::move (transStore));
45 }

◆ setIterator()

bool CaloClusterMomentContainerCnv_p1::setIterator ( const CaloClusterMomentContainer_p1 pers,
unsigned int  ncluster,
CaloClusterMomentContainer_p1::const_iterator momentStoreIterator 
) const

Definition at line 47 of file CaloClusterMomentContainerCnv_p1.cxx.

50 {
51  momentStoreIterator=pers->m_store.begin();
52 
53  if (pers->m_nMoments * ncluster != pers->m_store.size()) {
54  REPORT_MESSAGE_WITH_CONTEXT(MSG::WARNING, "CaloClusterMomentContainerCnv_p1")
55  << "Corrupted persistent data seen: "
56  << ncluster << " clusters * "
57  << pers->m_nMoments << " moments != "
58  << pers->m_store.size() << " stored values.";
59  return false;
60  }
61 
62  return true;
63 }

◆ transToPers()

void CaloClusterMomentContainerCnv_p1::transToPers ( const CaloClusterMomentStore trans,
CaloClusterMomentContainer_p1 pers 
) const

Definition at line 14 of file CaloClusterMomentContainerCnv_p1.cxx.

16 {
20  for(;it!=it_e;++it) {
21  mom.key=it.getMomentType();
22  mom.value=it.getMoment().getValue();
23  pers->m_store.push_back(mom);
24  }
25 }

The documentation for this class was generated from the following files:
CaloClusterMomentContainer_p1::m_nMoments
unsigned short m_nMoments
Definition: CaloClusterMomentContainer_p1.h:19
CaloClusterMomentStore::setMomentStore
virtual void setMomentStore(const moment_store &rMomStore)
Set internal store.
Definition: CaloClusterMomentStore.h:253
skel.it
it
Definition: skel.GENtoEVGEN.py:396
CaloClusterMomentStore::CaloClusterMomentIterator
Internally used iterator.
Definition: CaloClusterMomentStore.h:54
CaloClusterMomentStore::begin
virtual moment_iterator begin() const
{
Definition: CaloClusterMomentStore.h:220
ParticleGun_EoverP_Config.mom
mom
Definition: ParticleGun_EoverP_Config.py:63
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
CaloClusterMomentStore::moment_store
std::map< moment_key, moment_value > moment_store
Internal moment store type.
Definition: CaloClusterMomentStore.h:35
CaloClusterMomentStore::end
virtual moment_iterator end() const
iterator loop terminator
Definition: CaloClusterMomentStore.h:226
CaloClusterMomentContainer_p1::ClusterMoment_p
Definition: CaloClusterMomentContainer_p1.h:14
value_type
Definition: EDM_MasterSearch.h:11
CaloClusterMomentContainer_p1::m_store
std::vector< ClusterMoment_p > m_store
Definition: CaloClusterMomentContainer_p1.h:18