Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
atlas
athena
Commits
f44c624a
Commit
f44c624a
authored
7 years ago
by
Federico
Browse files
Options
Downloads
Patches
Plain Diff
use smart pointers to get rid of mem-leak
parent
f3f53063
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
+8
-7
8 additions, 7 deletions
Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
+1
-2
1 addition, 2 deletions
Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
with
9 additions
and
9 deletions
Reconstruction/tauRecTools/Root/TauWPDecorator.cxx
+
8
−
7
View file @
f44c624a
...
...
@@ -75,13 +75,15 @@ StatusCode TauWPDecorator::retrieveHistos(int nProng) {
}
// Clone histogram and store locally
TH2
*
myLocalGraph
=
(
TH2
*
)
myGraph
->
Clone
();
myLocalGraph
->
SetDirectory
(
0
);
std
::
unique_ptr
<
TH2
>
myLocalGraph1P
((
TH2
*
)
myGraph
->
Clone
());
std
::
unique_ptr
<
TH2
>
myLocalGraph3P
((
TH2
*
)
myGraph
->
Clone
());
myLocalGraph1P
->
SetDirectory
(
0
);
myLocalGraph3P
->
SetDirectory
(
0
);
if
(
nProng
==
1
)
m_hists1P
.
push_back
(
m_pair_t
(
float
(
i
)
/
100.
,
myLocalGraph
));
m_hists1P
.
push_back
(
m_pair_t
(
float
(
i
)
/
100.
,
std
::
move
(
myLocalGraph
1P
)
));
else
m_hists3P
.
push_back
(
m_pair_t
(
float
(
i
)
/
100.
,
myLocalGraph
));
m_hists3P
.
push_back
(
m_pair_t
(
float
(
i
)
/
100.
,
std
::
move
(
myLocalGraph
3P
)
));
}
return
StatusCode
::
SUCCESS
;
...
...
@@ -102,8 +104,7 @@ StatusCode TauWPDecorator::storeLimits(int nProng) {
// Store limits
for
(
unsigned
int
i
=
0
;
i
<
histArray
->
size
();
i
++
)
{
TH2
*
myHist
=
histArray
->
at
(
i
).
second
;
TH2
*
myHist
=
histArray
->
at
(
i
).
second
.
get
();
m_xmin
[
nProng
]
=
TMath
::
Min
(
myHist
->
GetXaxis
()
->
GetXmin
(),
m_xmin
[
nProng
]);
m_ymin
[
nProng
]
=
TMath
::
Min
(
myHist
->
GetYaxis
()
->
GetXmin
(),
m_ymin
[
nProng
]);
...
...
@@ -198,7 +199,7 @@ StatusCode TauWPDecorator::execute(xAOD::TauJet& pTau)
// Loop over all histograms
for
(
unsigned
int
i
=
0
;
i
<
histArray
->
size
();
i
++
)
{
TH2
*
myHist
=
histArray
->
at
(
i
).
second
;
TH2
*
myHist
=
histArray
->
at
(
i
).
second
.
get
()
;
double
myCut
=
myHist
->
Interpolate
(
pt
,
y_var
);
// Find upper and lower cuts
...
...
This diff is collapsed.
Click to expand it.
Reconstruction/tauRecTools/tauRecTools/TauWPDecorator.h
+
1
−
2
View file @
f44c624a
...
...
@@ -24,7 +24,6 @@ class TH2;
*
*/
class
TauWPDecorator
:
public
TauRecToolBase
{
public:
...
...
@@ -50,7 +49,7 @@ private:
std
::
string
m_file1P
;
//!< energy calibration file
std
::
string
m_file3P
;
//!< energy calibration file
typedef
std
::
pair
<
double
,
TH2
*
>
m_pair_t
;
typedef
std
::
pair
<
double
,
std
::
unique_ptr
<
TH2
>
>
m_pair_t
;
std
::
vector
<
m_pair_t
>
m_hists1P
;
std
::
vector
<
m_pair_t
>
m_hists3P
;
...
...
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