From 8c2ed9dcf4b911d990c3dfb5bc2ea9b6c3edc182 Mon Sep 17 00:00:00 2001 From: bergamaschi Date: Thu, 6 Feb 2014 09:54:10 +0000 Subject: [PATCH] jungfrau classes not work git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@36 113b152e-814d-439b-b186-022a431db7b5 --- slsDetectorCalibration/doxy.config | 2 +- slsDetectorCalibration/jungfrau02Data.h | 24 +++++++++++-------- slsDetectorCalibration/jungfrauReadData.C | 28 +++++++++++------------ 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/slsDetectorCalibration/doxy.config b/slsDetectorCalibration/doxy.config index b81d49e48..a8476899c 100644 --- a/slsDetectorCalibration/doxy.config +++ b/slsDetectorCalibration/doxy.config @@ -80,6 +80,6 @@ LATEX_HIDE_INDICES = YES PREDEFINED = __cplusplus -INPUT = MovingStat.h slsDetectorData.h slsReceiverData.h moench02ModuleData.h pedestalSubtraction.h commonModeSubtraction.h moenchCommonMode.h singlePhotonDetector.h energyCalibration.h moenchReadData.C single_photon_hit.h +INPUT = MovingStat.h slsDetectorData.h slsReceiverData.h moench02ModuleData.h pedestalSubtraction.h commonModeSubtraction.h moenchCommonMode.h singlePhotonDetector.h energyCalibration.h moenchReadData.C single_photon_hit.h chiptestBoardData.h jungfrau02Data.h jungfrauReadData.C OUTPUT_DIRECTORY = docs diff --git a/slsDetectorCalibration/jungfrau02Data.h b/slsDetectorCalibration/jungfrau02Data.h index eeb4eb709..857e2d9f4 100644 --- a/slsDetectorCalibration/jungfrau02Data.h +++ b/slsDetectorCalibration/jungfrau02Data.h @@ -38,13 +38,13 @@ class jungfrau02Data : public chiptestBoardData { } - for (int iy=0; iy<48; iy++) { - for (int ix=0; ix<48; ix++) { - - dMap[iy][ix]=offset+(iy*48+ix)*nAdc; - // cout << ix << " " << iy << " " << dMap[ix][iy] << endl; - } - } + for (int iy=0; iy<48; iy++) { + for (int ix=0; ix<48; ix++) { + + dMap[iy][ix]=offset+(iy*48+ix)*nAdc; + // cout << ix << " " << iy << " " << dMap[ix][iy] << endl; + } + } for (int ix=0; ix<48; ix++) { for (int iy=0; iy<48; iy++) @@ -74,12 +74,14 @@ class jungfrau02Data : public chiptestBoardData { if (ix>=0 && ix=0 && iy=0 && dataMap[iy][ix]8000) d|=(1<<14); // set gain bit 0 if (*((uint16_t*)(data)+dataMap[iy][ix]+2)>8000) d|=(1<<15); // set gain bit 1 - + } } @@ -96,10 +98,12 @@ class jungfrau02Data : public chiptestBoardData { */ double getValue(char *data, int ix, int iy=0) { // cout << "##" << (void*)data << " " << ix << " " <getEventType(buff, ix, iy, cmsub); + thisEvent=filter->getEventType(buff, ix, iy, cmsub); #ifdef MY_DEBUG if (hitfinder) { if (iev%1000==0) - he->SetBinContent(ix+1-xmin, iy+1-ymin, decoder->getValue(buff,ix,iy)); - //he->SetBinContent(ix+1-xmin, iy+1-ymin, (int)thisEvent); + he->SetBinContent(ix+1-xmin, iy+1-ymin, (int)thisEvent); } #endif if (nf>1000) { - h1->Fill(decoder->getValue(buff,ix,iy), iy+NR*ix); - // h1->Fill(filter->getClusterTotal(1), iy+NR*ix); + // h1->Fill(decoder->getValue(buff,ix,iy), iy+NR*ix); + h1->Fill(filter->getClusterTotal(1), iy+NR*ix); if (hitfinder) { if (thisEvent==PHOTON_MAX ) { nph++; -// h2->Fill(filter->getClusterTotal(2), iy+NR*ix); -// h3->Fill(filter->getClusterTotal(3), iy+NR*ix); -// iFrame=decoder->getFrameNumber(buff); + h2->Fill(filter->getClusterTotal(2), iy+NR*ix); + h3->Fill(filter->getClusterTotal(3), iy+NR*ix); + iFrame=decoder->getFrameNumber(buff); -// tall->Fill(); + tall->Fill(); } @@ -231,8 +231,8 @@ THStack *jungfrauReadData(char *fformat, char *tit, int runmin, int runmax, int else cout << "could not open file " << fname << endl; } -// if (hitfinder) -// tall->Write(tall->GetName(),TObject::kOverwrite); + if (hitfinder) + tall->Write(tall->GetName(),TObject::kOverwrite);