Changeset 12175 for trunk


Ignore:
Timestamp:
10/12/11 21:20:46 (13 years ago)
Author:
tbretz
Message:
Updated usage information and Configuration class usage.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc

    r12173 r12175  
    24432443
    24442444
     2445void PrintUsage()
     2446{
     2447    cout << "\n"
     2448        "The FACT++ raw data viewer.\n"
     2449        "\n"
     2450        "Usage: viewer [OPTIONS] [datafile.fits[.gz] [calibration.drs.fits[.gz]]]\n"
     2451        "  or:  viewer [OPTIONS]\n";
     2452    cout << endl;
     2453
     2454}
     2455
    24452456void PrintHelp()
    24462457{
     
    24712482 * MAIN PROGRAM FUNCTION.
    24722483 ************************************************************/
    2473 int main(int argc, char *argv[])
    2474 {
    2475     QApplication app(argc, argv);
     2484int main(int argc, const char *argv[])
     2485{
     2486    Configuration conf(argv[0]);
     2487    conf.SetPrintUsage(PrintUsage);
     2488    SetupConfiguration(conf);
     2489    if (!conf.DoParse(argc, argv, PrintHelp))
     2490        return -1;
     2491
     2492    QApplication app(argc, const_cast<char**>(argv));
    24762493
    24772494    if (!QGLFormat::hasOpenGL()) {
     
    24882505
    24892506    RawDataViewer *canvas = myUi.GLWindow;
    2490 
    2491     Configuration conf(argv[0]);
    2492     conf.SetPrintUsage(PrintHelp);
    2493     SetupConfiguration(conf);
    2494     if (!conf.DoParse(argc, const_cast<const char**>(argv), PrintHelp))
    2495         return -1;
    24962507
    24972508    if (conf.Has("color.range"))
Note: See TracChangeset for help on using the changeset viewer.