Ignore:
Timestamp:
02/13/08 19:44:39 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/cosy.cc

    r8860 r8862  
    1010#include "vmodican.h"
    1111
     12#include "MEnv.h"
    1213#include "MArgs.h"
    1314#include "MCosy.h"
     
    5051    gLog << " Options:" << endl;
    5152    gLog.Usage();
     53    gLog << "   --debug-env=0             Disable debugging setting resources <default>" << endl;
     54    gLog << "   --debug-env[=1]           Display untouched resources after program execution" << endl;
     55    gLog << "   --debug-env=2             Display untouched resources after eventloop setup" << endl;
     56    gLog << "   --debug-env=3             Debug setting resources from resource file and command line" << endl;
     57    gLog << "   --debug-mem               Debug memory usage" << endl << endl;
    5258    gLog << "   --debug-threads           Debug threads" << endl << endl;
     59    gLog << "   --rc=Name:option          Set or overwrite a resource of the resource file." << endl << endl;
    5360    gLog << "   --version, -V             Show startup message with version number" << endl;
    5461    gLog << "   -?, -h, --help            This help" << endl << endl;
     
    8087    }
    8188
    82     const Int_t  channel       = arg.GetIntAndRemove("--channel=", 0);
    83     const Bool_t kDebugMem     = arg.HasOnlyAndRemove("--debug-mem");
    84     const Bool_t kDebugThreads = arg.HasOnlyAndRemove("--debug-threads");
     89    const Int_t   channel       = arg.GetIntAndRemove("--channel=", 0);
     90    const Bool_t  kDebugMem     = arg.HasOnlyAndRemove("--debug-mem");
     91    const Bool_t  kDebugThreads = arg.HasOnlyAndRemove("--debug-threads");
     92    const TString sps           = arg.GetStringAndRemove("--sps=", "127.0.0.1");
     93    const TString ceco          = arg.GetStringAndRemove("--cc=", "ceco"); // ceco
     94    const TString pointing      = arg.GetStringAndRemove("--pointing-model=", "bending2.txt"); // ceco
     95    const TString kConfig       = arg.GetStringAndRemove("--config=", ".cosyrc"); // ceco
     96    Int_t  kDebugEnv = arg.HasOnlyAndRemove("--debug-env") ? 1 : 0;
     97    kDebugEnv = arg.GetIntAndRemove("--debug-env=", kDebugEnv);
    8598
    8699    //
     
    93106        return 2;
    94107    }
    95 /*
     108
    96109    //
    97110    // Now we access/read the resource file. This will remove all
     
    108121    if (!env.TakeEnv(arg, kDebugEnv>2))
    109122        return 0xfd;
    110 */
     123
    111124    //
    112125    // check for the right usage of the program (number of options)
     
    178191        }
    179192*/
    180     MCosy *cosy = new MCosy();
    181 
    182     Interface *interface = new Ethernet("127.0.0.1", 5357, 5358, cosy);
     193    MCosy *cosy = new MCosy(env, ceco, pointing);
     194
     195    Interface *interface = new Ethernet(sps, 5357, 5358, cosy);
    183196    // Interface *interface = new VmodIcan(cosy, "/dev/dpm_00", 125);
    184197
    185198    gLog << all << "- Starting MCosy." << endl;
    186199
    187     cosy->Start();
     200    cosy->Start(env);
     201
     202    // FIXME: Is this the right position?
     203    if (kDebugEnv>0)
     204        env.PrintUntouched();
     205
    188206
    189207    MStarguider *client=0;
Note: See TracChangeset for help on using the changeset viewer.