Changeset 19374 for trunk/FACT++/gui
- Timestamp:
- 11/11/18 14:08:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
r19373 r19374 845 845 { 846 846 fDrsCalib.Apply(eventData.data(), rawEventData.data(), startPix, nRoi); 847 DrsCalibrate::RemoveSpikes (eventData.data(), nRoi);847 DrsCalibrate::RemoveSpikes3(eventData.data(), nRoi*1440); 848 848 //TODO apply calibration to the Time markers 849 849 } 850 850 851 //hide the time markers852 int nSlicesToRemove = 60;853 float* backupData = 0;854 if (nRoiTM == 0) //they are written into the regular channel855 {856 backupData = new float[nSlicesToRemove*160];857 for (int i=0;i<1440;i++)858 {859 const PixelMapEntry& mapEntry = fPixelMap.index(i);860 const int pixelIdInPatch = mapEntry.pixel();861 const int patchId = mapEntry.patch();862 const int boardId = mapEntry.board();863 const int crateId = mapEntry.crate();864 865 const int hw = mapEntry.hw();866 if (pixelIdInPatch == 8)867 {868 for (int j=0;j<nSlicesToRemove;j++)869 {870 backupData[(40*crateId + 4*boardId + patchId)*nSlicesToRemove+j] = eventData[(hw*nRoi) + (nRoi-nSlicesToRemove) + j];871 eventData[(hw*nRoi) + (nRoi-nSlicesToRemove) + j] = eventData[hw*nRoi + (nRoi-nSlicesToRemove) - 1];872 }873 }874 }875 }876 877 851 vector<float> pixelStatsData(1440*4); 878 DrsCalibrate::GetPixelStats(pixelStatsData.data(), eventData.data(), nRoi );852 DrsCalibrate::GetPixelStats(pixelStatsData.data(), eventData.data(), nRoi, 15, nRoiTM>0?5:60); 879 853 880 854 for (vector<PixelMapEntry>::const_iterator it=fPixelMap.begin(); it!=fPixelMap.end(); it++) … … 885 859 PosOfMaxvalues[it->index] = pixelStatsData[3*1440+it->hw()]; 886 860 } 887 if (nRoiTM == 0)//move back the data back in place 888 { 889 for (int i=0;i<1440;i++) 890 { 891 const PixelMapEntry& mapEntry = fPixelMap.index(i); 892 const int pixelIdInPatch = mapEntry.pixel(); 893 const int patchId = mapEntry.patch(); 894 const int boardId = mapEntry.board(); 895 const int crateId = mapEntry.crate(); 896 if (patchId > 160) 897 cout << "Voila mon probleme: " << patchId << endl; 898 const int hw = mapEntry.hw(); 899 if (pixelIdInPatch == 8) 900 { 901 // cout << "|" << crateId << " " << boardId << " " << patchId << " " << hw << "| "; 902 for (int j=0;j<nSlicesToRemove;j++) 903 { 904 eventData[(hw*nRoi) + (nRoi - nSlicesToRemove) + j] = backupData[(40*crateId + 4*boardId + patchId)*nSlicesToRemove+j]; 905 } 906 } 907 } 908 delete[] backupData; 909 } 861 910 862 if (isVisible()) 911 863 updateGL();
Note:
See TracChangeset
for help on using the changeset viewer.