Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPNL_GAMMA
gammaware
Commits
6992c373
Commit
6992c373
authored
Jul 05, 2019
by
Jérémie Dudouet
Browse files
corr a bug when histos are not filled
parent
d57577fa
Pipeline
#36650
passed with stage
in 4 minutes and 7 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
21 deletions
+25
-21
src/root/gui/fipps_spy/src/FSGlobalCanvas.cpp
src/root/gui/fipps_spy/src/FSGlobalCanvas.cpp
+2
-1
src/root/gui/fipps_spy/src/FSMainWindow.cpp
src/root/gui/fipps_spy/src/FSMainWindow.cpp
+23
-20
No files found.
src/root/gui/fipps_spy/src/FSGlobalCanvas.cpp
View file @
6992c373
...
...
@@ -69,7 +69,8 @@ void FSGlobalCanvas::PlotCanvas()
FSPad
*
pad
=
dynamic_cast
<
FSPad
*>
(
fMain
->
GetTabPage
()
->
GetPad
(
fMain
->
GetTabPage
()
->
GetCurrent
(),
i
+
1
));
pad
->
cd
();
fListOfHists
->
At
(
i
)
->
Draw
(
"hist"
);
if
(
fListOfHists
->
At
(
i
)
->
InheritsFrom
(
TH1
::
Class
())
&&
((
TH1
*
)
fListOfHists
->
At
(
i
))
->
GetEntries
()
>
0
)
fListOfHists
->
At
(
i
)
->
Draw
(
"hist"
);
}
gROOT
->
SetSelectedPad
(
c
->
cd
(
1
));
...
...
src/root/gui/fipps_spy/src/FSMainWindow.cpp
View file @
6992c373
...
...
@@ -210,13 +210,13 @@ void FSMainWindow::NewTab(TString name, Int_t npx, Int_t npy)
void
FSMainWindow
::
CloseWindow
()
{
UnmapWindow
();
DeleteWindow
();
// launch a delete but after a short time like a thread.
UnmapWindow
();
DeleteWindow
();
// launch a delete but after a short time like a thread.
cout
<<
" Bye Bye FIPPSSpy!"
<<
endl
;
cout
<<
" Bye Bye FIPPSSpy!"
<<
endl
;
gApplication
->
SetReturnFromRun
(
false
);
gApplication
->
Terminate
(
false
);
gApplication
->
SetReturnFromRun
(
false
);
gApplication
->
Terminate
(
false
);
}
TPad
*
FSMainWindow
::
GetSelectedPad
()
...
...
@@ -434,9 +434,10 @@ void FSMainWindow::ReadCal()
Int_t
id
=
((
TString
)
Buffer
=
loa
->
At
(
0
)
->
GetName
()).
Atoi
();
for
(
int
i
=
1
;
i
<
loa
->
GetEntries
()
;
i
++
)
{
for
(
int
i
=
1
;
i
<
loa
->
GetEntries
()
;
i
++
)
fListOfCal
[
id
][
i
-
1
]
=
((
TString
)
loa
->
At
(
i
)
->
GetName
()).
Atof
();
}
if
(
fListOfCal
[
id
][
1
]
==
0.
)
fListOfCal
[
id
][
1
]
=
0.00001
;
delete
loa
;
}
...
...
@@ -501,23 +502,26 @@ void FSMainWindow::GetLastShiftTrack()
if
(
Buffer
.
BeginsWith
(
"#"
)
||
Buffer
.
Length
()
==
0
)
continue
;
TObjArray
*
loa
=
Buffer
.
ReplaceAll
(
"
\t
"
,
" "
).
Tokenize
(
" "
);
if
(
loa
->
GetEntries
()
==
2
)
{
fListOfShiftTrack
[
linenb
-
1
][
0
]
=
((
TString
)
loa
->
At
(
0
)
->
GetName
()).
Atof
();
fListOfShiftTrack
[
linenb
-
1
][
1
]
=
((
TString
)
loa
->
At
(
1
)
->
GetName
()).
Atof
();
}
else
if
(
loa
->
GetEntries
()
==
3
)
{
fListOfShiftTrack
[
linenb
-
1
][
0
]
=
((
TString
)
loa
->
At
(
1
)
->
GetName
()).
Atof
();
fListOfShiftTrack
[
linenb
-
1
][
1
]
=
((
TString
)
loa
->
At
(
2
)
->
GetName
()).
Atof
();
}
if
(
loa
->
GetEntries
()
==
2
)
{
fListOfShiftTrack
[
linenb
-
1
][
0
]
=
((
TString
)
loa
->
At
(
0
)
->
GetName
()).
Atof
();
fListOfShiftTrack
[
linenb
-
1
][
1
]
=
((
TString
)
loa
->
At
(
1
)
->
GetName
()).
Atof
();
if
(
fListOfShiftTrack
[
linenb
-
1
][
1
]
==
0.
)
fListOfShiftTrack
[
linenb
-
1
][
1
]
=
0.00001
;
}
else
if
(
loa
->
GetEntries
()
==
3
)
{
Int_t
Id
=
((
TString
)
loa
->
At
(
0
)
->
GetName
()).
Atoi
();
fListOfShiftTrack
[
Id
][
0
]
=
((
TString
)
loa
->
At
(
1
)
->
GetName
()).
Atof
();
fListOfShiftTrack
[
Id
][
1
]
=
((
TString
)
loa
->
At
(
2
)
->
GetName
()).
Atof
();
if
(
fListOfShiftTrack
[
Id
][
1
]
==
0.
)
fListOfShiftTrack
[
Id
][
1
]
=
0.00001
;
}
else
{
WARN_MESS
<<
"Error in "
<<
FileName
<<
" at line "
<<
linenb
<<
" ; bad number of parameters ==> file ignored"
<<
ENDL
;
FileConf
.
close
();
return
;
}
// cout<<linenb-1<<" "<<fListOfShiftTrack[linenb-1][0]<<" "<<fListOfShiftTrack[linenb-1][1]<<endl;
delete
loa
;
}
...
...
@@ -771,7 +775,7 @@ void FSMainWindow::ReadHistograms()
else
{
test
++
;
WARN_MESS
<<
"Unable to read the full file: read "
<<
NHistRead
<<
" histograms, wainting:"
<<
fDetectors
.
size
()
<<
", retry num"
<<
test
<<
ENDL
;
// sleep(1);
// sleep(1);
}
file
.
close
();
}
...
...
@@ -802,7 +806,6 @@ void FSMainWindow::DoCalMode(Bool_t on)
if
(
on
==
false
)
Bins
[
i
]
=
i
*
h
->
GetBinWidth
(
1
);
else
{
Double_t
ERaw
=
fListOfShiftTrack
[
itr
->
first
][
0
]
+
fListOfShiftTrack
[
itr
->
first
][
1
]
*
((
Double_t
)
i
*
h
->
GetBinWidth
(
1
));
if
(
fListOfShiftTrack
[
itr
->
first
][
1
]
<
0.1
)
ERaw
=
fListOfShiftTrack
[
itr
->
first
][
0
]
+
0.0001
*
((
Double_t
)
i
*
h
->
GetBinWidth
(
1
));
Double_t
ECal
=
0
;
for
(
int
j
=
0
;
j
<
fCalOrder
;
j
++
)
ECal
+=
fListOfCal
[
itr
->
first
][
j
]
*
TMath
::
Power
(
ERaw
,
j
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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