Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
i0mapmon-topo
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
gui
i0mapmon-topo
Commits
ccd396c4
Commit
ccd396c4
authored
4 years ago
by
Giacomo Strangolino
Browse files
Options
Downloads
Patches
Plain Diff
fixes to data update
parent
699bec83
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
src/i0mapmon_topo.cpp
+2
-2
2 additions, 2 deletions
src/i0mapmon_topo.cpp
src/i0mmtopobarchart.cpp
+12
-2
12 additions, 2 deletions
src/i0mmtopobarchart.cpp
with
15 additions
and
5 deletions
README.md
+
1
−
1
View file @
ccd396c4
...
...
@@ -7,4 +7,4 @@ Bar chart showing how the intensity decreases along the optical path
export TANGO_HOST=srv-tango-padres-01:20000
./bin/i0mapmon_topo pfe_f01/diagnostics/fel_iom_pfe_f01.01
./bin/i0mapmon_topo pfe_f01/diagnostics/fel_iom_pfe_f01.01
padres/felmapmon/values
This diff is collapsed.
Click to expand it.
src/i0mapmon_topo.cpp
+
2
−
2
View file @
ccd396c4
...
...
@@ -42,7 +42,7 @@ I0mapmon_topo::I0mapmon_topo(CumbiaPool *cumbia_pool, QWidget *parent) :
#ifdef QUMBIA_TANGO_CONTROLS_VERSION
mode
=
CuTReader
::
Manual
;
#endif
m_multiread_plu_i
->
init
(
cu_pool
,
m_ctrl_factory_pool
,
mode
);
// 0 sync mode
m_multiread_plu_i
->
init
(
cu_pool
,
m_ctrl_factory_pool
,
QuMultiReaderPluginInterface
::
SequentialReads
);
connect
(
m_multiread_plu_i
->
get_qobject
(),
SIGNAL
(
onSeqReadComplete
(
const
QList
<
CuData
>
&
)),
ui
->
chart
,
SLOT
(
update
(
const
QList
<
CuData
>
&
)));
...
...
@@ -121,10 +121,10 @@ void I0mapmon_topo::m_onWlenSelectionChanged(QString wlen, bool on) {
// update the model for the lambda selection combo box if the lambdas change
//
void
I0mapmon_topo
::
m_onLambdaChanged
(
const
QVector
<
double
>
&
la
)
{
qDebug
()
<<
__PRETTY_FUNCTION__
<<
la
;
QVector
<
double
>
current_l
;
for
(
int
i
=
0
;
m_cb_model
!=
nullptr
&&
i
<
m_cb_model
->
rowCount
();
i
++
)
current_l
<<
m_cb_model
->
item
(
i
)
->
text
().
toDouble
();
qDebug
()
<<
__PRETTY_FUNCTION__
<<
la
<<
"current_l"
<<
current_l
;
if
(
current_l
!=
la
)
{
QStringList
wlens
;
QVector
<
int
>
wlens_idx
;
...
...
This diff is collapsed.
Click to expand it.
src/i0mmtopobarchart.cpp
+
12
−
2
View file @
ccd396c4
...
...
@@ -7,6 +7,7 @@
#include
<qwt_scale_engine.h>
#include
<qwt_text.h>
#include
<qwt_plot_textlabel.h>
#include
<qustring.h>
double
LogTransform
::
bounded
(
double
v
)
const
{
return
qBound
(
0.01
,
v
,
LogMax
);
...
...
@@ -83,26 +84,33 @@ void I0MMTopoBarChart::update(const QList<CuData> &dl) {
QVector
<
QVector
<
double
>
>
series
;
for
(
int
i
=
0
;
i
<
dl
.
size
();
i
++
)
{
const
CuData
&
d
=
dl
[
i
];
if
(
d
[
"err"
].
toBool
())
{
if
(
d
[
"err"
].
toBool
()
)
{
error
+=
d
[
"msg"
].
toString
();
}
else
if
(
d
[
"quality"
].
toInt
()
==
1
)
error
+=
(
QuString
(
d
,
"src"
).
section
(
'/'
,
-
1
)
+
":
\n
invalid data quality
\n
"
).
toStdString
();
else
{
printf
(
"\e[1;33m%s --> %s\e[0m
\n
"
,
vtoc2
(
d
,
"src"
),
datos
(
d
));
const
std
::
vector
<
double
>&
v
=
d
[
"value"
].
toDoubleVector
();
// select lambdas
qDebug
()
<<
__PRETTY_FUNCTION__
<<
"v size "
<<
v
.
size
()
<<
m_cur_lambdas
;
for
(
size_t
i
=
0
;
i
<
v
.
size
();
i
++
)
{
if
(
m_cur_lambdas
.
contains
(
i
))
{
qDebug
()
<<
__PRETTY_FUNCTION__
<<
"- "
<<
i
<<
v
[
i
];
valuemap
[
i
]
=
v
[
i
];
}
}
series
+=
valuemap
.
values
().
toVector
();
}
}
qDebug
()
<<
__PRETTY_FUNCTION__
<<
"setSamples on barchart : "
<<
series
;
m_barchart
->
setSamples
(
series
);
const
QVector
<
int
>
&
lambdas
=
valuemap
.
keys
().
toVector
();
qDebug
()
<<
__PRETTY_FUNCTION__
<<
"size of data: "
<<
dl
.
size
()
<<
"lambdas "
<<
lambdas
<<
" cur lambdas "
<<
m_cur_lambdas
;
if
(
m_cur_lambdas
!=
lambdas
)
if
(
lambdas
.
size
()
&&
m_cur_lambdas
!=
lambdas
)
// if lambdas is empty it means error or update called from
m_update_bars
(
lambdas
);
}
else
...
...
@@ -150,6 +158,7 @@ void I0MMTopoBarChart::enableLogScale(bool en) {
}
void
I0MMTopoBarChart
::
setLambdas
(
const
QVector
<
int
>
lidxs
)
{
qDebug
()
<<
__PRETTY_FUNCTION__
<<
lidxs
;
m_update_bars
(
lidxs
);
if
(
m_cur_data
.
size
()
>
0
)
update
(
m_cur_data
);
...
...
@@ -161,6 +170,7 @@ void I0MMTopoBarChart::m_onBarsModeChanged(int mode) {
void
I0MMTopoBarChart
::
m_update_bars
(
const
QVector
<
int
>
&
lambdas
)
{
qDebug
()
<<
__PRETTY_FUNCTION__
<<
lambdas
;
int
idx
=
0
;
m_barchart
->
resetSymbolMap
();
QList
<
QwtText
>
titles
;
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment