Changeset 12967 for trunk/FACT++/src
- Timestamp:
- 02/29/12 10:30:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fitsdump.cc
r12943 r12967 355 355 #endif 356 356 357 ostringstream out;358 out.precision(fout.precision());357 ostringstream sout; 358 sout.precision(fout.precision()); 359 359 for (auto it=cols.begin(); it!=cols.end(); it++) 360 360 { … … 368 368 break; 369 369 case 'B': 370 out << (unsigned int)reinterpret_cast<const unsigned char*>(it->ptr)[i] << " ";370 sout << (unsigned int)reinterpret_cast<const unsigned char*>(it->ptr)[i] << " "; 371 371 break; 372 372 case 'L': 373 out << reinterpret_cast<const bool*>(it->ptr)[i] << " ";373 sout << reinterpret_cast<const bool*>(it->ptr)[i] << " "; 374 374 break; 375 375 case 'I': 376 out << reinterpret_cast<const int16_t*>(it->ptr)[i] << " ";376 sout << reinterpret_cast<const int16_t*>(it->ptr)[i] << " "; 377 377 break; 378 378 case 'J': 379 out << reinterpret_cast<const int32_t*>(it->ptr)[i] << " ";379 sout << reinterpret_cast<const int32_t*>(it->ptr)[i] << " "; 380 380 break; 381 381 case 'K': 382 out << reinterpret_cast<const int64_t*>(it->ptr)[i] << " ";382 sout << reinterpret_cast<const int64_t*>(it->ptr)[i] << " "; 383 383 break; 384 384 case 'E': 385 out << reinterpret_cast<const float*>(it->ptr)[i] << " ";385 sout << reinterpret_cast<const float*>(it->ptr)[i] << " "; 386 386 break; 387 387 case 'D': 388 out << reinterpret_cast<const double*>(it->ptr)[i] << " ";388 sout << reinterpret_cast<const double*>(it->ptr)[i] << " "; 389 389 break; 390 390 default: … … 399 399 400 400 if (it->col.type=='A') 401 out << "'" << msg << "' ";401 sout << "'" << msg << "' "; 402 402 } 403 403 #ifdef HAVE_ROOT … … 405 405 continue; 406 406 #endif 407 fout << out.str() << endl;407 fout << sout.str() << endl; 408 408 } 409 409 } … … 424 424 *it = ' '+*it; 425 425 426 string::const_iterator beg = it->begin();427 string::const_iterator end = it->end();426 string::const_iterator ibeg = it->begin(); 427 string::const_iterator iend = it->end(); 428 428 429 429 boost::smatch what; 430 while (boost::regex_search( beg,end, what, expr, boost::match_extra))430 while (boost::regex_search(ibeg, iend, what, expr, boost::match_extra)) 431 431 { 432 432 const string all = what[0]; … … 438 438 if (ic==cols.end()) 439 439 { 440 beg++;440 ibeg++; 441 441 //cout << "Column '" << name << "' does not exist." << endl; 442 442 //return vector<MyColumn>(); … … 458 458 id << '[' << p << ']'; 459 459 460 it->replace( beg-it->begin()+what.position(1), what.length()-1, id.str());461 462 beg = what[0].first+3;463 end = it->end();460 it->replace(ibeg-it->begin()+what.position(1), what.length()-1, id.str()); 461 462 ibeg = what[0].first+3; 463 iend = it->end(); 464 464 465 465 if (p<vec.size()) … … 575 575 break; 576 576 577 //data[p++] = first-1;578 579 ostringstream out;580 out.precision(fout.precision());581 582 577 size_t p = 0; 583 578 for (auto it=vec.begin(); it!=vec.end(); it++, p++) … … 590 585 591 586 for (auto iform=form.begin()+1; iform!=form.end(); iform++) 592 out << iform->EvalPar(0, data.data()) << " ";593 594 fout << out.str() <<endl;587 fout << iform->EvalPar(0, data.data()) << " "; 588 589 fout << endl; 595 590 } 596 591 #endif
Note:
See TracChangeset
for help on using the changeset viewer.