Skip to content
Snippets Groups Projects
Commit 6fda867c authored by Martin Killenberg's avatar Martin Killenberg
Browse files

improved debug printout of VariableMapper

parent f57f61fc
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,10 @@ namespace ChimeraTK{
virtual const std::type_info& type() const{
return typeid(PropertyDescription);
}
virtual void print(std::ostream & os = std::cout) const{
os << location << " / " << name
<< std::endl;
}
};
// Combines property attributes and the base description
......@@ -58,6 +62,10 @@ namespace ChimeraTK{
virtual const std::type_info& type() const override{
return typeid(AutoPropertyDescription);
}
virtual void print(std::ostream & os = std::cout) const{
os << source << " -> " << location << " / " << name
<< std::endl;
}
};
struct ArrayDescription: public AutoPropertyDescription{
......@@ -106,6 +114,12 @@ namespace ChimeraTK{
virtual const std::type_info& type() const{
return typeid(SpectrumDescription);
}
virtual void print(std::ostream & os = std::cout) const{
os << source << " -> " << location << " / " << name
<< " (startSource = " << startSource
<< ", incrementSource = " << incrementSource <<")"
<< std::endl;
}
};
// struct SpectrumDescription:
......
......@@ -342,14 +342,11 @@ namespace ChimeraTK{
/// printing the map is useful for debugging
void VariableMapper::print(std::ostream & os) const {
os << "====== VariableMapper =====" << std::endl;
for (auto & description : _descriptions ){
// FIXME: commenting out the history already shows that there is something wrong
// each description needs << overloaded.
os << description->location << " / " << description->name
// << " hasHistory:" << propertyDescription.hasHistory
// << " isWriteable:" << propertyDescription.isWriteable
<< std::endl;
description->print(os);
}
os << "======= Mapping End =======" << std::endl;
}
bool VariableMapper::evaluateBool(std::string txt){
......
......@@ -32,7 +32,7 @@ void eq_init_prolog() {
std::cerr << "WARNIUNG: No XML file for the Doocs variable config found. Trying direct import." << std::endl;
ChimeraTK::VariableMapper::getInstance().directImport(pvNames);
}
std::cout << "here is the mapping:" << std::endl;
// print the mapping for debug purposes
ChimeraTK::VariableMapper::getInstance().print();
// activate the advanced archiver to have histories
......
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