Ignore:
Timestamp:
09/02/11 09:34:54 (13 years ago)
Author:
lyard
Message:
added autoRefresh flag to GL widgets
File:
1 edited

Legend:

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

    r11933 r11941  
    2525
    2626#include "src/Configuration.h"
    27 
    28 //#include "../BasicGlCamera.cc"
    2927
    3028#undef ACTUAL_NUM_PIXELS
     
    353351    drawBlur = false;
    354352    loopCurrentEvent = false;
     353    SetAutoRefresh(true);
    355354#ifdef LOAD_RAW
    356355    loadEvents("/scratch/00000043.001_T.bin");
     
    908907     int16_t* origTheWayIWant = new int16_t[1024*1440];
    909908
    910      int numPixels = 1024;
    911          int leftOver = 1440-numPixels;
     909//     int numPixels = 1024;
     910//         int leftOver = 1440-numPixels;
    912911         for (int k=0;k<1024;k++)
    913912             for (int j=0;j<1440;j++)
     
    957956    ofstream outBin("/scratch/bin/outputBin.bin", ios_base::out | ios_base::binary);
    958957    ofstream outWave("/scratch/bin/outputWave.bin", ios_base::out | ios_base::binary);
    959     int16_t* waveLetArray = new int16_t[1024*1440];
     958    int16_t* waveLetArray_ = new int16_t[1024*1440];
    960959    int16_t* origTheWayIWant = new int16_t[1024*1440];
    961960
     
    967966        outBin.write((const char*)(rawEventData), 1440*1024*2);
    968967
    969         int numPixels = 1024;
    970         int leftOver = 1440-numPixels;
     968//       int numPixels = 1024;
     969//        int leftOver = 1440-numPixels;
    971970        for (int k=0;k<1024;k++)
    972971            for (int j=0;j<1440;j++)
     
    983982        {
    984983            if (j + waveSpan < totalNumSamples)
    985             if (!doWaveLetsPlease(waveSpan, &origTheWayIWant[j], &waveLetArray[j], true))
     984            if (!doWaveLetsPlease(waveSpan, &origTheWayIWant[j], &waveLetArray_[j], true))
    986985                return;
    987986        }
     
    997996            {
    998997//                   cout << "   Doint one last run of " << lastRun << " samples" << endl;
    999                 doWaveLetsPlease(lastRun, &origTheWayIWant[j], &waveLetArray[j], true);
     998                doWaveLetsPlease(lastRun, &origTheWayIWant[j], &waveLetArray_[j], true);
    1000999            }
    10011000            else
     
    10031002//                    cout << " Filling in " << lastRun << " samples" << endl;
    10041003                for (int l=0;l<lastRun;l++)
    1005                     waveLetArray[j+l] = origTheWayIWant[j+l];
     1004                    waveLetArray_[j+l] = origTheWayIWant[j+l];
    10061005            }
    10071006            if (!lastRun)
     
    10091008            j += lastRun;
    10101009        }
    1011        outWave.write((const char*)(waveLetArray), 1440*1024*2);
     1010       outWave.write((const char*)(waveLetArray_), 1440*1024*2);
    10121011    }
    10131012    outWave.close();
     
    10151014    inputFile->GetRow(0);
    10161015
    1017     delete[] waveLetArray;
     1016    delete[] waveLetArray_;
    10181017    delete[] origTheWayIWant;
    10191018}
     
    12661265                for (int j=0;j<viewer->nRoi;j++)
    12671266                {
    1268 //                    cout << "start value: " << viewer->eventData[i*1024+j] << " baseline: " << viewer->baseLineMean[i*1024+j];
    1269 //                    cout << " triggerOffset: " << viewer->triggerOffsetMean[i*1024+j] << " gain: " << viewer->gainMean[i*1024+j];
    12701267                    int realj = (j+viewer->startPix[j])%1024;
    12711268                    viewer->eventData[i*1024+j] *= 2000.f/4096.f;
     
    12731270                    viewer->eventData[i*1024+j] /= viewer->gainMean[i*1024+realj];
    12741271                    viewer->eventData[i*1024+j] *= (50000.f/65536.f) * 2500.f;
    1275 //                    cout << " end value: " << viewer->eventData[i*1024+j] << endl;
    12761272                }
    12771273            viewer->updateGL();
Note: See TracChangeset for help on using the changeset viewer.