- Timestamp:
- 02/10/12 10:19:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fitsdump.cc
r12885 r12886 70 70 void ListKeywords(ostream &); 71 71 72 vector<MyColumn> InitColumns( const vector<string>&list);72 vector<MyColumn> InitColumns(vector<string> list); 73 73 74 74 ///Display the selected columns values VS time … … 126 126 for (auto jt = fKeyMap.begin(); jt != fKeyMap.end(); jt++) 127 127 if (jt->second.value == it->first) 128 cout << jt->second.comment << endl;128 cout << "/ " << jt->second.comment << endl; 129 129 } 130 130 … … 136 136 const fits::Table::Keys &fKeyMap = GetKeys(); 137 137 138 for (auto it=fKeyMap.begin(); it != fKeyMap.end(); it++) { 139 fout << "## " << setw(8) << it->first << " = " << setw(10); 140 fout << "'" << it->second.value << "'" << " / " << it->second.comment << endl; 141 } 138 for (auto it=fKeyMap.begin(); it != fKeyMap.end(); it++) 139 { 140 fout << "## " << ::left << setw(8) << it->first << "= "; 141 142 if (it->second.type=='T') 143 fout << ::left << setw(20) << ("'"+it->second.value+"'"); 144 else 145 fout << ::right << setw(20) << it->second.value; 146 147 if (it->second.comment.size()>0) 148 fout << " / " << it->second.comment; 149 fout << '\n'; 150 } 151 152 fout << flush; 142 153 } 143 154 … … 161 172 } 162 173 163 vector<MyColumn> FitsDumper::InitColumns( const vector<string> &names)174 vector<MyColumn> FitsDumper::InitColumns(vector<string> names) 164 175 { 165 176 static const boost::regex expr("([[:word:].]+)(\\[([[:digit:]]+)?(:)?([[:digit:]]+)?\\])?"); 166 177 167 178 const fits::Table::Columns &fColMap = GetColumns(); 179 180 if (names.size()==0) 181 for (auto it=fColMap.begin(); it!=fColMap.end(); it++) 182 if (it->second.num>0) 183 names.push_back(it->first); 168 184 169 185 vector<MyColumn> vec; … … 546 562 // ------------------------------------------------------------ 547 563 548 if (conf.Vec<string>("col").size()==0)549 {550 cerr << "No columns specifiec." << endl;551 return 0;552 }553 554 564 const string filename = conf.Get<string>("outfile"); 555 565
Note:
See TracChangeset
for help on using the changeset viewer.