From 2b93ef4565ef9113cace2cba2cc6717261a5a80d Mon Sep 17 00:00:00 2001 From: vhinger182 Date: Fri, 6 Oct 2023 11:55:20 +0200 Subject: [PATCH] minor --- .../jungfrauLGADStrixelsData_new.h | 2 +- .../jungfrauExecutables/CMakeLists.txt | 2 +- .../jungfrauRawDataProcess.cpp | 2 +- .../jungfrauRawDataProcess_filetxt.cpp | 19 +++++++++++++------ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/slsDetectorCalibration/dataStructures/jungfrauLGADStrixelsData_new.h b/slsDetectorCalibration/dataStructures/jungfrauLGADStrixelsData_new.h index 58da3c570..1220fdba4 100644 --- a/slsDetectorCalibration/dataStructures/jungfrauLGADStrixelsData_new.h +++ b/slsDetectorCalibration/dataStructures/jungfrauLGADStrixelsData_new.h @@ -81,7 +81,7 @@ constexpr int c6g1_ystart = c6g2_yend + 1; // 448 constexpr int c6g1_yend = c6g2_yend + 64 - gr; // 502 // y shift due to faulty bonding (relevant for M408) -constexpr int bond_shift_y = 1; // CHANGE IF YOU CHANGE MODULE! +constexpr int bond_shift_y = 0; // CHANGE IF YOU CHANGE MODULE! } // namespace strixelSingleChip diff --git a/slsDetectorCalibration/jungfrauExecutables/CMakeLists.txt b/slsDetectorCalibration/jungfrauExecutables/CMakeLists.txt index bf9322db3..b6f2d2337 100644 --- a/slsDetectorCalibration/jungfrauExecutables/CMakeLists.txt +++ b/slsDetectorCalibration/jungfrauExecutables/CMakeLists.txt @@ -15,7 +15,7 @@ target_compile_definitions(jungfrauRawDataProcess PRIVATE MODULE) list(APPEND JUNGFRAU_EXECUTABLES jungfrauRawDataProcess) # jungfrauRawDataProcessStrx -add_executable(jungfrauRawDataProcessStrx jungfrauRawDataProcess.cpp) +add_executable(jungfrauRawDataProcessStrx jungfrauRawDataProcess_filetxt.cpp) target_compile_definitions(jungfrauRawDataProcessStrx PRIVATE JFSTRX) list(APPEND JUNGFRAU_EXECUTABLES jungfrauRawDataProcessStrx) diff --git a/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp index cba1a8be2..6320807ed 100644 --- a/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp +++ b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp @@ -360,7 +360,7 @@ int main(int argc, char *argv[]) { mt->setFrameMode(ePedestal); - ifstream pedefile(fname, ios::in | ios::binary); + std::ifstream pedefile(fname, ios::in | ios::binary); // //open file if (pedefile.is_open()) { std::cout << "bbbb " << std::ctime(&end_time) << std::endl; diff --git a/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess_filetxt.cpp b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess_filetxt.cpp index 11f0a1c6a..e12400d9e 100644 --- a/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess_filetxt.cpp +++ b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess_filetxt.cpp @@ -111,11 +111,6 @@ int main(int argc, char *argv[]) { const std::string jsonmastername(argv[3]); const std::string pedfilename(argv[4]); - int xmin = atoi(argv[5]); - int xmax = atoi(argv[6]); - int ymin = atoi(argv[7]); - int ymax = atoi(argv[8]); - double thr = 0; double thr1 = 1; thr = atof(argv[9]); @@ -172,6 +167,8 @@ int main(int argc, char *argv[]) { rxroi_ymin = j["Receiver Roi"]["ymin"]; rxroi_ymax = j["Receiver Roi"]["ymax"]; masterfile.close(); + std::cout << "Read rxROI [" << rxroi_xmin << ", " << rxroi_xmax << ", " + << rxroi_ymin << ", " << rxroi_ymax << "]" << std::endl; } else std::cout << "Could not open master file " << jsonmastername << std::endl; @@ -254,7 +251,16 @@ int main(int argc, char *argv[]) { decoder->getDetectorSize(nx, ny); std::cout << "Detector size is " << nx << " " << ny << std::endl; + //Cluster finder ROI + int xmin = 0, xmax = nx-1, ymin = 0, ymax = ny-1; + xmin = atoi(argv[5]); + xmax = atoi(argv[6]); + ymin = atoi(argv[7]); + ymax = atoi(argv[8]); + std::cout << "Cluster finder ROI: [" << xmin << ", " << xmax << ", " << ymin << ", " << ymax << "]" + << std::endl; + /* old if ( xmin == xmax ) { xmin = 0; xmax = nx; @@ -265,6 +271,7 @@ int main(int argc, char *argv[]) { } std::cout << xmin << " " << xmax << " " << ymin << " " << ymax << " " << std::endl; + */ /* char *gainfname = NULL; @@ -436,7 +443,7 @@ int main(int argc, char *argv[]) { std::time(&end_time); std::cout << std::ctime(&end_time) << std::endl; - ifstream filebin(filenames[ifile], ios::in | ios::binary); + std::ifstream filebin(filenames[ifile], ios::in | ios::binary); // //open file ioutfile = 0; if (filebin.is_open()) {