FACT++  1.0
void FitsLoader::SetupConfig ( Configuration conf)

Configures the fitsLoader from the config file and/or command arguments.

Retrieves the configuration parameters

Parameters
confthe configuration object

Definition at line 586 of file fitsloader.cc.

References fDumpList, fFileName, fFileOut, fStreamPrecision, fTableName, Configuration::Get(), Configuration::Has(), MessageImp::Message(), and str.

Referenced by RunShell().

587 {
588  if (conf.Has("outfile"))
589  {
590  fFileOut = conf.Get<string>("outfile");
591  Message("Output file is: " + fFileOut);
592  }
593  if (conf.Has("fitsfile"))
594  {
595  fFileName = conf.Get<string>("fitsfile");
596  Message("Input fits is: " + fFileName);
597  }
598  if (conf.Has("tablename"))
599  {
600  fTableName = conf.Get<string>("tablename");
601  Message("Input Table is: " + fTableName);
602  }
603  if (conf.Has("dump"))
604  {
605  fDumpList = conf.Get<vector<string>>("dump");
606  Message("Dump list is:");
607  for (vector<string>::iterator it=fDumpList.begin(); it != fDumpList.end(); it++)
608  Message(*it);
609  }
610  if (conf.Has("precision"))
611  {
612  fStreamPrecision = conf.Get<int>("precision");
613 
614  ostringstream str;
615  str << "OFStream precision is: " << fStreamPrecision;
616  Message(str);
617  }
618 }
char str[80]
Definition: test_client.c:7
T Get(const std::string &var)
string fFileOut
Name of the output file.
Definition: fitsloader.cc:80
bool Has(const std::string &var)
vector< string > fDumpList
List of the column names to be dumped.
Definition: fitsloader.cc:84
string fFileName
Name of the fits file to load.
Definition: fitsloader.cc:70
int fStreamPrecision
Precision of the ofstream. Used to output a given number of significant digits for floats or doubles...
Definition: fitsloader.cc:78
string fTableName
Name of the table to load from the file.
Definition: fitsloader.cc:72
int Message(const std::string &str)
Definition: MessageImp.h:46

+ Here is the call graph for this function:

+ Here is the caller graph for this function: