ATLAS Offline Software
Loading...
Searching...
No Matches
CaloClusterMomentStore.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7
8// constructor
11
17
23
26{
27 if (this != &rMomStore)
28 m_store = rMomStore.m_store;
29 return *this;
30}
31
32// destructor
35
36// retrieve moment value
38 moment_value& rMomData) const
39{
40 moment_iterator fIter = this->find(rMomType);
41 return this->retrieve(fIter,rMomData);
42}
44 moment_value& rMomData) const
45{
46 if ( rMomIter != this->end() )
47 {
48 rMomData = rMomIter.getMoment();
49 return true;
50 }
51 else
52 {
53 return false;
54 }
55}
56
57// retrieve all stored moment types
59 rMomList) const
60{
61 size_t oldSize = rMomList.size();
62 moment_store_const_iter fMom = m_store.begin();
64 for ( ; fMom != lMom; ++fMom )
65 {
66 rMomList.push_back((moment_type)(*fMom).first);
67 }
68 return oldSize < rMomList.size();
69}
70
71
72#ifdef __clang__
73CaloClusterMomentStore::CaloClusterMomentIterator::~CaloClusterMomentIterator() {}
74#endif
Stores CaloClusterMoment in a keyed map.
std::vector< moment_type > moment_type_list
List of moment types.
moment_store::const_iterator moment_store_const_iter
Internal moment store const iterator type.
virtual ~CaloClusterMomentStore()
Default destructor.
virtual moment_iterator end() const
iterator loop terminator
CaloClusterMomentIterator moment_iterator
External moment iterator type.
CaloClusterMomentStore & operator=(const CaloClusterMomentStore &rMomStore)
Assignment.
CaloClusterMoment::MomentType moment_type
Moment type.
virtual bool retrieveMomentTypes(moment_type_list &rMomTypeList) const
Retrieve list of moment types in store.
CaloClusterMomentStore()
Default constructor.
virtual bool retrieve(const moment_type &rMomType, moment_value &rMomData) const
Retrieve cluster moment for a given key.
CaloClusterMoment moment_value
Moment data.
virtual moment_iterator find(const moment_type &rMomType) const
}