From 3d6c956147e1cdfa0f835251aeeea5d13a22f56a Mon Sep 17 00:00:00 2001 From: Kirsty Paton Date: Tue, 4 Apr 2023 16:13:50 +0200 Subject: [PATCH] Fix for differences in header sizes for Jungfrau data files in cluster finder depending on receiver used. --- .../dataStructures/jungfrauModuleData.h | 8 ++++++-- .../jungfrauRawDataProcess.cpp | 17 +++-------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/slsDetectorCalibration/dataStructures/jungfrauModuleData.h b/slsDetectorCalibration/dataStructures/jungfrauModuleData.h index 1ea38018c..da3d101cb 100644 --- a/slsDetectorCalibration/dataStructures/jungfrauModuleData.h +++ b/slsDetectorCalibration/dataStructures/jungfrauModuleData.h @@ -110,9 +110,13 @@ class jungfrauModuleData : public slsDetectorData { /* unsigned char frameNumber[3]; */ /* unsigned char bunchid[8]; */ /* }; */ - + int getFrameNumber(char *buff) { - return ((header *)buff)->bunchNumber; + #ifdef ALDO + return ((header *)buff)->bunchNumber; + #else + return ((header *)buff)->detHeader.frameNumber; + #endif }; /** diff --git a/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp index 6aadba3b6..12b93391d 100644 --- a/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp +++ b/slsDetectorCalibration/jungfrauExecutables/jungfrauRawDataProcess.cpp @@ -99,20 +99,9 @@ int main(int argc, char *argv[]) { decoder->getDetectorSize(nx, ny); - - - - - + cout << "Detector size is " << nx << " " << ny << endl; - - - - - - - double *gainmap = NULL; //float *gm; @@ -253,10 +242,10 @@ int main(int argc, char *argv[]) { if (pedfile) { - if (string(pedfile).find(".dat") != std::string::npos) { + if (string(pedfile).find(".raw") != std::string::npos) { pos1=string(pedfile).rfind("/"); strcpy(froot,pedfile+pos1); - pos=string(froot).find(".dat"); + pos=string(froot).find(".raw"); froot[pos]='\0'; }