Fix for differences in header sizes for Jungfrau data files in cluster finder depending on receiver used.

This commit is contained in:
paton_k 2023-04-04 16:13:50 +02:00
parent e817cb1222
commit 3d6c956147
2 changed files with 9 additions and 16 deletions

View File

@ -110,9 +110,13 @@ class jungfrauModuleData : public slsDetectorData<uint16_t> {
/* unsigned char frameNumber[3]; */ /* unsigned char frameNumber[3]; */
/* unsigned char bunchid[8]; */ /* unsigned char bunchid[8]; */
/* }; */ /* }; */
int getFrameNumber(char *buff) { int getFrameNumber(char *buff) {
return ((header *)buff)->bunchNumber; #ifdef ALDO
return ((header *)buff)->bunchNumber;
#else
return ((header *)buff)->detHeader.frameNumber;
#endif
}; };
/** /**

View File

@ -99,20 +99,9 @@ int main(int argc, char *argv[]) {
decoder->getDetectorSize(nx, ny); decoder->getDetectorSize(nx, ny);
cout << "Detector size is " << nx << " " << ny << endl; cout << "Detector size is " << nx << " " << ny << endl;
double *gainmap = NULL; double *gainmap = NULL;
//float *gm; //float *gm;
@ -253,10 +242,10 @@ int main(int argc, char *argv[]) {
if (pedfile) { if (pedfile) {
if (string(pedfile).find(".dat") != std::string::npos) { if (string(pedfile).find(".raw") != std::string::npos) {
pos1=string(pedfile).rfind("/"); pos1=string(pedfile).rfind("/");
strcpy(froot,pedfile+pos1); strcpy(froot,pedfile+pos1);
pos=string(froot).find(".dat"); pos=string(froot).find(".raw");
froot[pos]='\0'; froot[pos]='\0';
} }