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
63bbbb1c
Commit
63bbbb1c
authored
Nov 12, 2018
by
Simon Spannagel
Browse files
ModuleManager: implement logic for StatusCodes DeadTime and EndRun
parent
34e62ba3
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/core/module/ModuleManager.cpp
View file @
63bbbb1c
...
...
@@ -596,7 +596,15 @@ void ModuleManager::run() {
auto
end
=
std
::
chrono
::
steady_clock
::
now
();
module_execution_time_
[
module
.
get
()]
+=
static_cast
<
std
::
chrono
::
duration
<
long
double
>>
(
end
-
start
).
count
();
if
(
check
==
StatusCode
::
Failure
)
{
if
(
check
==
StatusCode
::
DeadTime
)
{
// If status code indicates dead time, just silently continue with next event:
continue
;
}
else
if
(
check
==
StatusCode
::
Failure
)
{
// If the status code indicates failure, break immediately and finish:
run
=
false
;
break
;
}
else
if
(
check
==
StatusCode
::
EndRun
)
{
// If the returned status code asks for end-of-run, finish module list and finish:
run
=
false
;
}
}
...
...
src/modules/AlignmentDUTResidual/AlignmentDUTResidual.cpp
View file @
63bbbb1c
...
...
@@ -127,7 +127,7 @@ StatusCode AlignmentDUTResidual::run(std::shared_ptr<Clipboard> clipboard) {
if
(
m_discardedtracks
>
0
)
{
LOG
(
STATUS
)
<<
"Discarded "
<<
m_discardedtracks
<<
" input tracks."
;
}
return
StatusCode
::
Failure
;
return
StatusCode
::
EndRun
;
}
// Otherwise keep going
...
...
src/modules/AlignmentMillepede/AlignmentMillepede.cpp
View file @
63bbbb1c
...
...
@@ -83,7 +83,7 @@ StatusCode AlignmentMillepede::run(std::shared_ptr<Clipboard> clipboard) {
// If we have enough tracks for the alignment, tell the event loop to finish
if
(
m_alignmenttracks
.
size
()
>=
m_numberOfTracksForAlignment
)
{
LOG
(
STATUS
)
<<
"Accumulated "
<<
m_alignmenttracks
.
size
()
<<
" tracks, interrupting processing."
;
return
StatusCode
::
Failure
;
return
StatusCode
::
EndRun
;
}
// Otherwise keep going
...
...
src/modules/AlignmentTrackChi2/AlignmentTrackChi2.cpp
View file @
63bbbb1c
...
...
@@ -69,7 +69,7 @@ StatusCode AlignmentTrackChi2::run(std::shared_ptr<Clipboard> clipboard) {
if
(
m_discardedtracks
>
0
)
{
LOG
(
INFO
)
<<
"Discarded "
<<
m_discardedtracks
<<
" input tracks."
;
}
return
StatusCode
::
Failure
;
return
StatusCode
::
EndRun
;
}
// Otherwise keep going
...
...
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