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
4f0738db
Commit
4f0738db
authored
Dec 13, 2018
by
Simon Spannagel
Browse files
ConfigManager: allow to read multiple detector files
parent
86f785c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/config/ConfigManager.cpp
View file @
4f0738db
...
...
@@ -71,13 +71,16 @@ ConfigManager::ConfigManager(std::string file_name,
}
// Reading detector file
std
::
string
detector_file_name
=
global_config_
.
getPath
(
"detectors_file"
,
true
);
LOG
(
TRACE
)
<<
"Reading detector configuration"
;
std
::
ifstream
detector_file
(
detector_file_name
);
ConfigReader
detector_reader
(
detector_file
,
detector_file_name
);
auto
detector_configs
=
detector_reader
.
getConfigurations
();
detector_configs_
=
std
::
list
<
Configuration
>
(
detector_configs
.
begin
(),
detector_configs
.
end
());
auto
detector_file_names
=
global_config_
.
getPathArray
(
"detectors_file"
,
true
);
LOG
(
TRACE
)
<<
"Reading detector configurations"
;
for
(
auto
&
detector_file_name
:
detector_file_names
)
{
std
::
ifstream
detector_file
(
detector_file_name
);
ConfigReader
detector_reader
(
detector_file
,
detector_file_name
);
auto
detector_configs
=
detector_reader
.
getConfigurations
();
detector_configs_
.
splice
(
detector_configs_
.
end
(),
std
::
list
<
Configuration
>
(
detector_configs
.
begin
(),
detector_configs
.
end
()));
}
}
/**
...
...
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