FACT++  1.0
FitsLoader::FitsLoader ( ostream &  out)

Constructor

Parameters
outthe ostream where to redirect the outputs

Definition at line 364 of file fitsloader.cc.

References AddDumpColumnsPlease(), StateMachineImp::AddEvent(), StateMachineDim::AddStateName(), ClearDumpListPlease(), ConfigFileNamePlease(), ConfigTableNamePlease(), DoDumpPlease(), fClearDumpList, fConfigFileName, fConfigFileOutName, fConfigPrecName, fConfigTableName, fDoDump, fDumpColumns, fFile, fListColumns, fLoadFits, fStreamPrecision, fUnloadFits, kSM_FileLoaded, StateMachineImp::kSM_Ready, ListColumnsPlease(), LoadPlease(), SetFileOutPlease(), SetOFStreamPrecisionPlease(), and UnloadPlease().

364  : StateMachineDim(out, "FITS_LOADER")
365 {
366  //Add the existing states
367  AddStateName(kSM_FileLoaded, "FileLoaded", "A Fits file has been loaded");
368 
369  //Add the possible transitions
371  (boost::bind(&FitsLoader::LoadPlease, this))
372  ("Loads the given Fits file");
374  (boost::bind(&FitsLoader::UnloadPlease, this))
375  ("Unloads the given Fits file");
376 
377  //Add the possible configurations
379  (boost::bind(&FitsLoader::ListColumnsPlease, this, _1))
380  ("List the columns that were loaded from that file");
382  (boost::bind(&FitsLoader::AddDumpColumnsPlease, this, _1))
383  ("Add a given column to the dumping list");
385  (boost::bind(&FitsLoader::ClearDumpListPlease, this, _1))
386  ("Clear the dumping list");
388  (boost::bind(&FitsLoader::DoDumpPlease, this, _1))
389  ("Perform the dump of columns data, based on the to dump list");
391  (boost::bind(&FitsLoader::ConfigFileNamePlease, this, _1))
392  ("Gives the name of the Fits file to be loaded");
394  (boost::bind(&FitsLoader::ConfigTableNamePlease, this, _1))
395  ("Gives the name of the Table to be loaded");
397  (boost::bind(&FitsLoader::SetOFStreamPrecisionPlease, this, _1))
398  ("Set the precision of the ofstream, i.e. the number of significant digits being outputted");
400  (boost::bind(&FitsLoader::SetFileOutPlease, this, _1))
401  ("Set the name of the outputted file.");
402 
403  fFile = NULL;
404  fStreamPrecision = 20;
405 
406 }
int LoadPlease()
Transition from ready to fileLoaded.
Definition: fitsloader.cc:421
EventImp & AddEvent(const std::string &name, const std::string &states, const std::string &fmt)
static const char * fLoadFits
Define command names.
Definition: fitsloader.cc:57
int SetOFStreamPrecisionPlease(const Event &)
Set the ofstream precision.
Definition: fitsloader.cc:146
Mainloop running, state machine in operation.
int UnloadPlease()
Transition from fileLoaded to ready.
Definition: fitsloader.cc:473
int DoDumpPlease(const Event &)
Perform the dumping, based on the current dump list.
Definition: fitsloader.cc:527
static const char * fListColumns
Definition: fitsloader.cc:59
static const char * fConfigTableName
Definition: fitsloader.cc:64
static const char * fDumpColumns
Definition: fitsloader.cc:60
StateMachineDim(std::ostream &out=std::cout, const std::string &name="DEFAULT")
static const char * fConfigFileName
Definition: fitsloader.cc:63
static const char * fDoDump
Definition: fitsloader.cc:62
int SetFileOutPlease(const Event &)
Set the name of the output file.
Definition: fitsloader.cc:132
static const char * fUnloadFits
Definition: fitsloader.cc:58
int ClearDumpListPlease(const Event &)
Clear the dump list.
Definition: fitsloader.cc:517
CCfits::FITS * fFile
FITS pointer.
Definition: fitsloader.cc:74
int ListColumnsPlease(const Event &)
Lists the loaded column names.
Definition: fitsloader.cc:486
int AddDumpColumnsPlease(const Event &)
Add a column name to the dump list.
Definition: fitsloader.cc:500
int ConfigFileNamePlease(const Event &)
Set the name of the Fits file to be loaded.
Definition: fitsloader.cc:562
int fStreamPrecision
Precision of the ofstream. Used to output a given number of significant digits for floats or doubles...
Definition: fitsloader.cc:78
static const char * fConfigFileOutName
Definition: fitsloader.cc:66
int ConfigTableNamePlease(const Event &)
Set the name of the table to be loaded.
Definition: fitsloader.cc:574
static const char * fConfigPrecName
Definition: fitsloader.cc:65
static const char * fClearDumpList
Definition: fitsloader.cc:61
bool AddStateName(const int state, const std::string &name, const std::string &doc="")

+ Here is the call graph for this function: