mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
Fixed all warning in moenchZmqProcess
This commit is contained in:
@ -33,7 +33,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
{
|
||||
double sDum[2][2];
|
||||
double tot, totquad;
|
||||
double etax,etay;
|
||||
double etax=0,etay=0;
|
||||
|
||||
int corner;
|
||||
corner=calcQuad(data, tot, totquad, sDum);
|
||||
@ -49,7 +49,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
{
|
||||
double sDum[2][2];
|
||||
double tot, totquad;
|
||||
double etax,etay;
|
||||
double etax=0,etay=0;
|
||||
|
||||
int corner;
|
||||
corner=calcQuad(data, tot, totquad, sDum);
|
||||
@ -71,7 +71,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
virtual void getInterpolatedPosition(int x, int y, double totquad,int quad,double *cl,double &int_x, double &int_y) {
|
||||
|
||||
double cc[2][2];
|
||||
int xoff, yoff;
|
||||
int xoff=0, yoff=0;
|
||||
switch (quad) {
|
||||
case BOTTOM_LEFT:
|
||||
xoff=0;
|
||||
@ -92,7 +92,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
default:
|
||||
;
|
||||
}
|
||||
double etax, etay;
|
||||
double etax=0, etay=0;
|
||||
if (nSubPixels>2) {
|
||||
cc[0][0]=cl[xoff+3*yoff];
|
||||
cc[1][0]=cl[xoff+3*(yoff+1)];
|
||||
@ -100,6 +100,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
cc[1][1]=cl[xoff+1+3*(yoff+1)];
|
||||
calcEta(totquad,cc,etax,etay);
|
||||
}
|
||||
|
||||
return getInterpolatedPosition(x,y,etax, etay,quad,int_x,int_y);
|
||||
|
||||
}
|
||||
@ -109,7 +110,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
virtual void getInterpolatedPosition(int x, int y, double totquad,int quad,int *cl,double &int_x, double &int_y) {
|
||||
|
||||
double cc[2][2];
|
||||
int xoff, yoff;
|
||||
int xoff=0, yoff=0;
|
||||
|
||||
switch (quad) {
|
||||
case BOTTOM_LEFT:
|
||||
@ -131,7 +132,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
default:
|
||||
;
|
||||
}
|
||||
double etax, etay;
|
||||
double etax=0, etay=0;
|
||||
if (nSubPixels>2) {
|
||||
cc[0][0]=cl[xoff+3*yoff];
|
||||
cc[1][0]=cl[xoff+3*(yoff+1)];
|
||||
@ -222,7 +223,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
|
||||
virtual int addToFlatField(double totquad,int quad,int *cl,double &etax, double &etay) {
|
||||
double cc[2][2];
|
||||
int xoff, yoff;
|
||||
int xoff=0, yoff=0;
|
||||
|
||||
switch (quad) {
|
||||
case BOTTOM_LEFT:
|
||||
@ -260,7 +261,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
|
||||
virtual int addToFlatField(double totquad,int quad,double *cl,double &etax, double &etay) {
|
||||
double cc[2][2];
|
||||
int xoff, yoff;
|
||||
int xoff=0, yoff=0;
|
||||
|
||||
switch (quad) {
|
||||
case BOTTOM_LEFT:
|
||||
@ -308,11 +309,12 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
virtual int addToFlatField(double *cluster, double &etax, double &etay){
|
||||
double sDum[2][2];
|
||||
double tot, totquad;
|
||||
int corner;
|
||||
corner=calcQuad(cluster, tot, totquad, sDum);
|
||||
// int corner;
|
||||
//corner=
|
||||
calcQuad(cluster, tot, totquad, sDum);
|
||||
|
||||
double xpos_eta,ypos_eta;
|
||||
double dX,dY;
|
||||
//double xpos_eta,ypos_eta;
|
||||
//double dX,dY;
|
||||
|
||||
|
||||
calcEta(totquad, sDum, etax, etay);
|
||||
@ -324,11 +326,12 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
virtual int addToFlatField(int *cluster, double &etax, double &etay){
|
||||
double sDum[2][2];
|
||||
double tot, totquad;
|
||||
int corner;
|
||||
corner=calcQuad(cluster, tot, totquad, sDum);
|
||||
//int corner;
|
||||
//corner=
|
||||
calcQuad(cluster, tot, totquad, sDum);
|
||||
|
||||
double xpos_eta,ypos_eta;
|
||||
double dX,dY;
|
||||
// double xpos_eta,ypos_eta;
|
||||
//double dX,dY;
|
||||
|
||||
|
||||
calcEta(totquad, sDum, etax, etay);
|
||||
|
@ -59,10 +59,10 @@ class eta3InterpolationBase : public virtual etaInterpolationBase {
|
||||
//////////// /*It return position hit for the event in input */ //////////////
|
||||
virtual void getInterpolatedPosition(int x, int y, int *data, double &int_x, double &int_y)
|
||||
{
|
||||
double tot, totquad;
|
||||
double tot;
|
||||
double etax,etay;
|
||||
|
||||
int corner=calcEta3(data,etax,etay, totquad);
|
||||
int corner=calcEta3(data,etax,etay, tot);
|
||||
|
||||
getInterpolatedPosition(x,y,etax,etay,corner,int_x,int_y);
|
||||
|
||||
@ -72,11 +72,11 @@ class eta3InterpolationBase : public virtual etaInterpolationBase {
|
||||
|
||||
virtual void getInterpolatedPosition(int x, int y, double *data, double &int_x, double &int_y)
|
||||
{
|
||||
double sDum[2][2];
|
||||
double tot, totquad;
|
||||
//double sDum[2][2];
|
||||
double tot;
|
||||
double etax,etay;
|
||||
|
||||
int corner=calcEta3(data,etax,etay, totquad);
|
||||
int corner=calcEta3(data,etax,etay, tot);
|
||||
|
||||
getInterpolatedPosition(x,y,etax,etay,corner,int_x,int_y);
|
||||
|
||||
|
@ -190,7 +190,7 @@ float *gethhx()
|
||||
|
||||
|
||||
void debugSaveAll(int ind=0) {
|
||||
int ib, ibx, iby;
|
||||
int ibx, iby;
|
||||
char tit[10000];
|
||||
|
||||
float tot_eta=0;
|
||||
@ -204,7 +204,7 @@ float *gethhx()
|
||||
etah[ii]=heta[ii];
|
||||
tot_eta+=heta[ii];
|
||||
}
|
||||
sprintf(tit,"/scratch/eta.tiff",ind);
|
||||
sprintf(tit,"/scratch/eta_%d.tiff",ind);
|
||||
WriteToTiff(etah, tit, etabins, etabins);
|
||||
|
||||
|
||||
@ -284,7 +284,7 @@ float *gethhx()
|
||||
double calcDiff(double avg, float *hx, float *hy) {
|
||||
//double p_tot=0;
|
||||
double diff=0, d;
|
||||
double bsize=1./nSubPixels;
|
||||
//double bsize=1./nSubPixels;
|
||||
int nbad=0;
|
||||
double p_tot_x[nSubPixels], p_tot_y[nSubPixels], p_tot[nSubPixels*nSubPixels];
|
||||
double maxdiff=0, mindiff=avg*nSubPixels*nSubPixels;
|
||||
@ -351,9 +351,9 @@ float *gethhx()
|
||||
return sqrt(diff);
|
||||
}
|
||||
|
||||
int *heta;
|
||||
float *hhx;
|
||||
float *hhy;
|
||||
int *heta;
|
||||
int nbeta;
|
||||
double etamin, etamax, etastep;
|
||||
double rangeMin, rangeMax;
|
||||
|
@ -35,7 +35,7 @@ class etaInterpolationPosXY : public virtual etaInterpolationBase{
|
||||
|
||||
|
||||
///*Eta Distribution Rebinning*///
|
||||
double bsize=1./nSubPixels; //precision
|
||||
// double bsize=1./nSubPixels; //precision
|
||||
// cout<<"nPixelsX = "<<nPixelsX<<" nPixelsY = "<<nPixelsY<<" nSubPixels = "<<nSubPixels<<endl;
|
||||
double tot_eta=0;
|
||||
double tot_eta_x=0;
|
||||
@ -50,8 +50,8 @@ class etaInterpolationPosXY : public virtual etaInterpolationBase{
|
||||
double hy[nbeta]; //profile y
|
||||
double hix[nbeta]; //integral of projection x
|
||||
double hiy[nbeta]; //integral of projection y
|
||||
int ii=0;
|
||||
double etax, etay;
|
||||
// int ii=0;
|
||||
double etax;//, etay;
|
||||
for (int ib=0; ib<nbeta; ib++) {
|
||||
|
||||
tot_eta_x=0;
|
||||
@ -81,7 +81,7 @@ class etaInterpolationPosXY : public virtual etaInterpolationBase{
|
||||
hiy[iby]=hiy[iby-1]+hy[iby];
|
||||
}
|
||||
|
||||
ii=0;
|
||||
// ii=0;
|
||||
tot_eta_x=hix[nbeta-1]+1;
|
||||
tot_eta_y=hiy[nbeta-1]+1;
|
||||
|
||||
@ -98,7 +98,7 @@ class etaInterpolationPosXY : public virtual etaInterpolationBase{
|
||||
/* if (ii!=(nSubPixels-1)) */
|
||||
/* cout << ib << " x " << tot_eta_x << " " << (ii+1)*tot_eta_x*bsize << " " << ii << " " << hix[nbeta-1]<< endl; */
|
||||
|
||||
ii=0;
|
||||
//ii=0;
|
||||
|
||||
for (int ibx=0; ibx<nbeta; ibx++) {
|
||||
if (tot_eta_y<=0) {
|
||||
|
Reference in New Issue
Block a user