ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloEvent
src
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
6
#include "
CaloEvent/CaloClusterMomentStore.h
"
7
8
// constructor
9
CaloClusterMomentStore::CaloClusterMomentStore
()
10
{ }
11
12
CaloClusterMomentStore::CaloClusterMomentStore
(
const
CaloClusterMomentStore
&
13
rMomStore)
14
:
m_store
(rMomStore.
m_store
)
15
{
16
}
17
18
CaloClusterMomentStore::CaloClusterMomentStore
(
const
CaloClusterMomentStore
*
19
pMomStore)
20
:
m_store
(pMomStore->
m_store
)
21
{
22
}
23
24
CaloClusterMomentStore
&
25
CaloClusterMomentStore::operator=
(
const
CaloClusterMomentStore
& rMomStore)
26
{
27
if
(
this
!= &rMomStore)
28
m_store
= rMomStore.
m_store
;
29
return
*
this
;
30
}
31
32
// destructor
33
CaloClusterMomentStore::~CaloClusterMomentStore
()
34
{ }
35
36
// retrieve moment value
37
bool
CaloClusterMomentStore::retrieve
(
const
moment_type
& rMomType,
38
moment_value
& rMomData)
const
39
{
40
moment_iterator
fIter = this->
find
(rMomType);
41
return
this->
retrieve
(fIter,rMomData);
42
}
43
bool
CaloClusterMomentStore::retrieve
(
const
moment_iterator
& rMomIter,
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
58
bool
CaloClusterMomentStore::retrieveMomentTypes
(
moment_type_list
&
59
rMomList)
const
60
{
61
size_t
oldSize = rMomList.size();
62
moment_store_const_iter
fMom =
m_store
.begin();
63
moment_store_const_iter
lMom =
m_store
.end();
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__
73
CaloClusterMomentStore::CaloClusterMomentIterator::~CaloClusterMomentIterator() {}
74
#endif
CaloClusterMomentStore.h
CaloClusterMomentStore
Stores CaloClusterMoment in a keyed map.
Definition
CaloClusterMomentStore.h:15
CaloClusterMomentStore::moment_type_list
std::vector< moment_type > moment_type_list
List of moment types.
Definition
CaloClusterMomentStore.h:41
CaloClusterMomentStore::moment_store_const_iter
moment_store::const_iterator moment_store_const_iter
Internal moment store const iterator type.
Definition
CaloClusterMomentStore.h:37
CaloClusterMomentStore::~CaloClusterMomentStore
virtual ~CaloClusterMomentStore()
Default destructor.
Definition
CaloClusterMomentStore.cxx:33
CaloClusterMomentStore::end
virtual moment_iterator end() const
iterator loop terminator
Definition
CaloClusterMomentStore.h:226
CaloClusterMomentStore::moment_iterator
CaloClusterMomentIterator moment_iterator
External moment iterator type.
Definition
CaloClusterMomentStore.h:137
CaloClusterMomentStore::operator=
CaloClusterMomentStore & operator=(const CaloClusterMomentStore &rMomStore)
Assignment.
Definition
CaloClusterMomentStore.cxx:25
CaloClusterMomentStore::moment_type
CaloClusterMoment::MomentType moment_type
Moment type.
Definition
CaloClusterMomentStore.h:31
CaloClusterMomentStore::retrieveMomentTypes
virtual bool retrieveMomentTypes(moment_type_list &rMomTypeList) const
Retrieve list of moment types in store.
Definition
CaloClusterMomentStore.cxx:58
CaloClusterMomentStore::CaloClusterMomentStore
CaloClusterMomentStore()
Default constructor.
Definition
CaloClusterMomentStore.cxx:9
CaloClusterMomentStore::retrieve
virtual bool retrieve(const moment_type &rMomType, moment_value &rMomData) const
Retrieve cluster moment for a given key.
Definition
CaloClusterMomentStore.cxx:37
CaloClusterMomentStore::moment_value
CaloClusterMoment moment_value
Moment data.
Definition
CaloClusterMomentStore.h:29
CaloClusterMomentStore::find
virtual moment_iterator find(const moment_type &rMomType) const
}
Definition
CaloClusterMomentStore.h:232
CaloClusterMomentStore::m_store
moment_store m_store
Definition
CaloClusterMomentStore.h:210
Generated on
for ATLAS Offline Software by
1.17.0