Commit b6295191e4fa10834d65eec59ffd5076e217b652
1 parent
e06e49a1
Exists in
master
and in
85 other branches
mav-sta print ok
Showing
2 changed files
with
22 additions
and
30 deletions
Show diff stats
src/Info/ParamInfo.cc
... | ... | @@ -113,6 +113,27 @@ std::vector<std::pair<std::string,std::string>> ParamInfo::getInfoMap(ParameterM |
113 | 113 | table.second->addTableInfo(parameterManager, table.first, infoMap); |
114 | 114 | } |
115 | 115 | } |
116 | + ParameterSPtr param = parameterManager->getParameter(getId()); | |
117 | + AMDA::Parameters::SemiVariableTable semiVariableTable = param->getSemiVariableTable(); | |
118 | + if(! semiVariableTable.tabHeader.empty()){ | |
119 | + std::stringstream head; | |
120 | + head.str(""); | |
121 | + head<<"mode"<<" "; | |
122 | + for (auto h :semiVariableTable.tabHeader){ | |
123 | + head<<h<<" "; | |
124 | + } | |
125 | + PUSHINFO(infoMap, "",head.str()); | |
126 | + } | |
127 | + for(auto v:semiVariableTable.tabValues){ | |
128 | + std::ostringstream values; | |
129 | + values<<std::to_string(v.first)<<" "; | |
130 | + // Convert all doubles to string "," | |
131 | + std::copy(v.second.begin(), v.second.end(), | |
132 | + std::ostream_iterator<double>(values, " ")); | |
133 | + PUSHINFO(infoMap, "",values.str()); | |
134 | + values.str(""); | |
135 | + } | |
136 | + | |
116 | 137 | |
117 | 138 | //adjout des info de tables |
118 | 139 | /** | ... | ... |
src/Info/ParamTable.cc
... | ... | @@ -216,36 +216,7 @@ void ParamTable::addVariableTableInfo(ParameterManager * parameterManager, int d |
216 | 216 | ParameterSPtr pParam = parameterManager->getParameter(linkedParam.second); |
217 | 217 | std::map<std::string, boost::shared_ptr<std::vector<double>>> infoList =pParam->getInfoList(); |
218 | 218 | if(! infoList.empty()){ |
219 | - int nenergy; | |
220 | - std::map<std::string, boost::shared_ptr<std::vector<double>>>::iterator it = infoList.find("nenergy"); | |
221 | - nenergy = (int)(*it->second)[0]; | |
222 | - int nmass; | |
223 | - std::map<std::string, boost::shared_ptr<std::vector<double>>>::iterator it2 = infoList.find("nmass"); | |
224 | - nmass = (int)(*it2->second)[0]; | |
225 | - int nswp; | |
226 | - std::map<std::string, boost::shared_ptr<std::vector<double>>>::iterator it3 = infoList.find("nswp"); | |
227 | - nswp = (int)(*it3->second)[0]; | |
228 | - std::ostringstream head; | |
229 | - head.str(""); | |
230 | - head << "# mode "; | |
231 | - for(int j=0; j<nmass; j++){ | |
232 | - for(int l=0; l<nenergy; l++){ | |
233 | - head<<_tableName<<"["<<j<<","<<l<<"]"; | |
234 | - } | |
235 | - } | |
236 | - PUSHINFO(tableInfo, "", head.str()); | |
237 | - std::ostringstream values; | |
238 | - | |
239 | - for(int k= 0; k<nswp; k++){ | |
240 | - for(int e= 0; e<nenergy*nmass; e++){ | |
241 | - std::string energyLevel="energy_" + std::to_string(e); | |
242 | - it = infoList.find(energyLevel); | |
243 | - values<<std::to_string(e)<<(*it->second)[e]; | |
244 | - } | |
245 | - PUSHINFO(tableInfo,"",values.str()); | |
246 | - values.str(""); | |
247 | - } | |
248 | - | |
219 | + // pour l'instant rien | |
249 | 220 | } |
250 | 221 | i++; |
251 | 222 | } | ... | ... |