From d3af3ab880aa11e90601f52ca6fbfc057480e8b5 Mon Sep 17 00:00:00 2001 From: Martin Killenberg <martin.killenberg@desy.de> Date: Tue, 27 Feb 2018 17:42:50 +0100 Subject: [PATCH] made the adapter work with the upcoming release of DOOCS --- include/CSAdapterEqFct.h | 2 +- src/CSAdapterEqFct.cc | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/CSAdapterEqFct.h b/include/CSAdapterEqFct.h index 5761721..ef838b1 100644 --- a/include/CSAdapterEqFct.h +++ b/include/CSAdapterEqFct.h @@ -16,7 +16,7 @@ class CSAdapterEqFct : public EqFct , boost::noncopyable { boost::shared_ptr<ControlSystemPVManager> controlSystemPVManager_; int fctCode_; std::vector< boost::shared_ptr<D_fct> > doocsProperties_; - void registerProcessVariablesInDoocs(std::string const & fctName); + void registerProcessVariablesInDoocs(); std::vector < ChimeraTK::ProcessVariable::SharedPtr > getProcessVariablesInThisLocation(); static bool emptyLocationVariablesHandled; diff --git a/src/CSAdapterEqFct.cc b/src/CSAdapterEqFct.cc index 25a04f1..8113f64 100644 --- a/src/CSAdapterEqFct.cc +++ b/src/CSAdapterEqFct.cc @@ -19,8 +19,11 @@ namespace ChimeraTK{ controlSystemPVManager_(controlSystemPVManager), fctCode_(fctCode), updater_(updater){ - std::cout << "CSAdapterEqFct::CSAdapterEqFct name is " << name() << std::endl; - registerProcessVariablesInDoocs(fctName); + // When testing the EqFct stand alone, the name is not set properly. Do this with the additional parameter of this constructor. + if (name().empty()){ + name_.assign(fctName); + } + registerProcessVariablesInDoocs(); } CSAdapterEqFct::~CSAdapterEqFct(){ @@ -36,11 +39,11 @@ namespace ChimeraTK{ return fctCode_; } - void CSAdapterEqFct::registerProcessVariablesInDoocs(std::string const & fctName){ + void CSAdapterEqFct::registerProcessVariablesInDoocs(){ // We only need the factory inside this function DoocsPVFactory factory(this, *updater_, controlSystemPVManager_); - auto mappingForThisLocation = VariableMapper::getInstance().getPropertiesInLocation(fctName); + auto mappingForThisLocation = VariableMapper::getInstance().getPropertiesInLocation(name()); doocsProperties_.reserve( mappingForThisLocation.size() ); for (auto & propertyDescrition : mappingForThisLocation){ -- GitLab