Changeset 12669 for trunk/FACT++/gui/RawEventsViewer
- Timestamp:
- 11/29/11 16:13:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
r12482 r12669 281 281 } 282 282 #endif 283 if (color < 0)283 if (color < ss[0]) 284 284 { 285 285 pixelsColor[i][0] = tooLowValueCoulour[0]; … … 288 288 continue; 289 289 } 290 if (color > 1)290 if (color > ss[4]) 291 291 { 292 292 pixelsColor[i][0] = tooHighValueCoulour[0]; … … 523 523 524 524 assignPixelMap(mypMap); 525 buildVerticesList();526 // for (int i=0;i<1440;i++)527 // updateNeighbors(i);528 525 529 526 for (int i=0;i<160;i++) … … 719 716 try { 720 717 if (!inputFile->HasKey(*it)){ 721 cout << *it << " missing. Aborting load..." << endl;718 cout << "Warning: header keyword " << *it << " missing." << endl; 722 719 return;} 723 720 } … … 728 725 } 729 726 } 730 nRows = inputFile->GetInt("NAXIS2");731 nRoi = inputFile->GetInt("NROI");732 runNumber = inputFile->GetInt("RUNID");733 nTM = inputFile->HasKey("NTMARK") ? inputFile->GetInt("NTMARK") : 0;734 runType = inputFile->HasKey("RUNTYPE") ? inputFile->GetInt("RUNTYPE") : -1;735 firstDataTime = inputFile->GetInt("TSTART");736 lastDataTime = inputFile->GetInt("TSTOP");737 nRoiTM = inputFile->GetInt("NROITM");738 revision = inputFile->GetInt("REVISION");727 nRows = inputFile->HasKey("NAXIS2") ? inputFile->GetInt("NAXIS2") : 0; 728 nRoi = inputFile->HasKey("NROI") ? inputFile->GetInt("NROI") : 0; 729 runNumber = inputFile->HasKey("RUNID") ? inputFile->GetInt("RUNID") : -1; 730 nTM = inputFile->HasKey("NTMARK") ? inputFile->GetInt("NTMARK") : 0; 731 runType = inputFile->HasKey("RUNTYPE") ? inputFile->GetInt("RUNTYPE") : -1; 732 firstDataTime = inputFile->HasKey("TSTART") ? inputFile->GetInt("TSTART") : -1; 733 lastDataTime = inputFile->HasKey("TSTOP") ? inputFile->GetInt("TSTOP"): -1; 734 nRoiTM = inputFile->HasKey("NROITM") ? inputFile->GetInt("NROITM") : 0; 735 revision = inputFile->HasKey("REVISION") ? inputFile->GetInt("REVISION") : -1; 739 736 builderVersion = inputFile->HasKey("BLDVER") ? inputFile->GetInt("BLDVER") : -1; 740 nBoards = inputFile->GetInt("NBOARD");741 nPixels = inputFile->GetInt("NPIX");742 timeSystem = inputFile->GetStr("TIMESYS");743 creationDate = inputFile->GetStr("DATE");744 nightInt = inputFile->GetInt("NIGHT");745 camera = inputFile->GetStr("CAMERA");746 daq = inputFile->GetStr("DAQ");747 adcCount = inputFile->HasKey("ADCRANGE") ? inputFile->GetFloat("ADCRANGE") : 2000;737 nBoards = inputFile->HasKey("NBOARD") ? inputFile->GetInt("NBOARD") : 0; 738 nPixels = inputFile->HasKey("NPIX") ? inputFile->GetInt("NPIX") : 0; 739 timeSystem = inputFile->HasKey("TIMESYS") ? inputFile->GetStr("TIMESYS") : 0; 740 creationDate = inputFile->HasKey("DATE") ? inputFile->GetStr("DATE") : 0; 741 nightInt = inputFile->HasKey("NIGHT") ? inputFile->GetInt("NIGHT") : 0; 742 camera = inputFile->HasKey("CAMERA") ? inputFile->GetStr("CAMERA") : 0; 743 daq = inputFile->HasKey("DAQ") ? inputFile->GetStr("DAQ") : 0; 744 adcCount = inputFile->HasKey("ADCRANGE") ? inputFile->GetFloat("ADCRANGE") : 2000; 748 745 749 746 if (inputFile->HasKey("OFFSET")) … … 1159 1156 fDrsCalib.Apply(eventData, rawEventData, startPix, nRoi); 1160 1157 DrsCalibrate::RemoveSpikes(eventData, nRoi); 1158 for (int i=0;i<1024;i++) 1159 eventData[i] = eventData[i+1024]; 1161 1160 //TODO apply calibration to the Time markers 1162 1161 } … … 2213 2212 return; 2214 2213 2215 //int currentPixel = pixel; 2216 int currentPixel = 0; 2214 int currentPixel = pixel; 2215 //IN ORDER TO GET THE AVERAGE OF ALL PIXELS DISPLAYED IN THE CURVE OF THE VIEWER 2216 //UNCOMMENT THE 9 LINES BELOW, i.e. UNTIL THE END OF AVERAGE DISPLAY COMMENT MARK 2217 //int currentPixel = 0; 2218 // for (int i=0;i<GLWindow->nRoi;i++) 2219 // yval[i] = 0; 2220 // for (int j=0;j<1440;j++) { 2221 // currentPixel = j; 2217 2222 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++)2222 2223 { 2223 2224 xval[i] = i; 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 2225 yval[i] = GLWindow->eventData[GLWindow->nRoi*currentPixel + i]; 2226 // yval[i] += GLWindow->eventData[GLWindow->nRoi*currentPixel + i]; 2227 } 2228 // } 2229 // for (int i=0;i<GLWindow->nRoi;i++) 2230 // yval[i] /= 1440; 2231 //END OF AVERAGE DISPLAY COMMENTS 2230 2232 int realNumSamples = GLWindow->nRoi; 2231 2233 if (GLWindow->nRoiTM != 0) … … 2363 2365 for (int i=start;i<end;i++) 2364 2366 { 2365 for (int j= 0;j<GLWindow->nRoi;j++)2367 for (int j=10;j<GLWindow->nRoi-50;j++) 2366 2368 { 2367 2369 int cValue = GLWindow->eventData[i*GLWindow->nRoi+j];
Note:
See TracChangeset
for help on using the changeset viewer.