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
5c01a1e8
Commit
5c01a1e8
authored
Apr 15, 2019
by
Jérémie Dudouet
Committed by
Jérémie Dudouet
Jun 27, 2019
Browse files
Add Cubix icon, add graph scale
parent
13cbbe65
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
src/root/gui/cubix/src/CXMainWindow.cpp
src/root/gui/cubix/src/CXMainWindow.cpp
+31
-0
src/root/gui/cubix/src/CXMainWindow.h
src/root/gui/cubix/src/CXMainWindow.h
+1
-0
No files found.
src/root/gui/cubix/src/CXMainWindow.cpp
View file @
5c01a1e8
...
...
@@ -217,6 +217,9 @@ void CXMainWindow::Init()
// Set a name to the main frame
SetWindowName
(
"Cubix Spectra Player"
);
SetIconPixmap
(
"Cubix.png"
);
SetIconName
(
"Cubix"
);
MapSubwindows
();
Layout
();
Resize
(
GetDefaultSize
());
...
...
@@ -834,6 +837,21 @@ void CXMainWindow::UpdateContextMenus()
for
(
int
i
=
0
;
i
<
18
;
i
++
)
ml
->
RemoveAt
(
ml
->
GetEntries
()
-
1
);
/// TGraph ///
cl
=
gROOT
->
GetClass
(
"TGraph"
);
cl
->
MakeCustomMenuList
();
ml
=
cl
->
GetMenuList
();
n
=
new
TClassMenuItem
(
TClassMenuItem
::
kPopupUserFunction
,
cl
,
"Scale"
,
"GraphScale"
,
this
,
"Float_t,TObject*"
,
1
);
ml
->
AddAt
(
n
,
3
);
/// TGraphErrors ///
cl
=
gROOT
->
GetClass
(
"TGraphErrors"
);
cl
->
MakeCustomMenuList
();
ml
=
cl
->
GetMenuList
();
n
=
new
TClassMenuItem
(
TClassMenuItem
::
kPopupUserFunction
,
cl
,
"Scale"
,
"GraphScale"
,
this
,
"Float_t,TObject*"
,
1
);
ml
->
AddAt
(
n
,
3
);
// n = new TClassMenuItem(TClassMenuItem::kPopupSeparator,cl);ml->AddAt(n,ml->GetEntries()-4);
}
...
...
@@ -895,6 +913,17 @@ void CXMainWindow::HistScale(Float_t scaleFact, TObject *c)
RefreshPad
();
}
void
CXMainWindow
::
GraphScale
(
Float_t
scaleFact
,
TObject
*
c
)
{
TGraph
*
graph
=
static_cast
<
TGraph
*>
(
c
);
for
(
int
i
=
0
;
i
<
graph
->
GetN
()
;
i
++
){
graph
->
SetPoint
(
i
,
graph
->
GetX
()[
i
],
graph
->
GetY
()[
i
]
*
scaleFact
);
}
RefreshPad
();
}
void
CXMainWindow
::
PopUpShowBackground
(
TObject
*
c
)
{
TH1
*
hist
=
static_cast
<
TH1
*>
(
c
);
...
...
@@ -922,6 +951,8 @@ void CXMainWindow::AddToStoredSpectra(TObject *c)
if
(
fHist2DPlayer
){
if
(
IsHist2DPlayerEnabled
==
false
)
ToggleTab
(
IsHist2DPlayerEnabled
,
M_Hist2DPlayer
,
fHist2DPlayerTab
,
fHist2DPlayer
->
GetName
());
else
fMainTab
->
SetTab
(
fHist2DPlayer
->
GetName
());
TObject
*
clone
=
o
->
Clone
();
if
(
o
->
InheritsFrom
(
TH1
::
Class_Name
()))
...
...
src/root/gui/cubix/src/CXMainWindow.h
View file @
5c01a1e8
...
...
@@ -156,6 +156,7 @@ public:
void
AddToStoredSpectra
(
TObject
*
c
);
void
PopUpInitGG
(
TObject
*
c
);
void
HistScale
(
Float_t
scaleFact
=
1
,
TObject
*
c
=
nullptr
);
void
GraphScale
(
Float_t
scaleFact
=
1
,
TObject
*
c
=
nullptr
);
void
HistNorm
(
TObject
*
c
);
void
Rebin2D
(
Int_t
RebinX
=
2
,
Int_t
RebinY
=
2
,
TObject
*
c
=
nullptr
);
void
PopUpEval2DBackground
(
TObject
*
c
);
...
...
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