Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ApplicationCore
Commits
cd59f8d6
Commit
cd59f8d6
authored
7 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
call prepare() for all Modules during server start up
parent
d202c23e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/Module.h
+3
-2
3 additions, 2 deletions
include/Module.h
src/Application.cc
+6
-0
6 additions, 0 deletions
src/Application.cc
with
9 additions
and
2 deletions
include/Module.h
+
3
−
2
View file @
cd59f8d6
...
...
@@ -36,13 +36,14 @@ namespace ChimeraTK {
/** Destructor */
virtual
~
Module
();
/** Prepare the execution of the module. */
/** Prepare the execution of the module. This function is called before any module is started (including internal
* modules like FanOuts) and before the initial values of the variables are pushed into the queues. */
virtual
void
prepare
()
{};
/** Execute the module. */
virtual
void
run
()
{};
/** Terminate the module. Must be called before destruction, if run() was called previously. */
/** Terminate the module. Must
/will
be called before destruction, if run() was called previously. */
virtual
void
terminate
()
{};
/** Wait for receiving an update for any of the push-type variables in the group. Any poll-type variables are
...
...
This diff is collapsed.
Click to expand it.
src/Application.cc
+
6
−
0
View file @
cd59f8d6
...
...
@@ -129,6 +129,11 @@ void Application::run() {
"Error: An instance of Application must have its applicationName set."
);
}
// prepare the modules
for
(
auto
&
module
:
getSubmoduleListRecursive
())
{
module
->
prepare
();
}
// start the necessary threads for the FanOuts etc.
for
(
auto
&
internalModule
:
internalModuleList
)
{
internalModule
->
activate
();
...
...
@@ -148,6 +153,7 @@ void Application::run() {
for
(
auto
&
module
:
getSubmoduleListRecursive
())
{
module
->
run
();
}
}
/*********************************************************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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