Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Sherwood
athena
Commits
0125803d
Commit
0125803d
authored
4 years ago
by
scott snyder
Browse files
Options
Downloads
Patches
Plain Diff
JetRec: Fix memory leak.
PseudoJetContainer needs to delete the objects in m_emptyExtractors.
parent
b9778595
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
+3
-1
3 additions, 1 deletion
Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
+10
-2
10 additions, 2 deletions
Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
with
13 additions
and
3 deletions
Reconstruction/Jet/JetRec/JetRec/PseudoJetContainer.h
+
3
−
1
View file @
0125803d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#define PseudoJetContainer_H
#define PseudoJetContainer_H
/*
/*
Copyright (C) 2002-20
17
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-20
20
CERN for the benefit of the ATLAS collaboration
*/
*/
...
@@ -55,6 +55,8 @@ public:
...
@@ -55,6 +55,8 @@ public:
const
std
::
vector
<
PseudoJet
>
&
vecPJ
,
const
std
::
vector
<
PseudoJet
>
&
vecPJ
,
bool
debug
=
false
);
bool
debug
=
false
);
~
PseudoJetContainer
();
// fill xAOD jet with constit&ghosts extracted from final PSeudoJet
// fill xAOD jet with constit&ghosts extracted from final PSeudoJet
bool
extractConstituents
(
xAOD
::
Jet
&
,
const
std
::
vector
<
PseudoJet
>&
)
const
;
bool
extractConstituents
(
xAOD
::
Jet
&
,
const
std
::
vector
<
PseudoJet
>&
)
const
;
bool
extractConstituents
(
xAOD
::
Jet
&
jet
,
const
PseudoJet
&
finalPJ
)
const
;
bool
extractConstituents
(
xAOD
::
Jet
&
jet
,
const
PseudoJet
&
finalPJ
)
const
;
...
...
This diff is collapsed.
Click to expand it.
Reconstruction/Jet/JetRec/Root/PseudoJetContainer.cxx
+
10
−
2
View file @
0125803d
/*
/*
Copyright (C) 2002-20
17
CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-20
20
CERN for the benefit of the ATLAS collaboration
*/
*/
// PseudoJetContainer.cxx
// PseudoJetContainer.cxx
...
@@ -44,6 +44,14 @@ PseudoJetContainer::PseudoJetContainer(const IConstituentExtractor* c,
...
@@ -44,6 +44,14 @@ PseudoJetContainer::PseudoJetContainer(const IConstituentExtractor* c,
}
}
PseudoJetContainer
::~
PseudoJetContainer
()
{
for
(
const
IConstituentExtractor
*
e
:
m_emptyExtractors
)
{
delete
e
;
}
}
bool
bool
PseudoJetContainer
::
extractConstituents
(
xAOD
::
Jet
&
jet
,
PseudoJetContainer
::
extractConstituents
(
xAOD
::
Jet
&
jet
,
const
std
::
vector
<
PseudoJet
>&
inConstits
)
const
const
std
::
vector
<
PseudoJet
>&
inConstits
)
const
...
@@ -137,7 +145,7 @@ void PseudoJetContainer::append(const PseudoJetContainer* other) {
...
@@ -137,7 +145,7 @@ void PseudoJetContainer::append(const PseudoJetContainer* other) {
pj
.
set_user_index
(
pj
.
user_index
()
+
offset
);
return
pj
;}
pj
.
set_user_index
(
pj
.
user_index
()
+
offset
);
return
pj
;}
);
);
for
(
auto
e
:
other
->
m_emptyExtractors
){
m_emptyExtractors
.
insert
(
e
);}
for
(
auto
e
:
other
->
m_emptyExtractors
){
m_emptyExtractors
.
insert
(
e
->
clone
()
);}
if
(
m_debug
){
checkInvariants
(
"append()"
);}
if
(
m_debug
){
checkInvariants
(
"append()"
);}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment