Perform the dumping, based on the current dump list.
Perform the actual dump, based on the current parameters.
Definition at line 527 of file fitsloader.cc.
References CalculateBufferSize(), MessageImp::Error(), fFile, fFileOut, fTable, StateMachineImp::GetCurrentState(), i, size, str, and writeValuesFromFits().
Referenced by FitsLoader().
529 fTable->makeThisCurrent();
531 int size = offsets[offsets.size()-1];
533 unsigned char* fitsBuffer =
new unsigned char[
size];
540 fits_read_tblbytes(
fFile->fitsPointer(),
i, 1,
size, fitsBuffer, &status);
544 str <<
"An error occurred while reading fits row #" <<
i <<
" error code: " << status;
547 for (
unsigned int j=0;j<offsets.size(); j++)
548 str << offsets[j] <<
" ";
int GetCurrentState() const
return the current state of the machine
void writeValuesFromFits(vector< int > &offsets, ofstream &targetFile, unsigned char *fitsBuffer)
Write a single row of the selected data.
string fFileOut
Name of the output file.
CCfits::FITS * fFile
FITS pointer.
int Error(const std::string &str)
CCfits::Table * fTable
Table pointer.
vector< int > CalculateBufferSize()
Calculate the buffer size required to read a row of the fits table, as well as the offsets to each co...