FACT++  1.0
int main ( int  argc,
const char **  argv 
)

Definition at line 1170 of file fitsdump.cc.

References Configuration::DoParse(), FitsDumper::Exec(), Configuration::Get(), Configuration::Has(), PrintHelp(), PrintUsage(), Configuration::SetPrintUsage(), and SetupConfiguration().

1171 {
1172  Configuration conf(argv[0]);
1173  conf.SetPrintUsage(PrintUsage);
1174  SetupConfiguration(conf);
1175 
1176  if (!conf.DoParse(argc, argv, PrintHelp))
1177  return -1;
1178 
1179  if (!conf.Has("fitsfile"))
1180  {
1181  cerr << "Filename required." << endl;
1182  return -1;
1183  }
1184 
1185  FitsDumper loader(conf.Get<string>("fitsfile"), conf.Get<string>("tablename"));
1186  if (!loader)
1187  {
1188  cerr << "ERROR - Opening " << conf.Get<string>("fitsfile");
1189  cerr << " failed: " << strerror(errno) << endl;
1190  return -1;
1191  }
1192 
1193  return loader.Exec(conf);
1194 }
void PrintUsage()
Definition: fitsdump.cc:1068
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void PrintHelp()
Definition: fitsdump.cc:1093
void SetupConfiguration(Configuration &conf)
Definition: fitsdump.cc:1131
Dumps contents of fits tables to stdout or a file.
Definition: fitsdump.cc:64

+ Here is the call graph for this function: