ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Calorimeter
CaloEvent
src
CaloClusterCellLink.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
#include "
CaloEvent/CaloClusterCellLink.h
"
6
7
CaloClusterCellLink::~CaloClusterCellLink
() =
default
;
8
9
CaloClusterCellLink::CaloClusterCellLink
() =
default
;
10
11
//0-size vector for dummy iterator
12
const
CaloClusterCellLink::linkAndWeightCollType
CaloClusterCellLink::m_dummyIndicesAndWeights
(0);
13
14
// Dummy iterator to be returned by begin/end if no cell-links are present
15
const
CaloClusterCellLink::const_iterator
CaloClusterCellLink::dummyIt
(
nullptr
,
CaloClusterCellLink::m_dummyIndicesAndWeights
.
end
());
16
17
18
19
CaloClusterCellLink::CaloClusterCellLink
(
const
CaloCellContainer
* cellCont) :
20
m_cellCont
(cellCont)
21
{}
22
23
24
CaloClusterCellLink::CaloClusterCellLink
(
const
DataLink<CaloCellContainer>
& cellCont) :
25
m_cellCont
(cellCont)
26
{}
27
28
29
CaloClusterCellLink::iterator
CaloClusterCellLink::removeCell
(
CaloClusterCellLink::iterator
cellItr) {
30
linkAndWeightCollType::iterator toDelete=cellItr.
m_it
;
31
auto
newVecIt=
m_indicesAndWeights
.erase(toDelete);
32
return
{cellItr.
m_ccc
,newVecIt};
33
34
}
35
36
37
bool
CaloClusterCellLink::removeCell
(
const
CaloCell
* ptrToDelete) {
38
bool
success=
false
;
39
CaloClusterCellLink::iterator
it=this->
begin
();
40
CaloClusterCellLink::iterator
it_e=this->
end
();
41
for
(;it!=it_e;++it) {
42
const
CaloCell
* pCell=(*it);
43
if
(pCell==ptrToDelete) {
//Pointer comparison!
44
this->
removeCell
(it);
45
success=
true
;
46
break
;
47
}
//end cell found
48
}
//end for loop
49
return
success;
50
}
51
52
55
void
CaloClusterCellLink::toPersistent
()
56
{
57
m_cellCont
.toPersistent();
58
}
CaloClusterCellLink.h
CaloCellContainer
Container class for CaloCell.
Definition
CaloCellContainer.h:55
CaloCell
Data object for each calorimeter readout cell.
Definition
CaloCell.h:57
CaloClusterCellLink::const_iterator
const_iterator to loop over cells belonging to a cluster
Definition
CaloClusterCellLink.h:57
CaloClusterCellLink::iterator
Definition
CaloClusterCellLink.h:126
CaloClusterCellLink::iterator::m_ccc
const CaloCellContainer * m_ccc
Definition
CaloClusterCellLink.h:173
CaloClusterCellLink::iterator::m_it
linkAndWeightCollType::iterator m_it
Definition
CaloClusterCellLink.h:174
CaloClusterCellLink::m_dummyIndicesAndWeights
static const linkAndWeightCollType m_dummyIndicesAndWeights
Definition
CaloClusterCellLink.h:230
CaloClusterCellLink::dummyIt
static const CaloClusterCellLink::const_iterator dummyIt
Dummy iterator to be used as begin/end if no cell-links are present.
Definition
CaloClusterCellLink.h:102
CaloClusterCellLink::m_indicesAndWeights
linkAndWeightCollType m_indicesAndWeights
Definition
CaloClusterCellLink.h:228
CaloClusterCellLink::m_cellCont
DataLink< CaloCellContainer > m_cellCont
Definition
CaloClusterCellLink.h:227
CaloClusterCellLink::end
const_iterator end() const
const end method
Definition
CaloClusterCellLink.h:112
CaloClusterCellLink::toPersistent
void toPersistent()
Prepare for writing.
Definition
CaloClusterCellLink.cxx:55
CaloClusterCellLink::~CaloClusterCellLink
~CaloClusterCellLink()
standard destructor
CaloClusterCellLink::removeCell
CaloClusterCellLink::iterator removeCell(iterator cellItr)
Method to remove a cell.
Definition
CaloClusterCellLink.cxx:29
CaloClusterCellLink::linkAndWeightCollType
std::vector< std::pair< unsigned, weight_t > > linkAndWeightCollType
Definition
CaloClusterCellLink.h:31
CaloClusterCellLink::begin
const_iterator begin() const
const begin method
Definition
CaloClusterCellLink.h:107
CaloClusterCellLink::CaloClusterCellLink
CaloClusterCellLink()
default constructor (for persistency only)
DataLink
Object reference supporting deferred reading from StoreGate.
Definition
AthLinks/DataLink.h:93
mergePhysValFiles.end
end
Definition
DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
Generated on
for ATLAS Offline Software by
1.17.0