Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
6d311afd
Commit
6d311afd
authored
Feb 12, 2020
by
Jens Kroeger
Browse files
AnalysisTimingATLASpix: simplify the check whether TGraph with correction parameters exists
parent
aa55c2f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/modules/AnalysisTimingATLASpix/AnalysisTimingATLASpix.cpp
View file @
6d311afd
...
...
@@ -344,12 +344,13 @@ void AnalysisTimingATLASpix::initialise() {
"ROOT file doesn't exist. If no row correction shall be applied, remove this parameter "
"from the configuration file."
);
}
gRowCorr
=
static_cast
<
TGraphErrors
*>
(
file
.
Get
(
m_correctionGraph_row
.
c_str
()));
// Check if graph exists in ROOT file:
if
(
!
file
.
GetListOfKeys
()
->
Contains
(
m_correctionGraph_row
.
c_str
())
)
{
if
(
!
gRowCorr
)
{
throw
InvalidValueError
(
m_config
,
"correction_graph_row"
,
"Graph doesn't exist in ROOT file. Use full/path/to/graph."
);
}
gRowCorr
=
static_cast
<
TGraphErrors
*>
(
file
.
Get
(
m_correctionGraph_row
.
c_str
()));
}
else
{
LOG
(
STATUS
)
<<
"----> NO POINTWISE ROW CORRECTION!!!"
;
}
...
...
@@ -362,12 +363,13 @@ void AnalysisTimingATLASpix::initialise() {
"ROOT file doesn't exist. If no row correction shall be applied, remove this parameter "
"from the configuration file."
);
}
gTimeWalkCorr
=
static_cast
<
TGraphErrors
*>
(
file
.
Get
(
m_correctionGraph_timewalk
.
c_str
()));
// Check if graph exists in ROOT file:
if
(
!
file
.
GetListOfKeys
()
->
Contains
(
m_correctionGraph_timewalk
.
c_str
())
)
{
if
(
!
gTimeWalkCorr
)
{
throw
InvalidValueError
(
m_config
,
"correction_graph_timewalk"
,
"Graph doesn't exist in ROOT file. Use full/path/to/graph."
);
}
gTimeWalkCorr
=
static_cast
<
TGraphErrors
*>
(
file
.
Get
(
m_correctionGraph_timewalk
.
c_str
()));
}
else
{
LOG
(
STATUS
)
<<
"----> NO POINTWISE TIMEWALK CORRECTION!!!"
;
}
...
...
Jens Kroeger
@jekroege
mentioned in commit
5d99c18a
·
Jun 18, 2020
mentioned in commit
5d99c18a
mentioned in commit 5d99c18a2b367235becee1d82401cb21da36fe2d
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment