Changeset 12424 for trunk/FACT++
- Timestamp:
- 11/06/11 17:04:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
r12395 r12424 498 498 nRoi = 0; 499 499 #endif 500 nRoiTM = 0; 501 offSetRoi = 0; 500 502 eventNum = 0; 501 503 rowNum = -1; … … 743 745 daq = inputFile->GetStr("DAQ"); 744 746 adcCount = inputFile->HasKey("ADCRANGE") ? inputFile->GetFloat("ADCRANGE") : 2000; 747 748 if (inputFile->HasKey("OFFSET")) 749 offSetRoi = inputFile->GetInt("OFFSET"); 750 745 751 nbOk = 0;//inputFile->GetInt("NBEVTOK"); 746 752 nbRej = 0;//inputFile->GetInt("NBEVTREJ"); … … 1558 1564 1559 1565 //extract the file name only (no path) from the full name 1560 str << "File: " << currentFile.substr(currentFile.find_last_of("//")+1, currentFile.size()) << "\n"; 1561 str << "Calibration: " << currentCalibFile.substr(currentCalibFile.find_last_of("//")+1, currentCalibFile.size()) << "\n"; 1566 str << "File: "; 1567 if (currentFile.size() > 2) 1568 str << currentFile.substr(currentFile.find_last_of("//")+1, currentFile.size()) << "\n"; 1569 else 1570 str << "--\n"; 1571 str << "Calibration: "; 1572 if (currentCalibFile.size() > 2) 1573 str << currentCalibFile.substr(currentCalibFile.find_last_of("//")+1, currentCalibFile.size()) << "\n"; 1574 else 1575 str << "--\n"; 1562 1576 // fileLoadedLabel->setText(QString(str.str().c_str())); 1563 1577 // str.str(""); … … 2190 2204 if (pixel == -1) 2191 2205 return; 2192 2206 int softwarePix = pixel; 2193 2207 pixel = GLWindow->hardwareMapping[pixel]; 2194 2208 … … 2207 2221 #endif 2208 2222 } 2209 2223 int realNumSamples = GLWindow->nRoi; 2224 if (GLWindow->nRoiTM != 0) 2225 { 2226 const PixelMapEntry& mapEntry = GLWindow->fPixelMap.index(softwarePix); 2227 const int pixelIdInPatch = mapEntry.pixel(); 2228 const int patchId = mapEntry.patch(); 2229 const int boardId = mapEntry.board(); 2230 const int crateId = mapEntry.crate(); 2231 if (pixelIdInPatch == 8) 2232 { 2233 int TMIndex = 0; 2234 int xIndex = GLWindow->nRoi; 2235 int arrayIndex = GLWindow->nRoi; 2236 if (GLWindow->offSetRoi < 0) 2237 TMIndex -= GLWindow->offSetRoi; 2238 if (GLWindow->offSetRoi > 0) 2239 xIndex += GLWindow->offSetRoi; 2240 for (int i=TMIndex;i<GLWindow->nRoiTM;i++, xIndex++, arrayIndex++) 2241 { 2242 xval[arrayIndex] = xIndex; 2243 yval[arrayIndex] = GLWindow->eventData[GLWindow->nRoi*1440 + GLWindow->nRoiTM*(40*crateId + 4*boardId + patchId) + i]; 2244 } 2245 realNumSamples += GLWindow->nRoiTM - TMIndex; 2246 } 2247 cout << pixelIdInPatch << " " ; 2248 } 2249 cout << realNumSamples << endl; 2210 2250 // GLWindow->computePulsesStatistics(); 2211 2251 #if QWT_VERSION < 0x060000 2212 pixelValueCurveItem.setData(xval, yval, GLWindow->nRoi);2252 pixelValueCurveItem.setData(xval, yval, realNumSamples); 2213 2253 //// aMeanCurveItem.setData(xval, GLWindow->aMeas, GLWindow->nRoi); 2214 2254 // meanCurveItem.setData(xval, GLWindow->n1mean, GLWindow->nRoi); 2215 2255 // vCorrCurveItem.setData(xval, GLWindow->vCorr, GLWindow->nRoi-3); 2216 2256 #else 2217 pixelValueCurveItem.setSamples(xval, yval, GLWindow->nRoi);2257 pixelValueCurveItem.setSamples(xval, yval, realNumSamples); 2218 2258 // aMeanCurveItem.setSamples(xval, GLWindow->aMeas, GLWindow->nRoi); 2219 2259 // meanCurveItem.setSamples(xval, GLWindow->n1mean, GLWindow->nRoi);
Note:
See TracChangeset
for help on using the changeset viewer.