Transition from ready to fileLoaded.
Loads the fits file based on the current parameters.
Definition at line 421 of file fitsloader.cc.
References MessageImp::Error(), fColMap, fDumpList, fFile, fFileName, fTable, fTableName, kSM_FileLoaded, StateMachineImp::kSM_Ready, MessageImp::Message(), numRows, and str.
Referenced by FitsLoader().
428 catch (CCfits::FitsException e)
430 str <<
"Could not open FITS file " <<
fFileName <<
" reason: " << e.message();
435 const multimap< string, CCfits::ExtHDU * > extMap =
fFile->extension();
439 str <<
"Could not open table " <<
fTableName <<
". Tables in file are: ";
440 for (std::multimap<string, CCfits::ExtHDU*>::const_iterator it=extMap.begin(); it != extMap.end(); it++)
441 str << it->first <<
" ";
446 fTable =
dynamic_cast<CCfits::Table*
>(extMap.find(fTableName)->second);
449 str <<
"Loaded table has " << numRows <<
" rows";
455 bool should_clear =
false;
461 Error(
"Config-given dump list contains invalid entry " + *it +
" clearing the list");
map< string, CCfits::Column * > fColMap
map between the column names and their CCfits objects
Mainloop running, state machine in operation.
CCfits::FITS * fFile
FITS pointer.
int Error(const std::string &str)
vector< string > fDumpList
List of the column names to be dumped.
string fFileName
Name of the fits file to load.
CCfits::Table * fTable
Table pointer.
string fTableName
Name of the table to load from the file.
int Message(const std::string &str)