Changeset 17036 for trunk/FACT++


Ignore:
Timestamp:
08/21/13 16:55:27 (11 years ago)
Author:
lyard
Message:
remove the hard-coding of the pixels map
Location:
trunk/FACT++/gui/RawEventsViewer
Files:
2 edited

Legend:

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

    r17008 r17036  
    376376    SetAutoRefresh(true);
    377377    runType = "unkown";
     378
     379
     380}
     381
     382void RawDataViewer::assignPixelMapFile(const string& map)
     383{
    378384    PixelMap mypMap;
    379     if (!mypMap.Read("/swdev_nfs/FACT++/FACTmap111030.txt"))
    380     {
    381         cerr << "ERROR - Problems reading FACTmap111030.txt" << endl;
    382         exit(-1);
     385    if (map=="")
     386    {
     387        if (!mypMap.Read("/swdev_nfs/FACT++/FACTmap111030.txt"))
     388        {
     389            if (!mypMap.Read("./FACTmap111030.txt"))
     390            {
     391                cerr << "ERROR - Problems reading FACTmap111030.txt" << endl;
     392                exit(-1);
     393            }
     394        }
     395    }
     396    else
     397    {
     398        if (!mypMap.Read(map))
     399        {
     400            cerr << "ERROR - Problems reading " << map << endl;
     401            exit(-1);
     402        }
    383403    }
    384404
     
    395415
    396416    _softwareOrdering = false;
    397 
    398417}
    399418/************************************************************
     
    22442263    RawDataViewer *canvas = GLWindow;
    22452264
     2265    if (conf.Has("mappingFile"))
     2266    {
     2267        canvas->assignPixelMapFile(conf.Get<string>("mappingFile"));
     2268    }
     2269    else
     2270        canvas->assignPixelMapFile("");
     2271
    22462272    if (conf.Has("color.range"))
    22472273    {
     
    23392365        ("file,f",      var<string>(),  "File to be loaded")
    23402366        ("drs,d",       var<string>(),  "DRS calibration file to be loaded")
     2367        ("mappingFile", var<string>(),  "Which pixels mapping file to use")
    23412368        ;
    23422369    conf.AddOptions(configs);
  • trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.h

    r15279 r17036  
    5959                                                     const int roiTM);
    6060    int getCurrentPixel(){return selectedPixel;}
     61    void assignPixelMapFile(const string& map="");
    6162public Q_SLOTS:
    6263    void plusEvent();
Note: See TracChangeset for help on using the changeset viewer.