Skip to content
Snippets Groups Projects
Commit e64c7d08 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

[#7951] pass unsed variables to Application for optimisation

No test yet, hence ticket added on github #63
parent be57fda9
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,8 @@ namespace ChimeraTK {
void addVariable(
ChimeraTK::TransferElementAbstractor variable, EqFct* eq_fct, std::function<void()> updaterFunction);
const std::list<ChimeraTK::TransferElementAbstractor>& getElementsToRead() { return _elementsToRead; }
protected:
std::list<ChimeraTK::TransferElementAbstractor> _elementsToRead;
boost::thread _syncThread; // we have to use boost thread to use interruption points
......
......@@ -54,6 +54,8 @@ namespace ChimeraTK {
/// Functiont o convert a string into a DataConsistencyGroup::MatchingMode enum value
static DataConsistencyGroup::MatchingMode evaluateDataMatching(std::string txt);
const std::set<std::string>& getUsedVariables() const { return _usedInputVariables; }
protected:
VariableMapper() = default;
......
......@@ -41,6 +41,15 @@ void eq_init_prolog() {
ChimeraTK::VariableMapper::getInstance().directImport(pvNames);
}
// prepare list of unmapped read variables and pass it to the Application for optimisation
for(auto &p : ChimeraTK::VariableMapper::getInstance().getUsedVariables()) {
auto it = pvNames.find(p);
if(it != pvNames.end()) {
pvNames.erase(it);
}
}
ChimeraTK::ApplicationBase::getInstance().optimiseUnmappedVariables(pvNames);
// activate the advanced archiver to have histories
set_arch_mode(1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment