Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
2f6b17b4
Commit
2f6b17b4
authored
Mar 18, 2021
by
Joshua Santana
Browse files
Merge branch 'sprint_5' of gitlab.rlp.net:top/21s/sivert-vis/sivert-vis-project into sprint_5
parents
22a8a9a9
6daf0971
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
src/modules/filterProtonData/propertyHandler/WEventIDLimitationPropertyHandler.cpp
...ata/propertyHandler/WEventIDLimitationPropertyHandler.cpp
+23
-11
No files found.
src/modules/filterProtonData/propertyHandler/WEventIDLimitationPropertyHandler.cpp
View file @
2f6b17b4
...
...
@@ -42,8 +42,6 @@ void WEventIDLimitationPropertyHandler::createProperties()
m_maxCap
=
eventIDGroup
->
addProperty
(
"Maximum event id"
,
"Filters out every event id which is higher than the set value."
,
2000
);
m_applySelection
=
eventIDGroup
->
addProperty
(
"Set selection"
,
"Apply"
,
WPVBaseTypes
::
PV_TRIGGER_READY
,
eventIDNotifier
);
determineMinMaxEventID
();
updateProperty
();
}
...
...
@@ -54,6 +52,8 @@ void WEventIDLimitationPropertyHandler::updateProperty()
m_minCap
->
setHidden
(
false
);
m_maxCap
->
setHidden
(
false
);
m_applySelection
->
setHidden
(
false
);
determineMinMaxEventID
();
}
else
{
...
...
@@ -65,7 +65,6 @@ void WEventIDLimitationPropertyHandler::updateProperty()
void
WEventIDLimitationPropertyHandler
::
updateMesh
()
{
determineMinMaxEventID
();
m_dataUpdate
(
);
if
(
m_applySelection
->
get
(
true
)
==
WPVBaseTypes
::
PV_TRIGGER_TRIGGERED
)
...
...
@@ -84,21 +83,34 @@ void WEventIDLimitationPropertyHandler::determineMinMaxEventID()
}
int
minCap
=
std
::
stoi
(
m_protonData
->
getCSVData
()
->
front
().
at
(
eventIDIndex
)
);
int
maxCap
=
std
::
stoi
(
m_protonData
->
getCSVData
()
->
back
().
at
(
eventIDIndex
)
);
int
maxCap
=
maxCap
;
for
(
auto
iter
=
m_protonData
->
getCSVData
()
->
begin
();
iter
!=
m_protonData
->
getCSVData
()
->
end
();
iter
++
)
{
int
calc
=
std
::
stoi
(
(
*
iter
).
at
(
eventIDIndex
)
);
if
(
calc
<
minCap
)
{
minCap
=
calc
;
}
if
(
calc
>
maxCap
)
{
maxCap
=
calc
;
}
}
m_minCap
->
setMin
(
minCap
);
m_minCap
->
setMax
(
maxCap
);
m_maxCap
->
setMin
(
minCap
);
m_maxCap
->
setMax
(
maxCap
);
int
currentMinCap
=
m_minCap
->
get
();
int
currentMaxCap
=
m_maxCap
->
get
();
if
(
currentMaxCap
<
currentMinCap
)
m_maxCap
->
set
(
currentMinCap
);
if
(
m_maxCap
->
get
()
>
maxCap
)
{
m_maxCap
->
set
(
maxCap
);
}
if
(
currentMinCap
<
0
)
m_minCap
->
set
(
0
);
if
(
m_minCap
->
get
()
<
minCap
)
{
m_minCap
->
set
(
minCap
);
}
}
WPropInt
WEventIDLimitationPropertyHandler
::
getMinCap
()
...
...
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