Changeset 19686 for trunk/FACT++/gui
- Timestamp:
- 09/27/19 16:39:30 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
r19387 r19686 198 198 // color = float(eventData[nRoi*i + whichSlice] + (VALUES_SPAN/2))/(float)(VALUES_SPAN-1); 199 199 // else 200 color = float(eventData[nRoi*hardwareMapping[i] + whichSlice]+(VALUES_SPAN/2))/(float)(VALUES_SPAN-1);200 color = i<nPixels ? float(eventData[nRoi*hardwareMapping[i] + whichSlice]+(VALUES_SPAN/2))/(float)(VALUES_SPAN-1) : 0; 201 201 if (logScale) 202 202 { … … 623 623 nTM = inputFile->HasKey("NTMARK") ? inputFile->GetInt("NTMARK") : 0; 624 624 625 runType = "unk own";625 runType = "unknown"; 626 626 if (inputFile->HasKey("RUNTYPE")) 627 627 { 628 628 runType = inputFile->GetStr("RUNTYPE"); 629 629 if (runType == "") 630 runType = "unk own";630 runType = "unknown"; 631 631 } 632 632 firstDataTime = inputFile->HasKey("TSTART") ? inputFile->GetInt("TSTART") : -1; … … 648 648 nPixels = 1440; 649 649 } 650 if (nPixels > 1440) 651 cout << "More than 1440 pixels not supported." << endl; 652 if (nPixels==1440 && nRoi!=0) 653 cout << "Time marker not suppoerted with number of pixel not euqal 1440." << endl; 654 650 655 if (nRoi == 0 && !inputFile->HasKey("NROI")) 651 656 {//let's try to figure out the roi from the column's format … … 889 894 if (nRoiTM != 0) 890 895 cout << "Warning: did not expect Time Markers data from Monte-Carlo simulations. These will not be mapped properly." << endl; 896 891 897 //first copy the data 892 vector<int16_t> tempData(rawEventData.begin(), rawEventData.begin()+1440*nRoi); 898 const vector<int16_t> tempData(rawEventData);//.begin(), rawEventData.begin()+1440*nRoi); 899 rawEventData.assign(rawEventData.size(), 0); 893 900 //copy back the data and re-map it on the fly 894 901 for (int i=0;i<1440;i++) 895 for (int j=0;j<nRoi;j++) 896 rawEventData[i*nRoi + j] = tempData[softwareMapping[i]*nRoi + j]; 902 if (softwareMapping[i]<nPixels) 903 for (int j=0;j<nRoi;j++) 904 rawEventData[i*nRoi + j] = tempData[softwareMapping[i]*nRoi + j]; 897 905 } 898 906 // cout << "Getting row " << rowNum << endl; 899 900 907 901 908 ApplyCalibration(); … … 2141 2148 if (i==863)//keep crazy pixel out of the autoscale 2142 2149 continue; 2150 2151 if (GLWindow->softwareMapping[i]>=GLWindow->nPixels) 2152 continue; 2153 2143 2154 for (int j=10;j<GLWindow->nRoi-50;j++) 2144 2155 {
Note:
See TracChangeset
for help on using the changeset viewer.