diff --git a/include/DoocsUpdater.h b/include/DoocsUpdater.h index 77cee141e8bf4618748b7e61de17520b083ded01..8d74958917c7e53d4d214577872394b54179411b 100644 --- a/include/DoocsUpdater.h +++ b/include/DoocsUpdater.h @@ -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 diff --git a/include/VariableMapper.h b/include/VariableMapper.h index 5dc5c99a80036214ad34b16a784310479b7c49b5..ad551339be4f900d515167254c2d062eee1f0615 100644 --- a/include/VariableMapper.h +++ b/include/VariableMapper.h @@ -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; diff --git a/src/eq_create.cc b/src/eq_create.cc index d8cdfcec68d62abeee4159572ff7eb89ac76ed2d..ccdbdc87bdbc9e9e07a3ab847e4fcbe177af5656 100644 --- a/src/eq_create.cc +++ b/src/eq_create.cc @@ -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); }