Changeset 12482


Ignore:
Timestamp:
11/09/11 22:48:17 (13 years ago)
Author:
lyard
Message:
display the average of all pixels in the pixel curve
File:
1 edited

Legend:

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

    r12426 r12482  
    561561void RawDataViewer::paintGL()
    562562{
     563    //Should not be required, but apparently it helps when piping it through X forwarding
    563564    glFinish();
    564565    makeCurrent();
     
    22122213        return;
    22132214
     2215//int currentPixel = pixel;
     2216int currentPixel = 0;
    22142217    for (int i=0;i<GLWindow->nRoi;i++)
     2218        yval[i] = 0;
     2219    for (int j=0;j<1440;j++) {
     2220        currentPixel = j;
     2221    for (int i=0;i<GLWindow->nRoi;i++)
    22152222    {
    22162223        xval[i] = i;
    2217 #ifdef LOAD_RAW
    2218         yval[i] = eventsData[0][pixel][i];
    2219 #else
    2220         yval[i] = GLWindow->eventData[GLWindow->nRoi*pixel + i];
    2221 #endif
    2222     }
     2224        yval[i] += GLWindow->eventData[GLWindow->nRoi*currentPixel + i];
     2225    }
     2226    }
     2227    for (int i=0;i<GLWindow->nRoi;i++)
     2228        yval[i] /= 1440;
     2229
    22232230int realNumSamples = GLWindow->nRoi;
    22242231    if (GLWindow->nRoiTM != 0)
     
    22432250                yval[arrayIndex] = GLWindow->eventData[GLWindow->nRoi*1440 + GLWindow->nRoiTM*(40*crateId + 4*boardId + patchId) + i];
    22442251            }
    2245  //           realNumSamples += GLWindow->nRoiTM - TMIndex;
    2246         }
    2247         cout << pixelIdInPatch << " " ;
     2252            realNumSamples += GLWindow->nRoiTM - TMIndex;
     2253        }
     2254      //  cout << pixelIdInPatch << " " ;
    22482255    }
    22492256//cout << realNumSamples << endl;
Note: See TracChangeset for help on using the changeset viewer.