mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 10:00:40 +02:00
merge resolved
This commit is contained in:
commit
a98271f0c2
@ -104,7 +104,6 @@ endif()
|
|||||||
|
|
||||||
if(SLS_USE_SANITIZER)
|
if(SLS_USE_SANITIZER)
|
||||||
# target_compile_options(slsProjectOptions INTERFACE -fsanitize=address,undefined -fno-omit-frame-pointer)
|
# target_compile_options(slsProjectOptions INTERFACE -fsanitize=address,undefined -fno-omit-frame-pointer)
|
||||||
#target_compile_options(slsProjectOptions INTERFACE -fsanitize=address,undefined)
|
|
||||||
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=address,undefined)
|
# target_link_libraries(slsProjectOptions INTERFACE -fsanitize=address,undefined)
|
||||||
target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread)
|
target_compile_options(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||||
target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
target_link_libraries(slsProjectOptions INTERFACE -fsanitize=thread)
|
||||||
|
@ -773,9 +773,10 @@ void ctbAcquisition::setCanvas(TCanvas* c) {
|
|||||||
myCanvas->AddExec("dynamic",Form("((ctbAcquisition*)0x%x)->canvasClicked()",this));
|
myCanvas->AddExec("dynamic",Form("((ctbAcquisition*)0x%x)->canvasClicked()",this));
|
||||||
// myCanvas->AddExec("ex","canvasClicked()");
|
// myCanvas->AddExec("ex","canvasClicked()");
|
||||||
}
|
}
|
||||||
int ctbAcquisition::dataCallback(detectorData *data, int index, int dum, void* pArgs) {
|
void ctbAcquisition::dataCallback(detectorData *data, long unsigned int index, unsigned int dum, void* pArgs) {
|
||||||
|
|
||||||
return ((ctbAcquisition*)pArgs)->plotData(data,index);
|
// return
|
||||||
|
((ctbAcquisition*)pArgs)->plotData(data,index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -836,8 +837,8 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
|||||||
|
|
||||||
|
|
||||||
// cout <<"global plot is " << globalPlot << endl;
|
// cout <<"global plot is " << globalPlot << endl;
|
||||||
cout << "*******************************************" <<endl;
|
// cout << "*******************************************" <<endl;
|
||||||
cout <<"------Plot: "<< index << " prog:" << data->progressIndex << " npoints:" << data->npoints << " npy: " << data->npy << " " << data->fileName << " bytes: " << data->databytes << " dr:"<< data->dynamicRange << " fi: " << data ->fileIndex << endl;
|
// cout <<"------Plot: "<< index << " prog:" << data->progressIndex << " npoints:" << data->npoints << " npy: " << data->npy << " " << data->fileName << " bytes: " << data->databytes << " dr:"<< data->dynamicRange << " fi: " << data ->fileIndex << endl;
|
||||||
if (globalPlot || cbGetPedestal->IsOn()) {
|
if (globalPlot || cbGetPedestal->IsOn()) {
|
||||||
//#ifdef TESTADC
|
//#ifdef TESTADC
|
||||||
// cout <<"------"<< index << " " << ip << " " << data->npoints << endl;
|
// cout <<"------"<< index << " " << ip << " " << data->npoints << endl;
|
||||||
@ -904,7 +905,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
|||||||
i=0;
|
i=0;
|
||||||
|
|
||||||
|
|
||||||
char *d_data= data->cvalues+2*nadc*nAnalogSamples;
|
char *d_data= data->data+2*nadc*nAnalogSamples;
|
||||||
char dval;
|
char dval;
|
||||||
|
|
||||||
|
|
||||||
@ -914,7 +915,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
|||||||
for (int x=0; x<nx; x++) {
|
for (int x=0; x<nx; x++) {
|
||||||
for (int y=0; y<ny; y++) {
|
for (int y=0; y<ny; y++) {
|
||||||
ped=0;
|
ped=0;
|
||||||
aval=dataStructure->getValue(data->cvalues,x,y);
|
aval=dataStructure->getValue(data->data,x,y);
|
||||||
|
|
||||||
if (cbGetPedestal->IsOn()) {
|
if (cbGetPedestal->IsOn()) {
|
||||||
if (photonFinder) {
|
if (photonFinder) {
|
||||||
@ -934,7 +935,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
|||||||
|
|
||||||
|
|
||||||
if (h2DMapDig)
|
if (h2DMapDig)
|
||||||
h2DMapDig->SetBinContent(x+1,y+1,dataStructure->getGain(data->cvalues,x,y));
|
h2DMapDig->SetBinContent(x+1,y+1,dataStructure->getGain(data->data,x,y));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1133,13 +1134,12 @@ void ctbAcquisition::changePlot(){
|
|||||||
if (rb2D->IsOn()) {
|
if (rb2D->IsOn()) {
|
||||||
if (h2DMapDig)
|
if (h2DMapDig)
|
||||||
h2DMapDig->Draw("colz");
|
h2DMapDig->Draw("colz");
|
||||||
|
else if (h1DMap)
|
||||||
|
h1DMap->Draw();
|
||||||
} else if (bitStack)
|
} else if (bitStack)
|
||||||
bitStack->Draw("NOSTACK");
|
bitStack->Draw("NOSTACK");
|
||||||
else
|
else
|
||||||
cout << "bitStack is NULL" << endl;
|
cout << "bitStack is NULL" << endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1685,7 +1685,7 @@ void* ctbAcquisition::ThreadHandle(void *arg)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ctbAcquisition::progressCallback(double f,void* arg) {
|
void ctbAcquisition::progressCallback(double f,void* arg) {
|
||||||
|
|
||||||
|
|
||||||
// ctbAcquisition *acq = static_cast<ctbAcquisition*>(arg);
|
// ctbAcquisition *acq = static_cast<ctbAcquisition*>(arg);
|
||||||
|
@ -191,8 +191,8 @@ class ctbAcquisition : public TGGroupFrame {
|
|||||||
void setGraph (int i ,int en, Pixel_t col);
|
void setGraph (int i ,int en, Pixel_t col);
|
||||||
void setBitGraph (int i ,int en, Pixel_t col);
|
void setBitGraph (int i ,int en, Pixel_t col);
|
||||||
void startAcquisition();
|
void startAcquisition();
|
||||||
static int progressCallback(double,void*);
|
static void progressCallback(double,void*);
|
||||||
static int dataCallback(detectorData*, int,int, void*);
|
static void dataCallback(detectorData*, long unsigned int, unsigned int, void*);
|
||||||
int StopFlag;
|
int StopFlag;
|
||||||
|
|
||||||
int plotData(detectorData*, int);
|
int plotData(detectorData*, int);
|
||||||
|
@ -64,7 +64,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
/****** Create detector ****************/
|
/****** Create detector ****************/
|
||||||
multiSlsDetector *myDet=new multiSlsDetector(id);
|
multiSlsDetector *myDet=new multiSlsDetector(id);
|
||||||
myDet->setOnline(slsDetectorDefs::ONLINE_FLAG);
|
// myDet->setOnline(slsDetectorDefs::ONLINE_FLAG);
|
||||||
|
|
||||||
//cout << id << " " << myDet << " " << myDet->setOnline() << endl;
|
//cout << id << " " << myDet << " " << myDet->setOnline() << endl;
|
||||||
if (cf) {
|
if (cf) {
|
||||||
|
@ -510,24 +510,24 @@ ctbPattern::ctbPattern(TGVerticalFrame *page, multiSlsDetector *det)
|
|||||||
e->Connect("ReturnPressed()","ctbPattern",this,"setCycles()");
|
e->Connect("ReturnPressed()","ctbPattern",this,"setCycles()");
|
||||||
|
|
||||||
|
|
||||||
sprintf(tit, "Number of measurements: ");
|
// sprintf(tit, "Number of measurements: ");
|
||||||
|
|
||||||
label= new TGLabel(hframe, tit);
|
// label= new TGLabel(hframe, tit);
|
||||||
hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
// hframe->AddFrame(label,new TGLayoutHints(kLHintsTop | kLHintsLeft| kLHintsExpandX, 1, 1, 1, 1));
|
||||||
label->MapWindow();
|
// label->MapWindow();
|
||||||
label->SetTextJustify(kTextLeft);
|
// label->SetTextJustify(kTextLeft);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
eMeasurements = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
// eMeasurements = new TGNumberEntry(hframe, 0, 9,999, TGNumberFormat::kNESInteger,
|
||||||
TGNumberFormat::kNEANonNegative,
|
// TGNumberFormat::kNEANonNegative,
|
||||||
TGNumberFormat::kNELNoLimits);
|
// TGNumberFormat::kNELNoLimits);
|
||||||
hframe->AddFrame( eMeasurements,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
// hframe->AddFrame( eMeasurements,new TGLayoutHints(kLHintsTop | kLHintsExpandX, 1, 1, 1, 1));
|
||||||
eMeasurements->MapWindow();
|
// eMeasurements->MapWindow();
|
||||||
eMeasurements->Resize(150,30);
|
// eMeasurements->Resize(150,30);
|
||||||
e= eMeasurements->TGNumberEntry::GetNumberEntry();
|
// e= eMeasurements->TGNumberEntry::GetNumberEntry();
|
||||||
e->Connect("ReturnPressed()","ctbPattern",this,"setMeasurements()");
|
// e->Connect("ReturnPressed()","ctbPattern",this,"setMeasurements()");
|
||||||
|
|
||||||
|
|
||||||
hframe=new TGHorizontalFrame(this, 800,800);
|
hframe=new TGHorizontalFrame(this, 800,800);
|
||||||
@ -910,14 +910,14 @@ try {
|
|||||||
eCycles->SetNumber(n);
|
eCycles->SetNumber(n);
|
||||||
|
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
myDet->setTimer(slsDetectorDefs::MEASUREMENTS_NUMBER,-1);
|
// myDet->setTimer(slsDetectorDefs::MEASUREMENTS_NUMBER,-1);
|
||||||
} catch (...) {
|
// } catch (...) {
|
||||||
|
|
||||||
cout << "Do nothing for this error" << endl;
|
// cout << "Do nothing for this error" << endl;
|
||||||
}
|
// }
|
||||||
|
|
||||||
eMeasurements->SetNumber(n);
|
// eMeasurements->SetNumber(n);
|
||||||
|
|
||||||
start=-1;
|
start=-1;
|
||||||
stop=-1;
|
stop=-1;
|
||||||
@ -1049,14 +1049,14 @@ void ctbPattern::setCycles() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctbPattern::setMeasurements() {
|
// void ctbPattern::setMeasurements() {
|
||||||
try {
|
// try {
|
||||||
myDet->setTimer(slsDetectorDefs::MEASUREMENTS_NUMBER,eFrames->GetNumber());
|
// myDet->setTimer(slsDetectorDefs::MEASUREMENTS_NUMBER,eFrames->GetNumber());
|
||||||
} catch (...) {
|
// } catch (...) {
|
||||||
|
|
||||||
cout << "Do nothing for this error" << endl;
|
// cout << "Do nothing for this error" << endl;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ private:
|
|||||||
TGNumberEntry *eFrames;
|
TGNumberEntry *eFrames;
|
||||||
TGNumberEntry *ePeriod;
|
TGNumberEntry *ePeriod;
|
||||||
TGNumberEntry *eCycles;
|
TGNumberEntry *eCycles;
|
||||||
TGNumberEntry *eMeasurements;
|
// TGNumberEntry *eMeasurements;
|
||||||
TGNumberEntry *eAdcPipeline;
|
TGNumberEntry *eAdcPipeline;
|
||||||
TGNumberEntry *eDBitPipeline;
|
TGNumberEntry *eDBitPipeline;
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ public:
|
|||||||
void setDBitPipeline();
|
void setDBitPipeline();
|
||||||
void setFrames();
|
void setFrames();
|
||||||
void setCycles();
|
void setCycles();
|
||||||
void setMeasurements();
|
// void setMeasurements();
|
||||||
void setPeriod();
|
void setPeriod();
|
||||||
|
|
||||||
|
|
||||||
|
@ -326,7 +326,25 @@ The size of the gap pixels between modules to insert is
|
|||||||
GapPixelsBetweenModules_y = 36
|
GapPixelsBetweenModules_y = 36
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
where the {\tt{GapPixelsBetweenModules\_x}} are the one on the short side of the module, while {\tt{GapPixelsBetweenModules\_y}} are the ones on the long side of the module (where the wirebonds take physical space).
|
where the {\tt{GapPixelsBetweenModules\_x}} are the one on the short side of the module, while {\tt{GapPixelsBetweenModules\_y}} are the ones on the long side of the module (where the wirebonds take physical space).
|
||||||
|
\section{QUAD special geometry}
|
||||||
|
Starting from release 4.1.0, we support a special geometry with 2x2 pixels. This is for a Quad, where a single half module reads out 4 chips but in a quad shape. For now this hardware is only available as a PEEM detector at SIM.
|
||||||
|
The {\tt{detsizechan 1024 512}} needs to remain set like this for a half module. However, thanks to the command:
|
||||||
|
\begin{verbatim}
|
||||||
|
./sls_detector_put quad 1
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
a 512x512 geomtry will be read out if {\tt{gappixels 0}} and 514x514 will be readout if {\tt{gappixels 1}}. Note that as above, {\tt{gappixels 1}} is not supported for {\tt{dr 4}}.
|
||||||
|
If {\tt{gappixels 0}}, in the master.raw file you will read:
|
||||||
|
\begin{verbatim}
|
||||||
|
row : 512 pixels
|
||||||
|
col : 256 pixels
|
||||||
|
\end{verbatim}
|
||||||
|
else if {\tt{gappixels 1}}, in the master.raw file you will read:
|
||||||
|
\begin{verbatim}
|
||||||
|
row : 514 pixels
|
||||||
|
col : 257 pixels
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
\section{Readout timing- maximum frame rate}\label{timing}
|
\section{Readout timing- maximum frame rate}\label{timing}
|
||||||
IMPORTANT: to have faster readout and smaller dead time, one can configure {\tt{clkdivider}}, i.e. the speed at which the data are read, i.e. 200/100/50~MHz for {\tt{clkdivider 0/1/2}} and the dead time between frames through {\tt{flags parallel}}, i.e. acquire and read at the same time or acquire and then read out.
|
IMPORTANT: to have faster readout and smaller dead time, one can configure {\tt{clkdivider}}, i.e. the speed at which the data are read, i.e. 200/100/50~MHz for {\tt{clkdivider 0/1/2}} and the dead time between frames through {\tt{flags parallel}}, i.e. acquire and read at the same time or acquire and then read out.
|
||||||
The configuration of this timing variables allows to achieve different frame rates. NOTE THAT IN EIGER, WHATEVER YOU DO, THE FRAME RATE LIMITATIONS COME FROM THE NETWORK BOTTLENECK AS THE HARDWARE GOES FASTER THAN THE DATA OUT.
|
The configuration of this timing variables allows to achieve different frame rates. NOTE THAT IN EIGER, WHATEVER YOU DO, THE FRAME RATE LIMITATIONS COME FROM THE NETWORK BOTTLENECK AS THE HARDWARE GOES FASTER THAN THE DATA OUT.
|
||||||
@ -603,6 +621,9 @@ Here are the implemented options so far:
|
|||||||
\item {\tt{burst\_trigger}} gets only 1 trigger, but allows to take many frames. With {\tt{frames}} one can change the number of frames. {\tt{cycles}} needs to be 1. {\tt{exptime}} and {\tt{period}} have to be set. In the gui it is called trigger readout.
|
\item {\tt{burst\_trigger}} gets only 1 trigger, but allows to take many frames. With {\tt{frames}} one can change the number of frames. {\tt{cycles}} needs to be 1. {\tt{exptime}} and {\tt{period}} have to be set. In the gui it is called trigger readout.
|
||||||
\item{\tt{gating}} allows to get a frame only when the trigger pulse is gating. Note that in this case the exp time and period only depend on the gating signal. {\tt{cycles}} allows to select how many gates to consider. Set number of frames to 1 using {\tt{frames}}. IMPORTANT: Up to firmware 23, the last subframe is oblige to finish being taken, despite the gate signal going down. This will be configurable from later fw and software version. Also, in gating mode, due to timimg of the state machine, you need to leave 500~$\mu$s deadtime between the end on an acquisition and the next. This is as the state machine is unable to check for changes in the status in the first 500~$\mu$s. ATTENTION: if you are in 16 bit mode and you are applying online rate corrections, as now the exptime is generated by the trigger, you might not have correct rate corrections. If you know what the exposure time is in the gating signal, then you can set the {\tt{exptime}} once and the rate corrections will be correct. In 32 bit mode, it does not matter as the rate corrections depends on the {\tt{subexptime}} which is software set independently from the gate exptime.
|
\item{\tt{gating}} allows to get a frame only when the trigger pulse is gating. Note that in this case the exp time and period only depend on the gating signal. {\tt{cycles}} allows to select how many gates to consider. Set number of frames to 1 using {\tt{frames}}. IMPORTANT: Up to firmware 23, the last subframe is oblige to finish being taken, despite the gate signal going down. This will be configurable from later fw and software version. Also, in gating mode, due to timimg of the state machine, you need to leave 500~$\mu$s deadtime between the end on an acquisition and the next. This is as the state machine is unable to check for changes in the status in the first 500~$\mu$s. ATTENTION: if you are in 16 bit mode and you are applying online rate corrections, as now the exptime is generated by the trigger, you might not have correct rate corrections. If you know what the exposure time is in the gating signal, then you can set the {\tt{exptime}} once and the rate corrections will be correct. In 32 bit mode, it does not matter as the rate corrections depends on the {\tt{subexptime}} which is software set independently from the gate exptime.
|
||||||
|
|
||||||
|
When using 32-bit mode, by default the acquisition ends the last complete subframe that was started when still the acquisition time was valid. This has been chosen as many people wants to know the exact acquisition time for when the detector was taking data and also, if {\tt{ratecorr}} are active, the last subframe will be correctly corrected, while otherwise it will be corrected with a wrong subdeadtime.
|
||||||
|
However, from 4.1.0, in gating mode, an option to immediately terminate the subframe when the gate signal goes down it is implemented to stop the acquisition at the same time. This option is {\tt{./sls\_detector\_put interruptsubframe 1}} while the default option is {\tt{./sls\_detector\_put interruptsubframe 0}}.
|
||||||
|
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
Hardware-wise, the ENABLE OUT signal outputs when the chips are really acquiring. This means that the single subframes will be output in 32 bit mode. The TRIGGER OUT outputs the sum-up-signal at the moment (which is useless). This will be changed in the future to output the envelop of the enable signal.
|
Hardware-wise, the ENABLE OUT signal outputs when the chips are really acquiring. This means that the single subframes will be output in 32 bit mode. The TRIGGER OUT outputs the sum-up-signal at the moment (which is useless). This will be changed in the future to output the envelop of the enable signal.
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include "slsDetectorData.h"
|
#include "slsDetectorData.h"
|
||||||
#include "pedestalSubtraction.h"
|
#include "pedestalSubtraction.h"
|
||||||
#include "commonModeSubtraction.h"
|
#include "commonModeSubtractionNew.h"
|
||||||
|
#include "ghostSummation.h"
|
||||||
#include "tiffIO.h"
|
#include "tiffIO.h"
|
||||||
#include "slsInterpolation.h"
|
#include "slsInterpolation.h"
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ template <class dataType> class analogDetector {
|
|||||||
|
|
||||||
|
|
||||||
analogDetector(slsDetectorData<dataType> *d, int sign=1,
|
analogDetector(slsDetectorData<dataType> *d, int sign=1,
|
||||||
commonModeSubtraction *cm=NULL, int nped=1000, int nnx=-1, int nny=-1, double *gm=NULL) : det(d), nx(nnx), ny(nny), stat(NULL), cmSub(cm), iframe(-1), dataSign(sign), gmap(gm), id(0) {
|
commonModeSubtraction *cm=NULL, int nped=1000, int nnx=-1, int nny=-1, double *gm=NULL, ghostSummation<dataType> *gs=NULL) : det(d), nx(nnx), ny(nny), stat(NULL), cmSub(cm), iframe(-1), dataSign(sign), gmap(gm), ghSum(gs), id(0) {
|
||||||
|
|
||||||
if (det)
|
if (det)
|
||||||
det->getDetectorSize(nx,ny);
|
det->getDetectorSize(nx,ny);
|
||||||
@ -118,7 +119,7 @@ template <class dataType> class analogDetector {
|
|||||||
dataSign=orig->dataSign;
|
dataSign=orig->dataSign;
|
||||||
iframe=orig->iframe;
|
iframe=orig->iframe;
|
||||||
gmap=orig->gmap;
|
gmap=orig->gmap;
|
||||||
cmSub=orig->cmSub;
|
// cmSub=orig->cmSub;
|
||||||
id=orig->id;
|
id=orig->id;
|
||||||
xmin=orig->xmin;
|
xmin=orig->xmin;
|
||||||
xmax=orig->xmax;
|
xmax=orig->xmax;
|
||||||
@ -153,7 +154,9 @@ template <class dataType> class analogDetector {
|
|||||||
hs9=(TH2F*)(orig->hs9)->Clone();//new TH2F("hs","hs",(orig->hs)-getNbins,-500,9500,nx*ny,-0.5,nx*ny-0.5);
|
hs9=(TH2F*)(orig->hs9)->Clone();//new TH2F("hs","hs",(orig->hs)-getNbins,-500,9500,nx*ny,-0.5,nx*ny-0.5);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
if (orig->cmSub) cmSub=(orig->cmSub)->Clone();
|
||||||
|
if (orig->ghSum) ghSum=(orig->ghSum)->Clone();
|
||||||
|
else ghSum=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -275,6 +278,9 @@ template <class dataType> class analogDetector {
|
|||||||
|
|
||||||
/** resets the commonModeSubtraction and increases the frame index */
|
/** resets the commonModeSubtraction and increases the frame index */
|
||||||
virtual void newFrame(){iframe++; if (cmSub) cmSub->newFrame();};
|
virtual void newFrame(){iframe++; if (cmSub) cmSub->newFrame();};
|
||||||
|
|
||||||
|
/** resets the commonModeSubtraction and increases the frame index */
|
||||||
|
virtual void newFrame(char *data){iframe++; if (cmSub) cmSub->newFrame(); calcGhost(data);};
|
||||||
|
|
||||||
|
|
||||||
/** sets the commonModeSubtraction algorithm to be used
|
/** sets the commonModeSubtraction algorithm to be used
|
||||||
@ -289,6 +295,11 @@ template <class dataType> class analogDetector {
|
|||||||
commonModeSubtraction *getCommonModeSubtraction() {return cmSub;};
|
commonModeSubtraction *getCommonModeSubtraction() {return cmSub;};
|
||||||
|
|
||||||
|
|
||||||
|
ghostSummation<dataType> *getGhostSummation(){return ghSum;};
|
||||||
|
ghostSummation<dataType> *setGhostSummation(ghostSummation<dataType> *gs){ghSum=gs; return ghSum;};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
sets the sign of the data
|
sets the sign of the data
|
||||||
\param sign 1 means positive values for photons, -1 negative, 0 gets
|
\param sign 1 means positive values for photons, -1 negative, 0 gets
|
||||||
@ -306,9 +317,15 @@ template <class dataType> class analogDetector {
|
|||||||
*/
|
*/
|
||||||
virtual void addToPedestal(double val, int ix, int iy=0, int cm=0){
|
virtual void addToPedestal(double val, int ix, int iy=0, int cm=0){
|
||||||
if (ix>=0 && ix<nx && iy>=0 && iy<ny) {
|
if (ix>=0 && ix<nx && iy>=0 && iy<ny) {
|
||||||
|
|
||||||
|
// cout << val << " " ;
|
||||||
if (cmSub && cm>0) {
|
if (cmSub && cm>0) {
|
||||||
val-= getCommonMode(ix, iy);
|
val-= getCommonMode(ix, iy);
|
||||||
}
|
}
|
||||||
|
// cout << val << " " ;
|
||||||
|
val+=getGhost(ix,iy);
|
||||||
|
// cout << val ;
|
||||||
|
// cout << endl;
|
||||||
stat[iy][ix].addToPedestal(val);
|
stat[iy][ix].addToPedestal(val);
|
||||||
/* if (cmSub && cm>0) { */
|
/* if (cmSub && cm>0) { */
|
||||||
/* if (det) if (det->isGood(ix, iy)==0) return; */
|
/* if (det) if (det->isGood(ix, iy)==0) return; */
|
||||||
@ -324,23 +341,29 @@ template <class dataType> class analogDetector {
|
|||||||
|
|
||||||
|
|
||||||
virtual void addToCommonMode(char *data){
|
virtual void addToCommonMode(char *data){
|
||||||
|
// cout << "+"<< endl;
|
||||||
if (cmSub) {
|
if (cmSub) {
|
||||||
|
// cout << "*" << endl;
|
||||||
for (int iy=ymin; iy<ymax; iy++) {
|
for (int iy=ymin; iy<ymax; iy++) {
|
||||||
for (int ix=xmin; ix<xmax; ix++) {
|
for (int ix=xmin; ix<xmax; ix++) {
|
||||||
// if (getNumpedestals(ix,iy)>0)
|
// if (getNumpedestals(ix,iy)>0)
|
||||||
if (det->isGood(ix,iy))
|
// if (det->isGood(ix,iy)) {
|
||||||
addToCommonMode(data, ix, iy);
|
addToCommonMode(data, ix, iy);
|
||||||
}
|
// cout << ":";
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//cout << "cm " << getCommonMode(0,0) << " " << getCommonMode(1,0) << endl;
|
//cout << "cm " << getCommonMode(0,0) << " " << getCommonMode(1,0) << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void addToCommonMode(char *data, int ix, int iy=0){
|
virtual void addToCommonMode(char *data, int ix, int iy=0){
|
||||||
if (cmSub) {
|
if (cmSub) {
|
||||||
if (det) if (det->isGood(ix, iy)==0) return;
|
if (det) if (det->isGood(ix, iy)==0) return;
|
||||||
if (getNumpedestals(ix,iy)>0){
|
if (getNumpedestals(ix,iy)>0){
|
||||||
cmSub->addToCommonMode(subtractPedestal(data,ix,iy,0), ix, iy);
|
cmSub->addToCommonMode(subtractPedestal(data,ix,iy,0), ix, iy);
|
||||||
// cout << ix << " " <<subtractPedestal(data,ix,iy,0) << endl;
|
// cout << ":";
|
||||||
|
// cout << ix << " " <<" " << iy << subtractPedestal(data,ix,iy,0) << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -351,7 +374,7 @@ template <class dataType> class analogDetector {
|
|||||||
\param cm 0 (default) without common mode subtraction, 1 with common mode subtraction (if defined)
|
\param cm 0 (default) without common mode subtraction, 1 with common mode subtraction (if defined)
|
||||||
\returns pedestal value
|
\returns pedestal value
|
||||||
*/
|
*/
|
||||||
virtual double getPedestal(int ix, int iy, int cm=0){
|
virtual double getPedestal (int ix, int iy, int cm=0){
|
||||||
if (ix>=0 && ix<nx && iy>=0 && iy<ny)
|
if (ix>=0 && ix<nx && iy>=0 && iy<ny)
|
||||||
if (cmSub && cm>0)
|
if (cmSub && cm>0)
|
||||||
return stat[iy][ix].getPedestal()+getCommonMode(ix,iy);
|
return stat[iy][ix].getPedestal()+getCommonMode(ix,iy);
|
||||||
@ -482,7 +505,10 @@ template <class dataType> class analogDetector {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data, int ix, int iy=1) {if (ghSum) ghSum->calcGhost(data, ix, iy);};
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data){if (ghSum) ghSum->calcGhost(data);};
|
||||||
|
virtual double getGhost(int ix, int iy) {if (ghSum) return ghSum->getGhost(ix, iy); return 0;};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
write 32bit tiff file with detector image data
|
write 32bit tiff file with detector image data
|
||||||
@ -691,9 +717,12 @@ template <class dataType> class analogDetector {
|
|||||||
virtual void addToPedestal(char *data, int cm=0) {
|
virtual void addToPedestal(char *data, int cm=0) {
|
||||||
|
|
||||||
// cout << "add to pedestal " << endl;
|
// cout << "add to pedestal " << endl;
|
||||||
newFrame();
|
newFrame(data);
|
||||||
|
|
||||||
if (cmSub) {
|
//calcGhost(data);
|
||||||
|
|
||||||
|
|
||||||
|
if (cmSub && cm) {
|
||||||
addToCommonMode(data);
|
addToCommonMode(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -702,7 +731,8 @@ template <class dataType> class analogDetector {
|
|||||||
for (int iy=ymin; iy<ymax; iy++) {
|
for (int iy=ymin; iy<ymax; iy++) {
|
||||||
for (int ix=xmin; ix<xmax; ix++) {
|
for (int ix=xmin; ix<xmax; ix++) {
|
||||||
if (det->isGood(ix,iy)) {
|
if (det->isGood(ix,iy)) {
|
||||||
addToPedestal(data,ix,iy,1);
|
// addToPedestal(data,ix,iy,1);
|
||||||
|
addToPedestal(data,ix,iy,cm);
|
||||||
//if (ix==10 && iy==10)
|
//if (ix==10 && iy==10)
|
||||||
// cout <<ix << " " << iy << " " << getPedestal(ix,iy)<< endl;
|
// cout <<ix << " " << iy << " " << getPedestal(ix,iy)<< endl;
|
||||||
#ifdef ROOTSPECTRUM
|
#ifdef ROOTSPECTRUM
|
||||||
@ -792,12 +822,13 @@ template <class dataType> class analogDetector {
|
|||||||
val=dataSign*det->getValue(data, ix, iy);
|
val=dataSign*det->getValue(data, ix, iy);
|
||||||
else
|
else
|
||||||
val=((double*)data)[iy*nx+ix];
|
val=((double*)data)[iy*nx+ix];
|
||||||
|
// cout << val << endl;
|
||||||
/* if (ix==10 && iy==10) */
|
/* if (ix==10 && iy==10) */
|
||||||
/* cout << ix << " " << iy << " " << val ; */
|
/* cout << ix << " " << iy << " " << val ; */
|
||||||
/* if (ix==100 && iy==100) */
|
/* if (ix==100 && iy==100) */
|
||||||
/* cout << ix << " " << iy << " " << val; */
|
/* cout << ix << " " << iy << " " << val; */
|
||||||
addToPedestal(val,ix,iy);
|
addToPedestal(val,ix,iy);
|
||||||
|
// cout << val << endl;
|
||||||
/* if (ix==10 && iy==10) */
|
/* if (ix==10 && iy==10) */
|
||||||
/* cout <<" " << getPedestal(ix,iy)<< endl; */
|
/* cout <<" " << getPedestal(ix,iy)<< endl; */
|
||||||
/* if (ix==100 && iy==100) */
|
/* if (ix==100 && iy==100) */
|
||||||
@ -818,15 +849,17 @@ template <class dataType> class analogDetector {
|
|||||||
|
|
||||||
virtual int *subtractPedestal(char *data, int *val=NULL, int cm=0) {
|
virtual int *subtractPedestal(char *data, int *val=NULL, int cm=0) {
|
||||||
|
|
||||||
newFrame();
|
newFrame(data);
|
||||||
|
|
||||||
if (val==NULL)
|
if (val==NULL)
|
||||||
val=image;//new double[nx*ny];
|
val=image;//new double[nx*ny];
|
||||||
|
|
||||||
for (int iy=ymin; iy<ymax; iy++) {
|
//calcGhost(data);
|
||||||
for (int ix=xmin; ix<xmax; ix++) {
|
|
||||||
if (det->isGood(ix,iy))
|
for (int iy=ymin; iy<ymax; iy++) {
|
||||||
val[iy*nx+ix]+=subtractPedestal(data, ix, iy,cm);
|
for (int ix=xmin; ix<xmax; ix++) {
|
||||||
|
if (det->isGood(ix,iy))
|
||||||
|
val[iy*nx+ix]+=subtractPedestal(data, ix, iy,cm);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
@ -861,6 +894,8 @@ template <class dataType> class analogDetector {
|
|||||||
} else
|
} else
|
||||||
val= (((double*)data)[iy*nx+ix]-getPedestal(ix,iy))/g;
|
val= (((double*)data)[iy*nx+ix]-getPedestal(ix,iy))/g;
|
||||||
|
|
||||||
|
val+=getGhost(ix,iy)/g;
|
||||||
|
|
||||||
#ifdef ROOTSPECTRUM
|
#ifdef ROOTSPECTRUM
|
||||||
hs->Fill(val,(iy-ymin)*(xmax-xmin)+(ix-xmin));
|
hs->Fill(val,(iy-ymin)*(xmax-xmin)+(ix-xmin));
|
||||||
#ifdef ROOTCLUST
|
#ifdef ROOTCLUST
|
||||||
@ -949,10 +984,10 @@ template <class dataType> class analogDetector {
|
|||||||
double val;
|
double val;
|
||||||
if (nph==NULL)
|
if (nph==NULL)
|
||||||
nph=image;
|
nph=image;
|
||||||
newFrame();
|
newFrame(data);
|
||||||
|
|
||||||
|
//calcGhost(data);
|
||||||
addToCommonMode(data);
|
addToCommonMode(data);
|
||||||
|
|
||||||
for (int iy=ymin; iy<ymax; iy++) {
|
for (int iy=ymin; iy<ymax; iy++) {
|
||||||
for (int ix=xmin; ix<xmax; ix++) {
|
for (int ix=xmin; ix<xmax; ix++) {
|
||||||
if (det->isGood(ix,iy))
|
if (det->isGood(ix,iy))
|
||||||
@ -1032,13 +1067,16 @@ template <class dataType> class analogDetector {
|
|||||||
if (ymi<0) ymi=ymin;
|
if (ymi<0) ymi=ymin;
|
||||||
if (yma<0) yma=ymax;
|
if (yma<0) yma=ymax;
|
||||||
|
|
||||||
for (int iy=ymi; iy<yma; iy++)
|
newFrame(data);
|
||||||
for (int ix=xmi; ix<xma; ix++)
|
//calcGhost(data);
|
||||||
|
addToCommonMode(data);
|
||||||
|
for (int iy=ymi; iy<yma; iy++)
|
||||||
|
for (int ix=xmi; ix<xma; ix++)
|
||||||
if (det->isGood(ix,iy)) {
|
if (det->isGood(ix,iy)) {
|
||||||
if (ix>=0 && ix<nx && iy>=0 && iy<ny)
|
if (ix>=0 && ix<nx && iy>=0 && iy<ny)
|
||||||
val+=getNPhotons(data, ix, iy);
|
val+=getNPhotons(data, ix, iy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -1140,6 +1178,7 @@ FILE *getFilePointer(){return myFile;};
|
|||||||
int dataSign; /**< sign of the data i.e. 1 if photon is positive, -1 if negative */
|
int dataSign; /**< sign of the data i.e. 1 if photon is positive, -1 if negative */
|
||||||
int iframe; /**< frame number (not from file but incremented within the dataset every time newFrame is called */
|
int iframe; /**< frame number (not from file but incremented within the dataset every time newFrame is called */
|
||||||
double *gmap;
|
double *gmap;
|
||||||
|
ghostSummation<dataType> *ghSum;/**< ghostSummation class */
|
||||||
int *image;
|
int *image;
|
||||||
int id;
|
int id;
|
||||||
//int xmin, xmax, ymin, ymax; int xmin; /**< minimum x of the region of interest */
|
//int xmin, xmax, ymin, ymax; int xmin; /**< minimum x of the region of interest */
|
||||||
|
@ -23,6 +23,13 @@ class commonModeSubtraction {
|
|||||||
/** destructor - deletes the moving average(s) and the sum of pedestals calculator(s) */
|
/** destructor - deletes the moving average(s) and the sum of pedestals calculator(s) */
|
||||||
virtual ~commonModeSubtraction() {delete [] mean; delete [] mean2; delete [] nCm;};
|
virtual ~commonModeSubtraction() {delete [] mean; delete [] mean2; delete [] nCm;};
|
||||||
|
|
||||||
|
/* commonModeSubtraction(commonModeSubtraction *cs) { */
|
||||||
|
/* if (cs) new commonModeSubtraction(cs->getNRoi(), cs->nsigma); */
|
||||||
|
/* } */
|
||||||
|
|
||||||
|
virtual commonModeSubtraction *Clone() {
|
||||||
|
new commonModeSubtraction(this->nROI, this->nsigma);
|
||||||
|
}
|
||||||
|
|
||||||
/** clears the moving average and the sum of pedestals calculation - virtual func*/
|
/** clears the moving average and the sum of pedestals calculation - virtual func*/
|
||||||
virtual void Clear(){
|
virtual void Clear(){
|
||||||
@ -52,7 +59,9 @@ class commonModeSubtraction {
|
|||||||
// if (iroi==0) val=100;
|
// if (iroi==0) val=100;
|
||||||
// else val=-100;
|
// else val=-100;
|
||||||
// if (isc>=0 && isc<nROI) {
|
// if (isc>=0 && isc<nROI) {
|
||||||
|
// cout << ix << " " << iy << " " << iroi << endl;
|
||||||
if (iroi>=0 && iroi<nROI) {
|
if (iroi>=0 && iroi<nROI) {
|
||||||
|
// cout << ix << " " << iy << " " << iroi << endl;
|
||||||
mean[iroi]+=val;
|
mean[iroi]+=val;
|
||||||
mean2[iroi]+=val*val;
|
mean2[iroi]+=val*val;
|
||||||
nCm[iroi]++;
|
nCm[iroi]++;
|
||||||
@ -70,9 +79,9 @@ class commonModeSubtraction {
|
|||||||
/* return 100; */
|
/* return 100; */
|
||||||
/* else */
|
/* else */
|
||||||
/* return -100; */
|
/* return -100; */
|
||||||
|
// cout << "*" << ix << " " << iy << " " << iroi << " " << mean[iroi] << " " << nCm[iroi]<< endl;
|
||||||
if (iroi>=0 && iroi<nROI) {
|
if (iroi>=0 && iroi<nROI) {
|
||||||
if (nCm[iroi]>0)
|
if (nCm[iroi]>0)
|
||||||
return mean[iroi]/nCm[iroi];
|
return mean[iroi]/nCm[iroi];
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -96,8 +105,7 @@ class commonModeSubtraction {
|
|||||||
gets the common mode ROI for pixel ix, iy -should be overloaded!
|
gets the common mode ROI for pixel ix, iy -should be overloaded!
|
||||||
*/
|
*/
|
||||||
virtual int getROI(int ix, int iy){ (void) ix; (void) iy; return 0;};
|
virtual int getROI(int ix, int iy){ (void) ix; (void) iy; return 0;};
|
||||||
|
int getNRoi(){return nROI;};
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double *mean; /**<array of moving average of the pedestal average per region of interest */
|
double *mean; /**<array of moving average of the pedestal average per region of interest */
|
||||||
|
@ -67,11 +67,11 @@ class deserializer : public slsDetectorData<int> {
|
|||||||
}
|
}
|
||||||
wp=(int64_t*)ptr;
|
wp=(int64_t*)ptr;
|
||||||
|
|
||||||
for (iw=0; iw<nch*dr/nb; iw) {
|
for (iw=0; iw<nch/nb; iw) {
|
||||||
word=*wp;;
|
word=*wp;;
|
||||||
if (ioff<off) {
|
if (ioff<off) {
|
||||||
ioff++;
|
ioff++;
|
||||||
cout <<"*";
|
// cout <<"*";
|
||||||
} else {
|
} else {
|
||||||
//if (idr<16) {
|
//if (idr<16) {
|
||||||
ib=0;
|
ib=0;
|
||||||
|
@ -52,6 +52,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
int sc_height;
|
int sc_height;
|
||||||
const int nSamples;
|
const int nSamples;
|
||||||
|
|
||||||
|
double ghost[200][25];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -64,7 +65,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
\param c crosstalk parameter for the output buffer
|
\param c crosstalk parameter for the output buffer
|
||||||
|
|
||||||
*/
|
*/
|
||||||
moench03T1ReceiverDataNew(int ns=5000): slsDetectorData<uint16_t>(400, 400, ns*2*32+sizeof(sls_detector_header)), nSamples(ns) {
|
moench03T1ReceiverDataNew(int ns=5000): slsDetectorData<uint16_t>(400, 400, ns*2*32+sizeof(sls_detector_header)), nSamples(ns) {
|
||||||
|
|
||||||
int nadc=32;
|
int nadc=32;
|
||||||
int sc_width=25;
|
int sc_width=25;
|
||||||
@ -106,6 +107,11 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// double ghost[200][25];
|
||||||
|
|
||||||
|
for (int ix=0; ix<25; ix++)
|
||||||
|
for (int iy=0; iy<200; iy++)
|
||||||
|
ghost[iy][ix]=0.;
|
||||||
|
|
||||||
int ipacket;
|
int ipacket;
|
||||||
int ibyte;
|
int ibyte;
|
||||||
@ -142,6 +148,73 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the value of the selected channel for the given dataset as double.
|
||||||
|
\param data pointer to the dataset (including headers etc)
|
||||||
|
\param ix pixel number in the x direction
|
||||||
|
\param iy pixel number in the y direction
|
||||||
|
\returns data for the selected channel, with inversion if required as double
|
||||||
|
|
||||||
|
*/
|
||||||
|
virtual double getValue(char *data, int ix, int iy=0) {
|
||||||
|
/* cout << " x "<< ix << " y"<< iy << " val " << getChannel(data, ix, iy)<< endl;*/
|
||||||
|
/* double val=0, vout=getChannel(data, ix, iy); */
|
||||||
|
/* int x1=ix%25; */
|
||||||
|
/* for (int ix=0; ix<16; ix++) { */
|
||||||
|
/* for (int ii=0; ii<2; ii++) { */
|
||||||
|
/* val+=getChannel(data,x1+25*ix,iy); */
|
||||||
|
/* val+=getChannel(data,x1+25*ix,399-iy); */
|
||||||
|
/* } */
|
||||||
|
/* } */
|
||||||
|
/* vout+=0.0008*val-6224; */
|
||||||
|
/* return vout; //(double)getChannel(data, ix, iy);
|
||||||
|
*/
|
||||||
|
uint16_t val=getChannel(data, ix, iy)&0x3fff;
|
||||||
|
return val;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data, int ix, int iy) {
|
||||||
|
double val=0;
|
||||||
|
/* for (int ix=0; ix<25; ix++){ */
|
||||||
|
/* for (int iy=0; iy<200; iy++) { */
|
||||||
|
val=0;
|
||||||
|
// cout << "** ";
|
||||||
|
for (int isc=0; isc<16; isc++) {
|
||||||
|
// for (int ii=0; ii<2; ii++) {
|
||||||
|
val+=getChannel(data,ix+25*isc,iy);
|
||||||
|
// cout << "(" << isc << "," << val << " " ;
|
||||||
|
val+=getChannel(data,ix+25*isc,399-iy);
|
||||||
|
// cout << val << " " ;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
ghost[iy][ix]=val;//-6224;
|
||||||
|
// cout << " --"<< endl;
|
||||||
|
/* } */
|
||||||
|
/* } */
|
||||||
|
// cout << "*" << endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data) {
|
||||||
|
for (int ix=0; ix<25; ix++){
|
||||||
|
for (int iy=0; iy<200; iy++) {
|
||||||
|
calcGhost(data, ix,iy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// cout << "*" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double getGhost(int ix, int iy) {
|
||||||
|
if (iy<200) return ghost[iy][ix%25];
|
||||||
|
if (iy<400) return ghost[399-iy][ix%25];
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@ -278,8 +351,6 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
//int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,9 @@ class moench03T1ZmqDataNew : public slsDetectorData<uint16_t> {
|
|||||||
const int nSamples;
|
const int nSamples;
|
||||||
const int offset;
|
const int offset;
|
||||||
|
|
||||||
|
double ghost[200][25];
|
||||||
|
double xtalk;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
@ -25,7 +28,7 @@ class moench03T1ZmqDataNew : public slsDetectorData<uint16_t> {
|
|||||||
\param c crosstalk parameter for the output buffer
|
\param c crosstalk parameter for the output buffer
|
||||||
|
|
||||||
*/
|
*/
|
||||||
moench03T1ZmqDataNew(int ns=5000): slsDetectorData<uint16_t>(400, 400, ns*32*2+sizeof(int)), nSamples(ns), offset(sizeof(int)) {
|
moench03T1ZmqDataNew(int ns=5000): slsDetectorData<uint16_t>(400, 400, ns*32*2+sizeof(int)), nSamples(ns), offset(sizeof(int)), xtalk(0.00021) {
|
||||||
|
|
||||||
int nadc=32;
|
int nadc=32;
|
||||||
int sc_width=25;
|
int sc_width=25;
|
||||||
@ -100,12 +103,84 @@ class moench03T1ZmqDataNew : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (int ix=0; ix<25; ix++)
|
||||||
|
for (int iy=0; iy<200; iy++)
|
||||||
|
ghost[iy][ix]=0.;
|
||||||
|
|
||||||
|
|
||||||
// iframe=0;
|
// iframe=0;
|
||||||
// cout << "data struct created" << endl;
|
// cout << "data struct created" << endl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
double getXTalk(){return xtalk;};
|
||||||
|
void setXTalk(double g) {xtalk=g;};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the value of the selected channel for the given dataset as double.
|
||||||
|
\param data pointer to the dataset (including headers etc)
|
||||||
|
\param ix pixel number in the x direction
|
||||||
|
\param iy pixel number in the y direction
|
||||||
|
\returns data for the selected channel, with inversion if required as double
|
||||||
|
|
||||||
|
*/
|
||||||
|
virtual double getValue(char *data, int ix, int iy=0) {
|
||||||
|
/* cout << " x "<< ix << " y"<< iy << " val " << getChannel(data, ix, iy)<< endl;*/
|
||||||
|
/* double val=0, vout=getChannel(data, ix, iy); */
|
||||||
|
/* int x1=ix%25; */
|
||||||
|
/* for (int ix=0; ix<16; ix++) { */
|
||||||
|
/* for (int ii=0; ii<2; ii++) { */
|
||||||
|
/* val+=getChannel(data,x1+25*ix,iy); */
|
||||||
|
/* val+=getChannel(data,x1+25*ix,399-iy); */
|
||||||
|
/* } */
|
||||||
|
/* } */
|
||||||
|
/* vout+=0.0008*val-6224; */
|
||||||
|
/* return vout; //(double)getChannel(data, ix, iy);
|
||||||
|
*/
|
||||||
|
return ((double)getChannel(data, ix, iy))+xtalk*getGhost(iy,iy);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data, int ix, int iy) {
|
||||||
|
double val=0;
|
||||||
|
/* for (int ix=0; ix<25; ix++){ */
|
||||||
|
/* for (int iy=0; iy<200; iy++) { */
|
||||||
|
val=0;
|
||||||
|
for (int isc=0; isc<16; isc++) {
|
||||||
|
for (int ii=0; ii<2; ii++) {
|
||||||
|
val+=getChannel(data,ix+25*isc,iy);
|
||||||
|
// cout << val << " " ;
|
||||||
|
val+=getChannel(data,ix+25*isc,399-iy);
|
||||||
|
// cout << val << " " ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ghost[iy][ix]=val;//-6224;
|
||||||
|
// cout << endl;
|
||||||
|
/* } */
|
||||||
|
/* } */
|
||||||
|
// cout << "*" << endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data) {
|
||||||
|
for (int ix=0; ix<25; ix++){
|
||||||
|
for (int iy=0; iy<200; iy++) {
|
||||||
|
calcGhost(data, ix,iy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// cout << "*" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double getGhost(int ix, int iy) {
|
||||||
|
if (iy<200) return ghost[iy][ix%25];
|
||||||
|
if (iy<400) return ghost[399-iy][ix%25];
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
|
61
slsDetectorCalibration/ghostSummation.h
Normal file
61
slsDetectorCalibration/ghostSummation.h
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
#ifndef GHOSTSUMMATION_H
|
||||||
|
#define GHOSTSUMMATION_H
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
#include "slsDetectorData.h"
|
||||||
|
|
||||||
|
template <class dataType> class ghostSummation {
|
||||||
|
|
||||||
|
/** @short virtual calss to handle ghosting*/
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** constructor
|
||||||
|
\param xt crosstalk
|
||||||
|
*/
|
||||||
|
ghostSummation(slsDetectorData<dataType> *d, double xt) : xtalk(xt),det(d) {
|
||||||
|
if (det)
|
||||||
|
det->getDetectorSize(nx,ny);
|
||||||
|
ghost=new double[nx*ny];
|
||||||
|
};
|
||||||
|
|
||||||
|
ghostSummation(ghostSummation *orig) {
|
||||||
|
xtalk=orig->xtalk;
|
||||||
|
det=orig->det;
|
||||||
|
ghost=new double[nx*ny];
|
||||||
|
|
||||||
|
}
|
||||||
|
~ghostSummation() {delete [] ghost;};
|
||||||
|
|
||||||
|
virtual ghostSummation *Clone() {
|
||||||
|
new ghostSummation(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
double getXTalk(){return xtalk;};
|
||||||
|
void setXTalk(double g) {xtalk=g;};
|
||||||
|
|
||||||
|
virtual double calcGhost(char *data, int ix, int iy=1){ghost[iy*nx+ix]=0;};
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data){
|
||||||
|
for (int iy=0; iy<ny; iy++)
|
||||||
|
for (int ix=0; ix<nx; ix++)
|
||||||
|
ghost[iy*nx+ix]=calcGhost(data, ix, iy);
|
||||||
|
}
|
||||||
|
virtual double getGhost(int ix, int iy) {
|
||||||
|
if (ix<0 || ix>=nx || iy<0 || iy>=ny) return 0;
|
||||||
|
return ghost[iy*nx+ix];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
double xtalk;
|
||||||
|
slsDetectorData<dataType> *det;
|
||||||
|
double *ghost;
|
||||||
|
int nx, ny;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -46,8 +46,8 @@ class interpolatingDetector : public singlePhotonDetector {
|
|||||||
int sign=1,
|
int sign=1,
|
||||||
commonModeSubtraction *cm=NULL,
|
commonModeSubtraction *cm=NULL,
|
||||||
int nped=1000,
|
int nped=1000,
|
||||||
int nd=100, int nnx=-1, int nny=-1) :
|
int nd=100, int nnx=-1, int nny=-1, double *gm=NULL, ghostSummation<uint16_t> *gs=NULL) :
|
||||||
singlePhotonDetector(d, 3,nsigma,sign, cm, nped, nd, nnx, nny) , interp(inte), id(0) {
|
singlePhotonDetector(d, 3,nsigma,sign, cm, nped, nd, nnx, nny, gm, gs) , interp(inte), id(0) {
|
||||||
//cout << "**"<< xmin << " " << xmax << " " << ymin << " " << ymax << endl;
|
//cout << "**"<< xmin << " " << xmax << " " << ymin << " " << ymax << endl;
|
||||||
fi=new pthread_mutex_t ;
|
fi=new pthread_mutex_t ;
|
||||||
|
|
||||||
|
@ -1,43 +1,52 @@
|
|||||||
#ifndef MOENCH03COMMONMODE_H
|
#ifndef MOENCH03COMMONMODE_H
|
||||||
#define MOENCH03COMMONMODE_H
|
#define MOENCH03COMMONMODE_H
|
||||||
|
|
||||||
#include "commonModeSubtraction.h"
|
#include "commonModeSubtractionNew.h"
|
||||||
|
|
||||||
class moench03CommonMode : public commonModeSubtraction {
|
class commonModeSubtractionColumn: public commonModeSubtraction{
|
||||||
|
public:
|
||||||
|
commonModeSubtractionColumn(int nr=200) : commonModeSubtraction(800), rows(nr) {};
|
||||||
|
virtual int getROI(int ix, int iy){return ix+(iy/200)*400;};
|
||||||
|
|
||||||
|
virtual void addToCommonMode(double val, int ix=0, int iy=0) {
|
||||||
|
if (ix<rows || ix>399-rows) {
|
||||||
|
int iroi=getROI(ix,iy);
|
||||||
|
if (iroi>=0 && iroi<nROI) {
|
||||||
|
mean[iroi]+=val;
|
||||||
|
mean2[iroi]+=val*val;
|
||||||
|
nCm[iroi]++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
int rows;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class commonModeSubtractionSuperColumn: public commonModeSubtraction{
|
||||||
|
public:
|
||||||
|
commonModeSubtractionSuperColumn() : commonModeSubtraction(32) {};
|
||||||
|
virtual int getROI(int ix, int iy){ return ix/25+(iy/200)*16;};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class commonModeSubtractionHalf: public commonModeSubtraction{
|
||||||
|
public:
|
||||||
|
commonModeSubtractionHalf() : commonModeSubtraction(2) {};
|
||||||
|
virtual int getROI(int ix, int iy){ (void) ix; return iy/200;};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class moench03CommonMode : public commonModeSubtractionColumn {
|
||||||
/** @short class to calculate the common mode noise for moench02 i.e. on 4 supercolumns separately */
|
/** @short class to calculate the common mode noise for moench02 i.e. on 4 supercolumns separately */
|
||||||
public:
|
public:
|
||||||
/** constructor - initalizes a commonModeSubtraction with 4 different regions of interest
|
/** constructor - initalizes a commonModeSubtraction with 4 different regions of interest
|
||||||
\param nn number of samples for the moving average
|
\param nn number of samples for the moving average
|
||||||
*/
|
*/
|
||||||
moench03CommonMode(int nn=1000) : commonModeSubtraction(nn,32){} ;
|
moench03CommonMode(int nr=20) : commonModeSubtractionColumn(nr){} ;
|
||||||
|
|
||||||
|
|
||||||
/** add value to common mode as a function of the pixel value, subdividing the region of interest in the 4 supercolumns of 40 columns each;
|
|
||||||
\param val value to add to the common mode
|
|
||||||
\param ix pixel coordinate in the x direction
|
|
||||||
\param iy pixel coordinate in the y direction
|
|
||||||
*/
|
|
||||||
virtual void addToCommonMode(double val, int ix=0, int iy=0) {
|
|
||||||
// (void) iy;
|
|
||||||
int isc=ix/25+(iy/200)*16;
|
|
||||||
if (isc>=0 && isc<nROI) {
|
|
||||||
cmPed[isc]+=val;
|
|
||||||
nCm[isc]++;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**returns common mode value as a function of the pixel value, subdividing the region of interest in the 4 supercolumns of 40 columns each;
|
|
||||||
\param ix pixel coordinate in the x direction
|
|
||||||
\param iy pixel coordinate in the y direction
|
|
||||||
\returns common mode value
|
|
||||||
*/
|
|
||||||
virtual double getCommonMode(int ix=0, int iy=0) {
|
|
||||||
(void) iy;
|
|
||||||
int isc=ix/25+(iy/200)*16;
|
|
||||||
if (isc>=0 && isc<nROI) {
|
|
||||||
if (nCm[isc]>0) return cmPed[isc]/nCm[isc]-cmStat[isc].Mean();
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
57
slsDetectorCalibration/moench03GhostSummation.h
Normal file
57
slsDetectorCalibration/moench03GhostSummation.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#ifndef MOENCH03GHOSTSUMMATION_H
|
||||||
|
#define MOENCH03GHOSTSUMMATION_H
|
||||||
|
|
||||||
|
#include "ghostSummation.h"
|
||||||
|
|
||||||
|
class moench03GhostSummation : public ghostSummation<uint16_t> {
|
||||||
|
|
||||||
|
/** @short virtual calss to handle ghosting*/
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
/** constructor
|
||||||
|
\param xt crosstalk
|
||||||
|
*/
|
||||||
|
moench03GhostSummation(slsDetectorData<uint16_t> *d, double xt=0.0004) : ghostSummation<uint16_t>(d, xt) {}
|
||||||
|
|
||||||
|
virtual void calcGhost(char *data){
|
||||||
|
for (int iy=0; iy<200; iy++){
|
||||||
|
for (int ix=0; ix<25; ix++){
|
||||||
|
calcGhost(data,ix,iy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
virtual double calcGhost(char *data, int x, int y=0){
|
||||||
|
int ix=x%25;
|
||||||
|
int iy=y;
|
||||||
|
if (y>=200) iy=399-y;
|
||||||
|
if (iy<0 || ix<0) return 0;
|
||||||
|
double val=0;
|
||||||
|
val=0;
|
||||||
|
for (int isc=0; isc<16; isc++) {
|
||||||
|
val+=det->getChannel(data,ix+25*isc,iy);
|
||||||
|
// cout << val << " " ;
|
||||||
|
val+=det->getChannel(data,ix+25*isc,399-iy);
|
||||||
|
// cout << val << " " ;
|
||||||
|
}
|
||||||
|
ghost[iy*nx+ix]=xtalk*val;
|
||||||
|
return ghost[iy*nx+ix];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
virtual double getGhost(int ix, int iy) {
|
||||||
|
if (iy >=0 && iy<200) return ghost[iy*nx+(ix%25)];
|
||||||
|
if (iy<400) return ghost[(399-iy)*nx+(ix%25)];
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -1,6 +1,6 @@
|
|||||||
//#include "ansi.h"
|
//#include "ansi.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#define CORR
|
||||||
|
|
||||||
//#define VERSION_V1
|
//#define VERSION_V1
|
||||||
|
|
||||||
@ -28,8 +28,11 @@
|
|||||||
//#include "etaInterpolationPosXY.h"
|
//#include "etaInterpolationPosXY.h"
|
||||||
// #include "linearInterpolation.h"
|
// #include "linearInterpolation.h"
|
||||||
// #include "noInterpolation.h"
|
// #include "noInterpolation.h"
|
||||||
#include "multiThreadedAnalogDetector.h"
|
#include "multiThreadedCountingDetector.h"
|
||||||
|
//#include "multiThreadedAnalogDetector.h"
|
||||||
#include "singlePhotonDetector.h"
|
#include "singlePhotonDetector.h"
|
||||||
|
#include "moench03GhostSummation.h"
|
||||||
|
#include "moench03CommonMode.h"
|
||||||
//#include "interpolatingDetector.h"
|
//#include "interpolatingDetector.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -89,7 +92,18 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
decoder->getDetectorSize(nx,ny);
|
decoder->getDetectorSize(nx,ny);
|
||||||
|
|
||||||
singlePhotonDetector *filter=new singlePhotonDetector(decoder,csize, nsigma, 1, 0, nped, 200);
|
int ncol_cm=20;
|
||||||
|
double xt_ghost=0.0004;
|
||||||
|
moench03CommonMode *cm=NULL;
|
||||||
|
moench03GhostSummation *gs;
|
||||||
|
double *gainmap=NULL;
|
||||||
|
#ifdef CORR
|
||||||
|
cout << "Applying common mode and ghost correction " << endl;
|
||||||
|
cm=new moench03CommonMode(ncol_cm);
|
||||||
|
gs=new moench03GhostSummation(decoder, xt_ghost);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
singlePhotonDetector *filter=new singlePhotonDetector(decoder,csize, nsigma, 1, cm, nped, 200, -1, -1, gainmap, gs);
|
||||||
|
|
||||||
int size = 327680;////atoi(argv[3]);
|
int size = 327680;////atoi(argv[3]);
|
||||||
|
|
||||||
@ -171,9 +185,10 @@ int main(int argc, char *argv[]) {
|
|||||||
if (thr>0) {
|
if (thr>0) {
|
||||||
cout << "threshold is " << thr << endl;
|
cout << "threshold is " << thr << endl;
|
||||||
|
|
||||||
//#ifndef ANALOG
|
#ifndef ANALOG
|
||||||
filter->setThreshold(thr);
|
filter->setThreshold(thr);
|
||||||
//#endif
|
#endif
|
||||||
|
cf=0;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
cf=1;
|
cf=1;
|
||||||
@ -181,17 +196,13 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
|
|
||||||
filter->setROI(xmin,xmax,ymin,ymax);
|
filter->setROI(xmin,xmax,ymin,ymax);
|
||||||
#ifdef SOLEIL
|
|
||||||
filter->setROI(150,210,170,230);
|
|
||||||
nframes=-1;
|
|
||||||
#endif
|
|
||||||
std::time(&end_time);
|
std::time(&end_time);
|
||||||
cout << std::ctime(&end_time) << endl;
|
cout << std::ctime(&end_time) << endl;
|
||||||
|
|
||||||
char* buff;
|
char* buff;
|
||||||
|
|
||||||
multiThreadedAnalogDetector *mt=new multiThreadedAnalogDetector(filter,nthreads,fifosize);
|
// multiThreadedAnalogDetector *mt=new multiThreadedAnalogDetector(filter,nthreads,fifosize);
|
||||||
|
multiThreadedCountingDetector *mt=new multiThreadedCountingDetector(filter,nthreads,fifosize);
|
||||||
#ifndef ANALOG
|
#ifndef ANALOG
|
||||||
mt->setDetectorMode(ePhotonCounting);
|
mt->setDetectorMode(ePhotonCounting);
|
||||||
cout << "Counting!" << endl;
|
cout << "Counting!" << endl;
|
||||||
@ -204,7 +215,7 @@ int main(int argc, char *argv[]) {
|
|||||||
mt->setDetectorMode(eAnalog);
|
mt->setDetectorMode(eAnalog);
|
||||||
cout << "Analog!" << endl;
|
cout << "Analog!" << endl;
|
||||||
cf=0;
|
cf=0;
|
||||||
// thr1=thr;
|
thr1=thr;
|
||||||
#endif
|
#endif
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -240,7 +251,7 @@ int main(int argc, char *argv[]) {
|
|||||||
mt->nextThread();
|
mt->nextThread();
|
||||||
mt->popFree(buff);
|
mt->popFree(buff);
|
||||||
ifr++;
|
ifr++;
|
||||||
if (ifr%10000==0)
|
if (ifr%100==0)
|
||||||
cout << ifr << " " << ff << " " << np << endl;
|
cout << ifr << " " << ff << " " << np << endl;
|
||||||
} else
|
} else
|
||||||
cout << ifr << " " << ff << " " << np << endl;
|
cout << ifr << " " << ff << " " << np << endl;
|
||||||
@ -308,7 +319,7 @@ int main(int argc, char *argv[]) {
|
|||||||
// // // cout << " " << (void*)buff;
|
// // // cout << " " << (void*)buff;
|
||||||
mt->popFree(buff);
|
mt->popFree(buff);
|
||||||
ifr++;
|
ifr++;
|
||||||
if (ifr%1000==0) cout << ifr << " " << ff << endl;
|
if (ifr%100==0) cout << ifr << " " << ff << endl;
|
||||||
if (nframes>0) {
|
if (nframes>0) {
|
||||||
if (ifr%nframes==0) {
|
if (ifr%nframes==0) {
|
||||||
//The name has an additional "_fXXXXX" at the end, where "XXXXX" is the initial frame number of the image (0,1000,2000...)
|
//The name has an additional "_fXXXXX" at the end, where "XXXXX" is the initial frame number of the image (0,1000,2000...)
|
||||||
@ -334,9 +345,10 @@ int main(int argc, char *argv[]) {
|
|||||||
if (nframes>0) {
|
if (nframes>0) {
|
||||||
sprintf(ffname,"%s/%s_f%05d.tiff",outdir,fformat,ifile);
|
sprintf(ffname,"%s/%s_f%05d.tiff",outdir,fformat,ifile);
|
||||||
sprintf(imgfname,ffname,irun);
|
sprintf(imgfname,ffname,irun);
|
||||||
|
} else {
|
||||||
|
sprintf(ffname,"%s/%s.tiff",outdir,fformat);
|
||||||
|
sprintf(imgfname,ffname,irun);
|
||||||
}
|
}
|
||||||
sprintf(ffname,"%s/%s.tiff",outdir,fformat);
|
|
||||||
sprintf(imgfname,ffname,irun);
|
|
||||||
cout << "Writing tiff to " << imgfname << " " << thr1 <<endl;
|
cout << "Writing tiff to " << imgfname << " " << thr1 <<endl;
|
||||||
mt->writeImage(imgfname, thr1);
|
mt->writeImage(imgfname, thr1);
|
||||||
mt->clearImage();
|
mt->clearImage();
|
||||||
@ -351,6 +363,13 @@ int main(int argc, char *argv[]) {
|
|||||||
} else
|
} else
|
||||||
cout << "Could not open "<< fname << " for reading " << endl;
|
cout << "Could not open "<< fname << " for reading " << endl;
|
||||||
}
|
}
|
||||||
|
if (nframes<0){
|
||||||
|
sprintf(ffname,"%s/%s.tiff",outdir,fformat);
|
||||||
|
strcpy(imgfname,ffname);
|
||||||
|
cout << "Writing tiff to " << imgfname << " " << thr1 <<endl;
|
||||||
|
mt->writeImage(imgfname, thr1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3,13 +3,15 @@
|
|||||||
#include "sls_detector_defs.h"
|
#include "sls_detector_defs.h"
|
||||||
#include "ZmqSocket.h"
|
#include "ZmqSocket.h"
|
||||||
#include "moench03T1ZmqDataNew.h"
|
#include "moench03T1ZmqDataNew.h"
|
||||||
|
#include "moench03GhostSummation.h"
|
||||||
|
#include "moench03CommonMode.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "tiffIO.h"
|
#include "tiffIO.h"
|
||||||
//#include <zmq.h>
|
|
||||||
#include <rapidjson/document.h> //json header in zmq stream
|
#include <rapidjson/document.h> //json header in zmq stream
|
||||||
|
|
||||||
#include<iostream>
|
#include<iostream>
|
||||||
@ -110,12 +112,16 @@ int main(int argc, char *argv[]) {
|
|||||||
int dataSize=size;
|
int dataSize=size;
|
||||||
|
|
||||||
char dummybuff[size];
|
char dummybuff[size];
|
||||||
|
|
||||||
|
int ncol_cm=20;
|
||||||
|
double xt_ghost=0.00045;
|
||||||
|
moench03CommonMode *cm=new moench03CommonMode(ncol_cm);
|
||||||
|
moench03GhostSummation *gs=new moench03GhostSummation(det, xt_ghost);
|
||||||
|
double *gainmap=NULL;
|
||||||
|
|
||||||
//analogDetector<uint16_t> *filter=new analogDetector<uint16_t>(det,1,NULL,1000);
|
//analogDetector<uint16_t> *filter=new analogDetector<uint16_t>(det,1,NULL,1000);
|
||||||
#ifndef INTERP
|
#ifndef INTERP
|
||||||
singlePhotonDetector *filter=new singlePhotonDetector(det,3, 5, 1, 0, 1000, 10);
|
singlePhotonDetector *filter=new singlePhotonDetector(det,3, 5, 1, cm, 1000, 10, -1, -1, gainmap, gs);
|
||||||
|
|
||||||
multiThreadedCountingDetector *mt=new multiThreadedCountingDetector(filter,nthreads,fifosize);
|
multiThreadedCountingDetector *mt=new multiThreadedCountingDetector(filter,nthreads,fifosize);
|
||||||
|
|
||||||
@ -126,7 +132,7 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
if (etafname) interp->readFlatField(etafname);
|
if (etafname) interp->readFlatField(etafname);
|
||||||
|
|
||||||
interpolatingDetector *filter=new interpolatingDetector(det,interp, 5, 1, 0, 1000, 10);
|
interpolatingDetector *filter=new interpolatingDetector(det,interp, 5, 1, cm, 1000, 10, -1, -1, gainmap, gs);
|
||||||
multiThreadedInterpolatingDetector *mt=new multiThreadedInterpolatingDetector(filter,nthreads,fifosize);
|
multiThreadedInterpolatingDetector *mt=new multiThreadedInterpolatingDetector(filter,nthreads,fifosize);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -392,17 +398,20 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//// int SendHeaderData ( int index, bool dummy, uint32_t jsonversion, uint32_t dynamicrange = 0, uint64_t fileIndex = 0,
|
||||||
|
// uint32_t ndetx = 0, uint32_t ndety = 0, uint32_t npixelsx = 0, uint32_t npixelsy = 0, uint32_t imageSize = 0,
|
||||||
|
// uint64_t acqIndex = 0, uint64_t fIndex = 0, const char* fname = NULL,
|
||||||
|
// uint64_t frameNumber = 0, uint32_t expLength = 0, uint32_t packetNumber = 0,
|
||||||
|
// uint64_t bunchId = 0, uint64_t timestamp = 0,
|
||||||
|
// uint16_t modId = 0, uint16_t row = 0, uint16_t column = 0, uint16_t reserved = 0,
|
||||||
|
// uint32_t debug = 0, uint16_t roundRNumber = 0,
|
||||||
|
// uint8_t detType = 0, uint8_t version = 0, int gapPixelsEnable = 0, int flippedDataX = 0,
|
||||||
|
// char* additionalJsonHeader = 0) {
|
||||||
|
|
||||||
#ifdef NEWZMQ
|
|
||||||
cout << "Sending image size " << nnx << " " << nny << endl;
|
|
||||||
zmqsocket2->SendHeaderData (0, false, SLS_DETECTOR_JSON_HEADER_VERSION, dr, fileindex, nnx, nny, nnx*nny*dr/8,acqIndex, frameIndex, fname, acqIndex, subFrameIndex, packetNumber,bunchId, timestamp, modId, xCoord, yCoord, zCoord,debug, roundRNumber, detType, version, flippedData, additionalJsonHeader);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef NEWZMQ
|
// cout << "Sending image size " << nnx << " " << nny << endl;
|
||||||
zmqsocket2->SendHeaderData(0, false, SLS_DETECTOR_JSON_HEADER_VERSION,0,0,0,0,0, 0,0,fname, 0, 0,0,0,0,0,0,0,0,0,0,0,1);
|
zmqsocket2->SendHeaderData (0, false, SLS_DETECTOR_JSON_HEADER_VERSION, dr, fileindex, 0,0, nnx, nny, nnx*nny*dr/8,acqIndex, frameIndex, fname, acqIndex,0 , packetNumber,bunchId, timestamp, modId, xCoord, yCoord, zCoord,debug, roundRNumber, detType, version, 0,0, additionalJsonHeader);
|
||||||
#endif
|
|
||||||
|
|
||||||
zmqsocket2->SendData((char*)dout,nnx*nny*dr/8);
|
zmqsocket2->SendData((char*)dout,nnx*nny*dr/8);
|
||||||
cprintf(GREEN, "Sent Data\n");
|
cprintf(GREEN, "Sent Data\n");
|
||||||
|
|
||||||
@ -654,7 +663,12 @@ int main(int argc, char *argv[]) {
|
|||||||
// cout << "file" << endl;
|
// cout << "file" << endl;
|
||||||
// cout << "data " << endl;
|
// cout << "data " << endl;
|
||||||
if (of==NULL) {
|
if (of==NULL) {
|
||||||
|
#ifdef WRITE_QUAD
|
||||||
|
sprintf(ofname,"%s_%d.clust2",filename.c_str(),fileindex);
|
||||||
|
#endif
|
||||||
|
#ifndef WRITE_QUAD
|
||||||
sprintf(ofname,"%s_%d.clust",filename.c_str(),fileindex);
|
sprintf(ofname,"%s_%d.clust",filename.c_str(),fileindex);
|
||||||
|
#endif
|
||||||
of=fopen(ofname,"w");
|
of=fopen(ofname,"w");
|
||||||
if (of) {
|
if (of) {
|
||||||
mt->setFilePointer(of);
|
mt->setFilePointer(of);
|
||||||
|
@ -58,7 +58,7 @@ public analogDetector<uint16_t> {
|
|||||||
int sign=1,
|
int sign=1,
|
||||||
commonModeSubtraction *cm=NULL,
|
commonModeSubtraction *cm=NULL,
|
||||||
int nped=1000,
|
int nped=1000,
|
||||||
int nd=100, int nnx=-1, int nny=-1, double *gm=NULL) : analogDetector<uint16_t>(d, sign, cm, nped, nnx, nny, gm), nDark(nd), eventMask(NULL),nSigma (nsigma), clusterSize(csize), clusterSizeY(csize), clusters(NULL), quad(UNDEFINED_QUADRANT), tot(0), quadTot(0), eMin(-1), eMax(-1) {
|
int nd=100, int nnx=-1, int nny=-1, double *gm=NULL, ghostSummation<uint16_t> *gs=NULL) : analogDetector<uint16_t>(d, sign, cm, nped, nnx, nny, gm, gs), nDark(nd), eventMask(NULL),nSigma (nsigma), clusterSize(csize), clusterSizeY(csize), clusters(NULL), quad(UNDEFINED_QUADRANT), tot(0), quadTot(0), eMin(-1), eMax(-1) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ public analogDetector<uint16_t> {
|
|||||||
return nph;
|
return nph;
|
||||||
} else {
|
} else {
|
||||||
if (thr>0) {
|
if (thr>0) {
|
||||||
newFrame();
|
newFrame(data);
|
||||||
if (cmSub) {
|
if (cmSub) {
|
||||||
cout << "add to common mode?"<< endl;
|
cout << "add to common mode?"<< endl;
|
||||||
addToCommonMode(data);
|
addToCommonMode(data);
|
||||||
@ -362,7 +362,7 @@ int *getClusters(char *data, int *ph=NULL) {
|
|||||||
addToPedestal(data);
|
addToPedestal(data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
newFrame();
|
newFrame(data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ INSTMODE = 0777
|
|||||||
SRCS = $(main_server)communication_funcs.c $(main_server)slsDetectorServer.c $(main_server)slsDetectorServer_funcs.c slsDetectorFunctionList.c
|
SRCS = $(main_server)communication_funcs.c $(main_server)slsDetectorServer.c $(main_server)slsDetectorServer_funcs.c slsDetectorFunctionList.c
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
|
||||||
all: clean versioning $(PROGS)
|
all: clean versioning $(PROGS)
|
||||||
|
#all: clean $(PROGS)
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
|
@ -364,23 +364,23 @@
|
|||||||
#define PATTERN_CNTRL_RD_OFST (1)
|
#define PATTERN_CNTRL_RD_OFST (1)
|
||||||
#define PATTERN_CNTRL_RD_MSK (0x00000001 << PATTERN_CNTRL_RD_OFST)
|
#define PATTERN_CNTRL_RD_MSK (0x00000001 << PATTERN_CNTRL_RD_OFST)
|
||||||
#define PATTERN_CNTRL_ADDR_OFST (16)
|
#define PATTERN_CNTRL_ADDR_OFST (16)
|
||||||
#define PATTERN_CNTRL_ADDR_MSK (0x0000FFFF << PATTERN_CNTRL_ADDR_OFST)
|
#define PATTERN_CNTRL_ADDR_MSK (0x00001FFF << PATTERN_CNTRL_ADDR_OFST)
|
||||||
|
|
||||||
/* Pattern Limit RW regiser */
|
/* Pattern Limit RW regiser */
|
||||||
#define PATTERN_LIMIT_REG (0x53 << MEM_MAP_SHIFT)
|
#define PATTERN_LIMIT_REG (0x53 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define PATTERN_LIMIT_STRT_OFST (0)
|
#define PATTERN_LIMIT_STRT_OFST (0)
|
||||||
#define PATTERN_LIMIT_STRT_MSK (0x0000FFFF << PATTERN_LIMIT_STRT_OFST)
|
#define PATTERN_LIMIT_STRT_MSK (0x00001FFF << PATTERN_LIMIT_STRT_OFST)
|
||||||
#define PATTERN_LIMIT_STP_OFST (16)
|
#define PATTERN_LIMIT_STP_OFST (16)
|
||||||
#define PATTERN_LIMIT_STP_MSK (0x0000FFFF << PATTERN_LIMIT_STP_OFST)
|
#define PATTERN_LIMIT_STP_MSK (0x00001FFF << PATTERN_LIMIT_STP_OFST)
|
||||||
|
|
||||||
/* Pattern Loop 0 Address RW regiser */
|
/* Pattern Loop 0 Address RW regiser */
|
||||||
#define PATTERN_LOOP_0_ADDR_REG (0x54 << MEM_MAP_SHIFT)
|
#define PATTERN_LOOP_0_ADDR_REG (0x54 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define PATTERN_LOOP_0_ADDR_STRT_OFST (0)
|
#define PATTERN_LOOP_0_ADDR_STRT_OFST (0)
|
||||||
#define PATTERN_LOOP_0_ADDR_STRT_MSK (0x0000FFFF << PATTERN_LOOP_0_ADDR_STRT_OFST)
|
#define PATTERN_LOOP_0_ADDR_STRT_MSK (0x00001FFF << PATTERN_LOOP_0_ADDR_STRT_OFST)
|
||||||
#define PATTERN_LOOP_0_ADDR_STP_OFST (16)
|
#define PATTERN_LOOP_0_ADDR_STP_OFST (16)
|
||||||
#define PATTERN_LOOP_0_ADDR_STP_MSK (0x0000FFFF << PATTERN_LOOP_0_ADDR_STP_OFST)
|
#define PATTERN_LOOP_0_ADDR_STP_MSK (0x00001FFF << PATTERN_LOOP_0_ADDR_STP_OFST)
|
||||||
|
|
||||||
/* Pattern Loop 0 Iteration RW regiser */
|
/* Pattern Loop 0 Iteration RW regiser */
|
||||||
#define PATTERN_LOOP_0_ITERATION_REG (0x55 << MEM_MAP_SHIFT)
|
#define PATTERN_LOOP_0_ITERATION_REG (0x55 << MEM_MAP_SHIFT)
|
||||||
@ -389,9 +389,9 @@
|
|||||||
#define PATTERN_LOOP_1_ADDR_REG (0x56 << MEM_MAP_SHIFT)
|
#define PATTERN_LOOP_1_ADDR_REG (0x56 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define PATTERN_LOOP_1_ADDR_STRT_OFST (0)
|
#define PATTERN_LOOP_1_ADDR_STRT_OFST (0)
|
||||||
#define PATTERN_LOOP_1_ADDR_STRT_MSK (0x0000FFFF << PATTERN_LOOP_1_ADDR_STRT_OFST)
|
#define PATTERN_LOOP_1_ADDR_STRT_MSK (0x00001FFF << PATTERN_LOOP_1_ADDR_STRT_OFST)
|
||||||
#define PATTERN_LOOP_1_ADDR_STP_OFST (16)
|
#define PATTERN_LOOP_1_ADDR_STP_OFST (16)
|
||||||
#define PATTERN_LOOP_1_ADDR_STP_MSK (0x0000FFFF << PATTERN_LOOP_1_ADDR_STP_OFST)
|
#define PATTERN_LOOP_1_ADDR_STP_MSK (0x00001FFF << PATTERN_LOOP_1_ADDR_STP_OFST)
|
||||||
|
|
||||||
/* Pattern Loop 1 Iteration RW regiser */
|
/* Pattern Loop 1 Iteration RW regiser */
|
||||||
#define PATTERN_LOOP_1_ITERATION_REG (0x57 << MEM_MAP_SHIFT)
|
#define PATTERN_LOOP_1_ITERATION_REG (0x57 << MEM_MAP_SHIFT)
|
||||||
@ -400,9 +400,9 @@
|
|||||||
#define PATTERN_LOOP_2_ADDR_REG (0x58 << MEM_MAP_SHIFT)
|
#define PATTERN_LOOP_2_ADDR_REG (0x58 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define PATTERN_LOOP_2_ADDR_STRT_OFST (0)
|
#define PATTERN_LOOP_2_ADDR_STRT_OFST (0)
|
||||||
#define PATTERN_LOOP_2_ADDR_STRT_MSK (0x0000FFFF << PATTERN_LOOP_2_ADDR_STRT_OFST)
|
#define PATTERN_LOOP_2_ADDR_STRT_MSK (0x00001FFF << PATTERN_LOOP_2_ADDR_STRT_OFST)
|
||||||
#define PATTERN_LOOP_2_ADDR_STP_OFST (16)
|
#define PATTERN_LOOP_2_ADDR_STP_OFST (16)
|
||||||
#define PATTERN_LOOP_2_ADDR_STP_MSK (0x0000FFFF << PATTERN_LOOP_2_ADDR_STP_OFST)
|
#define PATTERN_LOOP_2_ADDR_STP_MSK (0x00001FFF << PATTERN_LOOP_2_ADDR_STP_OFST)
|
||||||
|
|
||||||
/* Pattern Loop 2 Iteration RW regiser */
|
/* Pattern Loop 2 Iteration RW regiser */
|
||||||
#define PATTERN_LOOP_2_ITERATION_REG (0x59 << MEM_MAP_SHIFT)
|
#define PATTERN_LOOP_2_ITERATION_REG (0x59 << MEM_MAP_SHIFT)
|
||||||
@ -411,20 +411,20 @@
|
|||||||
#define PATTERN_WAIT_0_ADDR_REG (0x5A << MEM_MAP_SHIFT)
|
#define PATTERN_WAIT_0_ADDR_REG (0x5A << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define PATTERN_WAIT_0_ADDR_OFST (0)
|
#define PATTERN_WAIT_0_ADDR_OFST (0)
|
||||||
#define PATTERN_WAIT_0_ADDR_MSK (0x0000FFFF << PATTERN_WAIT_0_ADDR_OFST)
|
#define PATTERN_WAIT_0_ADDR_MSK (0x00001FFF << PATTERN_WAIT_0_ADDR_OFST)
|
||||||
//FIXME: is mask 3FF
|
//FIXME: is mask 3FF
|
||||||
|
|
||||||
/* Pattern Wait 1 RW regiser */
|
/* Pattern Wait 1 RW regiser */
|
||||||
#define PATTERN_WAIT_1_ADDR_REG (0x5B << MEM_MAP_SHIFT)
|
#define PATTERN_WAIT_1_ADDR_REG (0x5B << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define PATTERN_WAIT_1_ADDR_OFST (0)
|
#define PATTERN_WAIT_1_ADDR_OFST (0)
|
||||||
#define PATTERN_WAIT_1_ADDR_MSK (0x0000FFFF << PATTERN_WAIT_1_ADDR_OFST)
|
#define PATTERN_WAIT_1_ADDR_MSK (0x00001FFF << PATTERN_WAIT_1_ADDR_OFST)
|
||||||
|
|
||||||
/* Pattern Wait 2 RW regiser */
|
/* Pattern Wait 2 RW regiser */
|
||||||
#define PATTERN_WAIT_2_ADDR_REG (0x5C << MEM_MAP_SHIFT)
|
#define PATTERN_WAIT_2_ADDR_REG (0x5C << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
#define PATTERN_WAIT_2_ADDR_OFST (0)
|
#define PATTERN_WAIT_2_ADDR_OFST (0)
|
||||||
#define PATTERN_WAIT_2_ADDR_MSK (0x0000FFFF << PATTERN_WAIT_2_ADDR_OFST)
|
#define PATTERN_WAIT_2_ADDR_MSK (0x00001FFF << PATTERN_WAIT_2_ADDR_OFST)
|
||||||
|
|
||||||
/* Samples RW register */
|
/* Samples RW register */
|
||||||
#define SAMPLES_REG (0x5D << MEM_MAP_SHIFT)
|
#define SAMPLES_REG (0x5D << MEM_MAP_SHIFT)
|
||||||
|
Binary file not shown.
@ -2163,8 +2163,9 @@ int startStateMachine(){
|
|||||||
FILE_LOG(logINFOGREEN, ("Virtual Acquisition started\n"));
|
FILE_LOG(logINFOGREEN, ("Virtual Acquisition started\n"));
|
||||||
return OK;
|
return OK;
|
||||||
#endif
|
#endif
|
||||||
|
int send_to_10g = enableTenGigabitEthernet(-1);
|
||||||
// 1 giga udp
|
// 1 giga udp
|
||||||
if (!enableTenGigabitEthernet(-1)) {
|
if (send_to_10g == 0) {
|
||||||
// create udp socket
|
// create udp socket
|
||||||
if(createUDPSocket(0) != OK) {
|
if(createUDPSocket(0) != OK) {
|
||||||
return FAIL;
|
return FAIL;
|
||||||
@ -2175,7 +2176,9 @@ int startStateMachine(){
|
|||||||
|
|
||||||
FILE_LOG(logINFOBLUE, ("Starting State Machine\n"));
|
FILE_LOG(logINFOBLUE, ("Starting State Machine\n"));
|
||||||
cleanFifos();
|
cleanFifos();
|
||||||
unsetFifoReadStrobes(); // FIXME: unnecessary to write bus_w(dumm, 0) as it is 0 in the beginnig and the strobes are always unset if set
|
if (send_to_10g == 0) {
|
||||||
|
unsetFifoReadStrobes(); // FIXME: unnecessary to write bus_w(dumm, 0) as it is 0 in the beginnig and the strobes are always unset if set
|
||||||
|
}
|
||||||
|
|
||||||
//start state machine
|
//start state machine
|
||||||
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_STRT_ACQSTN_MSK | CONTROL_STRT_EXPSR_MSK);
|
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_STRT_ACQSTN_MSK | CONTROL_STRT_EXPSR_MSK);
|
||||||
@ -2332,14 +2335,13 @@ void readFrame(int *ret, char *mess) {
|
|||||||
// frames left to give status
|
// frames left to give status
|
||||||
int64_t retval = getTimeLeft(FRAME_NUMBER) + 2;
|
int64_t retval = getTimeLeft(FRAME_NUMBER) + 2;
|
||||||
if ( retval > 1) {
|
if ( retval > 1) {
|
||||||
*ret = (int)FAIL;
|
|
||||||
sprintf(mess,"No data and run stopped: %lld frames left\n",(long long int)retval);
|
sprintf(mess,"No data and run stopped: %lld frames left\n",(long long int)retval);
|
||||||
FILE_LOG(logERROR, (mess));
|
FILE_LOG(logERROR, (mess));
|
||||||
} else {
|
} else {
|
||||||
*ret = (int)OK;
|
|
||||||
FILE_LOG(logINFOGREEN, ("Acquisition successfully finished\n"));
|
FILE_LOG(logINFOGREEN, ("Acquisition successfully finished\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*ret = (int)OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void unsetFifoReadStrobes() {
|
void unsetFifoReadStrobes() {
|
||||||
@ -2430,12 +2432,12 @@ uint32_t checkDataInFifo() {
|
|||||||
uint32_t dataPresent = 0;
|
uint32_t dataPresent = 0;
|
||||||
if (analogEnable) {
|
if (analogEnable) {
|
||||||
uint32_t analogFifoEmpty = bus_r(FIFO_EMPTY_REG);
|
uint32_t analogFifoEmpty = bus_r(FIFO_EMPTY_REG);
|
||||||
FILE_LOG(logDEBUG2, ("Analog Fifo Empty (32 channels): 0x%x\n", analogFifoEmpty));
|
FILE_LOG(logINFO, ("Analog Fifo Empty (32 channels): 0x%08x\n", analogFifoEmpty));
|
||||||
dataPresent = (~analogFifoEmpty);
|
dataPresent = (~analogFifoEmpty);
|
||||||
}
|
}
|
||||||
if (!dataPresent && digitalEnable) {
|
if (!dataPresent && digitalEnable) {
|
||||||
int digitalFifoEmpty = ((bus_r(FIFO_DIN_STATUS_REG) & FIFO_DIN_STATUS_FIFO_EMPTY_MSK) >> FIFO_DIN_STATUS_FIFO_EMPTY_OFST);
|
int digitalFifoEmpty = ((bus_r(FIFO_DIN_STATUS_REG) & FIFO_DIN_STATUS_FIFO_EMPTY_MSK) >> FIFO_DIN_STATUS_FIFO_EMPTY_OFST);
|
||||||
FILE_LOG(logDEBUG2, ("Digital Fifo Empty: %d\n",digitalFifoEmpty));
|
FILE_LOG(logINFO, ("Digital Fifo Empty: %d\n",digitalFifoEmpty));
|
||||||
dataPresent = (digitalFifoEmpty ? 0 : 1);
|
dataPresent = (digitalFifoEmpty ? 0 : 1);
|
||||||
}
|
}
|
||||||
FILE_LOG(logDEBUG2, ("Data in Fifo :0x%x\n", dataPresent));
|
FILE_LOG(logDEBUG2, ("Data in Fifo :0x%x\n", dataPresent));
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define MIN_REQRD_VRSN_T_RD_API 0x181130
|
#define MIN_REQRD_VRSN_T_RD_API 0x181130
|
||||||
#define REQRD_FRMWR_VRSN 0x190402
|
#define REQRD_FRMWR_VRSN 0x190821
|
||||||
|
|
||||||
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
|
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
|
||||||
|
|
||||||
@ -59,9 +59,9 @@ enum DACINDEX {D0, D1, D2, D3, D4, D5, D6, D7, D8, D9,
|
|||||||
#define DEFAULT_VLIMIT (-100)
|
#define DEFAULT_VLIMIT (-100)
|
||||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||||
#define DEFAULT_RUN_CLK (40)
|
#define DEFAULT_RUN_CLK (200) // 40
|
||||||
#define DEFAULT_ADC_CLK (20)
|
#define DEFAULT_ADC_CLK (40) // 20
|
||||||
#define DEFAULT_SYNC_CLK (20)
|
#define DEFAULT_SYNC_CLK (40) // 20
|
||||||
#define DEFAULT_DBIT_CLK (200)
|
#define DEFAULT_DBIT_CLK (200)
|
||||||
|
|
||||||
#define HIGHVOLTAGE_MIN (60)
|
#define HIGHVOLTAGE_MIN (60)
|
||||||
@ -76,7 +76,7 @@ enum DACINDEX {D0, D1, D2, D3, D4, D5, D6, D7, D8, D9,
|
|||||||
#define VIO_MIN_MV (1200) // for fpga to function
|
#define VIO_MIN_MV (1200) // for fpga to function
|
||||||
|
|
||||||
/* Defines in the Firmware */
|
/* Defines in the Firmware */
|
||||||
#define MAX_PATTERN_LENGTH (0x7FFF)
|
#define MAX_PATTERN_LENGTH (0x2000)
|
||||||
#define DIGITAL_IO_DELAY_MAXIMUM_PS ((OUTPUT_DELAY_0_OTPT_STTNG_MSK >> OUTPUT_DELAY_0_OTPT_STTNG_OFST) * OUTPUT_DELAY_0_OTPT_STTNG_STEPS)
|
#define DIGITAL_IO_DELAY_MAXIMUM_PS ((OUTPUT_DELAY_0_OTPT_STTNG_MSK >> OUTPUT_DELAY_0_OTPT_STTNG_OFST) * OUTPUT_DELAY_0_OTPT_STTNG_STEPS)
|
||||||
#define MAX_PHASE_SHIFTS_STEPS (8)
|
#define MAX_PHASE_SHIFTS_STEPS (8)
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ class File;
|
|||||||
class DataStreamer;
|
class DataStreamer;
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||||
|
|
||||||
@ -305,7 +306,7 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
static const std::string TypeName;
|
static const std::string TypeName;
|
||||||
|
|
||||||
/** Object running status */
|
/** Object running status */
|
||||||
bool runningFlag;
|
std::atomic<bool> runningFlag;
|
||||||
|
|
||||||
/** GeneralData (Detector Data) object */
|
/** GeneralData (Detector Data) object */
|
||||||
const GeneralData* generalData;
|
const GeneralData* generalData;
|
||||||
|
@ -120,18 +120,13 @@ public:
|
|||||||
* Get Header Infomation (frame number, packet number)
|
* Get Header Infomation (frame number, packet number)
|
||||||
* @param index thread index for debugging purposes
|
* @param index thread index for debugging purposes
|
||||||
* @param packetData pointer to data
|
* @param packetData pointer to data
|
||||||
* @param dynamicRange dynamic range to assign subframenumber if 32 bit mode
|
|
||||||
* @param oddStartingPacket odd starting packet (gotthard)
|
* @param oddStartingPacket odd starting packet (gotthard)
|
||||||
* @param frameNumber frame number
|
* @param frameNumber frame number
|
||||||
* @param packetNumber packet number
|
* @param packetNumber packet number
|
||||||
* @param subFrameNumber sub frame number if applicable
|
|
||||||
* @param bunchId bunch id
|
|
||||||
*/
|
*/
|
||||||
virtual void GetHeaderInfo(int index, char* packetData, uint32_t dynamicRange, bool oddStartingPacket,
|
virtual void GetHeaderInfo(int index, char* packetData, bool oddStartingPacket,
|
||||||
uint64_t& frameNumber, uint32_t& packetNumber, uint32_t& subFrameNumber, uint64_t& bunchId) const
|
uint64_t& frameNumber, uint32_t& packetNumber) const
|
||||||
{
|
{
|
||||||
subFrameNumber = -1;
|
|
||||||
bunchId = -1;
|
|
||||||
frameNumber = ((uint32_t)(*((uint32_t*)(packetData))));
|
frameNumber = ((uint32_t)(*((uint32_t*)(packetData))));
|
||||||
frameNumber++;
|
frameNumber++;
|
||||||
packetNumber = frameNumber&packetIndexMask;
|
packetNumber = frameNumber&packetIndexMask;
|
||||||
@ -280,27 +275,20 @@ private:
|
|||||||
* Get Header Infomation (frame number, packet number)
|
* Get Header Infomation (frame number, packet number)
|
||||||
* @param index thread index for debugging purposes
|
* @param index thread index for debugging purposes
|
||||||
* @param packetData pointer to data
|
* @param packetData pointer to data
|
||||||
* @param dynamicRange dynamic range to assign subframenumber if 32 bit mode
|
|
||||||
* @param oddStartingPacket odd starting packet (gotthard)
|
* @param oddStartingPacket odd starting packet (gotthard)
|
||||||
* @param frameNumber frame number
|
* @param frameNumber frame number
|
||||||
* @param packetNumber packet number
|
* @param packetNumber packet number
|
||||||
* @param subFrameNumber sub frame number if applicable
|
|
||||||
* @param bunchId bunch id
|
|
||||||
*/
|
*/
|
||||||
void GetHeaderInfo(int index, char* packetData, uint32_t dynamicRange, bool oddStartingPacket,
|
void GetHeaderInfo(int index, char* packetData, bool oddStartingPacket,
|
||||||
uint64_t& frameNumber, uint32_t& packetNumber, uint32_t& subFrameNumber, uint64_t& bunchId) const
|
uint64_t& frameNumber, uint32_t& packetNumber) const
|
||||||
{
|
{
|
||||||
if (nPixelsX == 1280) {
|
if (nPixelsX == 1280) {
|
||||||
subFrameNumber = -1;
|
|
||||||
bunchId = -1;
|
|
||||||
frameNumber = *reinterpret_cast<uint32_t*>(packetData);
|
frameNumber = *reinterpret_cast<uint32_t*>(packetData);
|
||||||
if (oddStartingPacket)
|
if (oddStartingPacket)
|
||||||
frameNumber++;
|
frameNumber++;
|
||||||
packetNumber = frameNumber&packetIndexMask;
|
packetNumber = frameNumber&packetIndexMask;
|
||||||
frameNumber = (frameNumber & frameIndexMask) >> frameIndexOffset;
|
frameNumber = (frameNumber & frameIndexMask) >> frameIndexOffset;
|
||||||
} else {
|
} else {
|
||||||
subFrameNumber = -1;
|
|
||||||
bunchId = -1;
|
|
||||||
frameNumber = *reinterpret_cast<uint32_t *>(packetData);
|
frameNumber = *reinterpret_cast<uint32_t *>(packetData);
|
||||||
packetNumber = 0;
|
packetNumber = 0;
|
||||||
}
|
}
|
||||||
@ -548,6 +536,14 @@ private:
|
|||||||
const int NCHAN_DIGITAL = 64;
|
const int NCHAN_DIGITAL = 64;
|
||||||
/** Number of bytes per analog channel */
|
/** Number of bytes per analog channel */
|
||||||
const int NUM_BYTES_PER_ANALOG_CHANNEL = 2;
|
const int NUM_BYTES_PER_ANALOG_CHANNEL = 2;
|
||||||
|
|
||||||
|
struct ctb_10g_packet_header {
|
||||||
|
unsigned char emptyHeader[6];
|
||||||
|
unsigned char reserved[4];
|
||||||
|
uint32_t packetFrameNumber;
|
||||||
|
uint64_t bunchid;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
@ -561,6 +557,9 @@ public:
|
|||||||
packetSize = headerSizeinPacket + dataSize;
|
packetSize = headerSizeinPacket + dataSize;
|
||||||
//packetsPerFrame = 1;
|
//packetsPerFrame = 1;
|
||||||
imageSize = nPixelsX * nPixelsY * 2;
|
imageSize = nPixelsX * nPixelsY * 2;
|
||||||
|
frameIndexMask = 0xFFFFFF; // 10g
|
||||||
|
frameIndexOffset = 8; // 10g
|
||||||
|
packetIndexMask = 0xFF; //10g
|
||||||
packetsPerFrame = ceil((double)imageSize / (double)UDP_PACKET_DATA_BYTES);
|
packetsPerFrame = ceil((double)imageSize / (double)UDP_PACKET_DATA_BYTES);
|
||||||
maxFramesPerFile = CTB_MAX_FRAMES_PER_FILE;
|
maxFramesPerFile = CTB_MAX_FRAMES_PER_FILE;
|
||||||
fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsDetectorDefs::sls_receiver_header);
|
fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsDetectorDefs::sls_receiver_header);
|
||||||
@ -612,12 +611,20 @@ public:
|
|||||||
nPixelsY = 1;
|
nPixelsY = 1;
|
||||||
// 10G
|
// 10G
|
||||||
if (t) {
|
if (t) {
|
||||||
|
/*
|
||||||
headerSizeinPacket = sizeof(slsDetectorDefs::sls_detector_header);
|
headerSizeinPacket = sizeof(slsDetectorDefs::sls_detector_header);
|
||||||
dataSize = UDP_PACKET_DATA_BYTES;
|
dataSize = UDP_PACKET_DATA_BYTES;
|
||||||
packetSize = headerSizeinPacket + dataSize;
|
packetSize = headerSizeinPacket + dataSize;
|
||||||
imageSize = adatabytes + ddatabytes;
|
imageSize = adatabytes + ddatabytes;
|
||||||
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||||
standardheader = true;
|
standardheader = true;
|
||||||
|
*/
|
||||||
|
headerSizeinPacket = 22;
|
||||||
|
dataSize = 8192;
|
||||||
|
packetSize = headerSizeinPacket + dataSize;
|
||||||
|
imageSize = adatabytes + ddatabytes;
|
||||||
|
packetsPerFrame = ceil((double)imageSize / (double)dataSize);
|
||||||
|
standardheader = false;
|
||||||
}
|
}
|
||||||
// 1g udp (via fifo readout)
|
// 1g udp (via fifo readout)
|
||||||
else {
|
else {
|
||||||
@ -631,6 +638,22 @@ public:
|
|||||||
return adatabytes;
|
return adatabytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Header Infomation (frame number, packet number)
|
||||||
|
* @param index thread index for debugging purposes
|
||||||
|
* @param packetData pointer to data
|
||||||
|
* @param oddStartingPacket odd starting packet (gotthard)
|
||||||
|
* @param frameNumber frame number
|
||||||
|
* @param packetNumber packet number
|
||||||
|
*/
|
||||||
|
void GetHeaderInfo(int index, char* packetData, bool oddStartingPacket,
|
||||||
|
uint64_t& frameNumber, uint32_t& packetNumber) const
|
||||||
|
{
|
||||||
|
auto header = reinterpret_cast<ctb_10g_packet_header*>(packetData);
|
||||||
|
frameNumber = (header->packetFrameNumber >> frameIndexOffset) & frameIndexMask;
|
||||||
|
packetNumber = header->packetFrameNumber & packetIndexMask;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <atomic>
|
||||||
#include "ThreadObject.h"
|
#include "ThreadObject.h"
|
||||||
|
|
||||||
class GeneralData;
|
class GeneralData;
|
||||||
@ -39,7 +39,7 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
* @param depaden pointer to deactivated padding enable
|
* @param depaden pointer to deactivated padding enable
|
||||||
* @param sm pointer to silent mode
|
* @param sm pointer to silent mode
|
||||||
*/
|
*/
|
||||||
Listener(int ind, detectorType dtype, Fifo* f, runStatus* s,
|
Listener(int ind, detectorType dtype, Fifo* f, std::atomic<runStatus>* s,
|
||||||
uint32_t* portno, char* e, uint64_t* nf, uint32_t* dr,
|
uint32_t* portno, char* e, uint64_t* nf, uint32_t* dr,
|
||||||
int64_t* us, int64_t* as, uint32_t* fpf,
|
int64_t* us, int64_t* as, uint32_t* fpf,
|
||||||
frameDiscardPolicy* fdp, bool* act, bool* depaden, bool* sm);
|
frameDiscardPolicy* fdp, bool* act, bool* depaden, bool* sm);
|
||||||
@ -151,7 +151,6 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
void SetHardCodedPosition(uint16_t r, uint16_t c);
|
void SetHardCodedPosition(uint16_t r, uint16_t c);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -201,7 +200,7 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
static const std::string TypeName;
|
static const std::string TypeName;
|
||||||
|
|
||||||
/** Object running status */
|
/** Object running status */
|
||||||
bool runningFlag;
|
std::atomic<bool> runningFlag;
|
||||||
|
|
||||||
/** GeneralData (Detector Data) object */
|
/** GeneralData (Detector Data) object */
|
||||||
GeneralData* generalData;
|
GeneralData* generalData;
|
||||||
@ -214,7 +213,7 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
detectorType myDetectorType;
|
detectorType myDetectorType;
|
||||||
|
|
||||||
/** Receiver Status */
|
/** Receiver Status */
|
||||||
runStatus* status;
|
std::atomic<runStatus>* status;
|
||||||
|
|
||||||
/** UDP Socket - Detector to Receiver */
|
/** UDP Socket - Detector to Receiver */
|
||||||
std::unique_ptr<genericSocket> udpSocket;
|
std::unique_ptr<genericSocket> udpSocket;
|
||||||
@ -264,10 +263,10 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
|
|
||||||
// acquisition start
|
// acquisition start
|
||||||
/** Aquisition Started flag */
|
/** Aquisition Started flag */
|
||||||
bool acquisitionStartedFlag;
|
std::atomic<bool> acquisitionStartedFlag;
|
||||||
|
|
||||||
/** Measurement Started flag */
|
/** Measurement Started flag */
|
||||||
bool measurementStartedFlag;
|
std::atomic<bool> measurementStartedFlag;
|
||||||
|
|
||||||
/** Frame Number of First Frame of an entire Acquisition (including all scans) */
|
/** Frame Number of First Frame of an entire Acquisition (including all scans) */
|
||||||
uint64_t firstAcquisitionIndex;
|
uint64_t firstAcquisitionIndex;
|
||||||
@ -278,10 +277,10 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
|
|
||||||
// for acquisition summary
|
// for acquisition summary
|
||||||
/** Number of complete Packets caught for each real time acquisition (eg. for each scan (start& stop of receiver)) */
|
/** Number of complete Packets caught for each real time acquisition (eg. for each scan (start& stop of receiver)) */
|
||||||
volatile uint64_t numPacketsCaught;
|
std::atomic<uint64_t> numPacketsCaught;
|
||||||
|
|
||||||
/** Last Frame Index caught from udp network */
|
/** Last Frame Index caught from udp network */
|
||||||
uint64_t lastCaughtFrameIndex;
|
std::atomic<uint64_t> lastCaughtFrameIndex;
|
||||||
|
|
||||||
|
|
||||||
// parameters to acquire image
|
// parameters to acquire image
|
||||||
@ -300,12 +299,11 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
std::unique_ptr<char []> listeningPacket;
|
std::unique_ptr<char []> listeningPacket;
|
||||||
|
|
||||||
/** if the udp socket is connected */
|
/** if the udp socket is connected */
|
||||||
bool udpSocketAlive;
|
std::atomic<bool> udpSocketAlive;
|
||||||
|
|
||||||
/** Semaphore to synchonize deleting udp socket */
|
/** Semaphore to synchonize deleting udp socket */
|
||||||
sem_t semaphore_socket;
|
sem_t semaphore_socket;
|
||||||
|
|
||||||
|
|
||||||
// for print progress during acqusition
|
// for print progress during acqusition
|
||||||
/** number of packets for statistic */
|
/** number of packets for statistic */
|
||||||
uint32_t numPacketsStatistic;
|
uint32_t numPacketsStatistic;
|
||||||
|
@ -21,6 +21,7 @@ class DataStreamer;
|
|||||||
class Fifo;
|
class Fifo;
|
||||||
class slsDetectorDefs;
|
class slsDetectorDefs;
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -910,7 +911,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
|||||||
/** Maximum Number of Listening Threads/ UDP Ports */
|
/** Maximum Number of Listening Threads/ UDP Ports */
|
||||||
const static int MAX_NUMBER_OF_LISTENING_THREADS = 2;
|
const static int MAX_NUMBER_OF_LISTENING_THREADS = 2;
|
||||||
/** Receiver Status */
|
/** Receiver Status */
|
||||||
runStatus status;
|
std::atomic<runStatus> status;
|
||||||
/** Activated/Deactivated */
|
/** Activated/Deactivated */
|
||||||
bool activated;
|
bool activated;
|
||||||
/** Deactivated padding enable */
|
/** Deactivated padding enable */
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
const std::string Listener::TypeName = "Listener";
|
const std::string Listener::TypeName = "Listener";
|
||||||
|
|
||||||
|
|
||||||
Listener::Listener(int ind, detectorType dtype, Fifo* f, runStatus* s,
|
Listener::Listener(int ind, detectorType dtype, Fifo* f, std::atomic<runStatus>* s,
|
||||||
uint32_t* portno, char* e, uint64_t* nf, uint32_t* dr,
|
uint32_t* portno, char* e, uint64_t* nf, uint32_t* dr,
|
||||||
int64_t* us, int64_t* as, uint32_t* fpf,
|
int64_t* us, int64_t* as, uint32_t* fpf,
|
||||||
frameDiscardPolicy* fdp, bool* act, bool* depaden, bool* sm) :
|
frameDiscardPolicy* fdp, bool* act, bool* depaden, bool* sm) :
|
||||||
@ -348,8 +348,8 @@ void Listener::StopListening(char* buf) {
|
|||||||
uint32_t Listener::ListenToAnImage(char* buf) {
|
uint32_t Listener::ListenToAnImage(char* buf) {
|
||||||
|
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
uint64_t fnum = 0, bid = 0;
|
uint64_t fnum = 0;
|
||||||
uint32_t pnum = 0, snum = 0;
|
uint32_t pnum = 0;
|
||||||
uint32_t numpackets = 0;
|
uint32_t numpackets = 0;
|
||||||
uint32_t dsize = generalData->dataSize;
|
uint32_t dsize = generalData->dataSize;
|
||||||
uint32_t hsize = generalData->headerSizeinPacket; //(includes empty header)
|
uint32_t hsize = generalData->headerSizeinPacket; //(includes empty header)
|
||||||
@ -402,8 +402,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
|
|||||||
}
|
}
|
||||||
// -------------------old header -----------------------------------------------------------------------------
|
// -------------------old header -----------------------------------------------------------------------------
|
||||||
else {
|
else {
|
||||||
generalData->GetHeaderInfo(index, &carryOverPacket[0],
|
generalData->GetHeaderInfo(index, &carryOverPacket[0], oddStartingPacket, fnum, pnum);
|
||||||
*dynamicRange, oddStartingPacket, fnum, pnum, snum, bid);
|
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------------------
|
||||||
if (fnum != currentFrameIndex) {
|
if (fnum != currentFrameIndex) {
|
||||||
@ -476,9 +475,6 @@ uint32_t Listener::ListenToAnImage(char* buf) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//until last packet isHeaderEmpty to account for gotthard short frame, else never entering this loop)
|
//until last packet isHeaderEmpty to account for gotthard short frame, else never entering this loop)
|
||||||
while ( numpackets < pperFrame) {
|
while ( numpackets < pperFrame) {
|
||||||
//listen to new packet
|
//listen to new packet
|
||||||
@ -525,8 +521,7 @@ uint32_t Listener::ListenToAnImage(char* buf) {
|
|||||||
oddStartingPacket = generalData->SetOddStartingPacket(index, &listeningPacket[0]);
|
oddStartingPacket = generalData->SetOddStartingPacket(index, &listeningPacket[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
generalData->GetHeaderInfo(index, &listeningPacket[0],
|
generalData->GetHeaderInfo(index, &listeningPacket[0], oddStartingPacket, fnum, pnum);
|
||||||
*dynamicRange, oddStartingPacket, fnum, pnum, snum, bid);
|
|
||||||
}
|
}
|
||||||
//------------------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -44,7 +44,6 @@ class sockaddr_in;
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
|
|
||||||
|
|
||||||
#define DEFAULT_PACKET_SIZE 1286
|
#define DEFAULT_PACKET_SIZE 1286
|
||||||
#define SOCKET_BUFFER_SIZE (100*1024*1024) //100 MB
|
#define SOCKET_BUFFER_SIZE (100*1024*1024) //100 MB
|
||||||
#define DEFAULT_BACKLOG 5
|
#define DEFAULT_BACKLOG 5
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
#define APIGUI 0x190723
|
#define APIGUI 0x190723
|
||||||
#define APIMOENCH 0x190820
|
#define APIMOENCH 0x190820
|
||||||
#define APIGOTTHARD 0x190820
|
#define APIGOTTHARD 0x190820
|
||||||
#define APICTB 0x190820
|
|
||||||
#define APIJUNGFRAU 0x190820
|
|
||||||
#define APIEIGER 0x190820
|
#define APIEIGER 0x190820
|
||||||
|
#define APIJUNGFRAU 0x190820
|
||||||
|
#define APICTB 0x190821
|
||||||
|
Loading…
x
Reference in New Issue
Block a user