mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 00:14:37 +01:00
moench zmq process implemented - command implementation is missing
This commit is contained in:
@@ -16,13 +16,13 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
eta2InterpolationBase(int nx=400, int ny=400, int ns=25, int nb=-1, double emin=1, double emax=0) : etaInterpolationBase(nx,ny, ns, nb, emin, emax) {
|
||||
// cout << "e2ib " << nb << " " << emin << " " << emax << endl;
|
||||
|
||||
if (nbeta<=0) {
|
||||
nbeta=nSubPixels*10;
|
||||
}
|
||||
/* if (nbeta<=0) { */
|
||||
/* nbeta=nSubPixels*10; */
|
||||
/* } */
|
||||
if (etamin>=etamax) {
|
||||
etamin=-1;
|
||||
etamax=2;
|
||||
cout << ":" <<endl;
|
||||
// cout << ":" <<endl;
|
||||
}
|
||||
etastep=(etamax-etamin)/nbeta;
|
||||
#ifdef MYROOT1
|
||||
@@ -34,12 +34,12 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
hhy=new TH2D("hhy","hhy",nbeta,etamin,etamax,nbeta,etamin,etamax);
|
||||
#endif
|
||||
#ifndef MYROOT1
|
||||
delete [] heta;
|
||||
delete [] hhx;
|
||||
delete [] hhy;
|
||||
heta=new int[nbeta*nbeta];
|
||||
hhx=new float[nbeta*nbeta];
|
||||
hhy=new float[nbeta*nbeta];
|
||||
/* delete [] heta; */
|
||||
/* delete [] hhx; */
|
||||
/* delete [] hhy; */
|
||||
/* heta=new int[nbeta*nbeta]; */
|
||||
/* hhx=new float[nbeta*nbeta]; */
|
||||
/* hhy=new float[nbeta*nbeta]; */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ class eta2InterpolationBase : public virtual etaInterpolationBase {
|
||||
|
||||
eta2InterpolationBase(eta2InterpolationBase *orig): etaInterpolationBase(orig){ };
|
||||
|
||||
virtual eta2InterpolationBase* Clone()=0;/* {
|
||||
/* virtual eta2InterpolationBase* Clone()=0; {
|
||||
|
||||
return new eta2InterpolationBase(this);
|
||||
|
||||
@@ -56,8 +56,6 @@ class eta2InterpolationBase : 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)
|
||||
|
||||
@@ -15,9 +15,9 @@ class eta3InterpolationBase : public virtual etaInterpolationBase {
|
||||
public:
|
||||
eta3InterpolationBase(int nx=400, int ny=400, int ns=25, int nb=-1, double emin=1, double emax=0) : etaInterpolationBase(nx, ny, ns, nb, emin, emax) {
|
||||
// cout << "e3ib " << nb << " " << emin << " " << emax << endl;
|
||||
if (nbeta<=0) {
|
||||
nbeta=nSubPixels*10;
|
||||
}
|
||||
/* if (nbeta<=0) { */
|
||||
/* nbeta=nSubPixels*10; */
|
||||
/* } */
|
||||
if (etamin>=etamax) {
|
||||
etamin=-1;
|
||||
etamax=1;
|
||||
@@ -33,13 +33,13 @@ class eta3InterpolationBase : public virtual etaInterpolationBase {
|
||||
hhy=new TH2D("hhy","hhy",nbeta,etamin,etamax,nbeta,etamin,etamax);
|
||||
#endif
|
||||
#ifndef MYROOT1
|
||||
delete [] heta;
|
||||
delete [] hhx;
|
||||
delete [] hhy;
|
||||
/* delete [] heta; */
|
||||
/* delete [] hhx; */
|
||||
/* delete [] hhy; */
|
||||
|
||||
heta=new int[nbeta*nbeta];
|
||||
hhx=new float[nbeta*nbeta];
|
||||
hhy=new float[nbeta*nbeta];
|
||||
/* heta=new int[nbeta*nbeta]; */
|
||||
/* hhx=new float[nbeta*nbeta]; */
|
||||
/* hhy=new float[nbeta*nbeta]; */
|
||||
|
||||
#endif
|
||||
// cout << nbeta << " " << etamin << " " << etamax << endl;
|
||||
@@ -47,7 +47,7 @@ class eta3InterpolationBase : public virtual etaInterpolationBase {
|
||||
|
||||
eta3InterpolationBase(eta3InterpolationBase *orig): etaInterpolationBase(orig){ };
|
||||
|
||||
virtual eta3InterpolationBase* Clone()=0;
|
||||
/* virtual eta3InterpolationBase* Clone()=0; */
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ class etaInterpolationBase : public slsInterpolation {
|
||||
// cout << "eb " << nb << " " << emin << " " << emax << endl;
|
||||
// cout << nb << " " << etamin << " " << etamax << endl;
|
||||
if (nbeta<=0) {
|
||||
cout << "aaa:" <<endl;
|
||||
//cout << "aaa:" <<endl;
|
||||
nbeta=nSubPixels*10;
|
||||
}
|
||||
if (etamin>=etamax) {
|
||||
cout << "aaa:" <<endl;
|
||||
// cout << "aaa:" <<endl;
|
||||
etamin=-1;
|
||||
etamax=2;
|
||||
}
|
||||
@@ -68,12 +68,31 @@ class etaInterpolationBase : public slsInterpolation {
|
||||
|
||||
};
|
||||
|
||||
virtual etaInterpolationBase* Clone()=0;/*{
|
||||
|
||||
/* virtual etaInterpolationBase* Clone()=0; {
|
||||
return new etaInterpolationBase(this);
|
||||
};*/
|
||||
|
||||
|
||||
|
||||
|
||||
virtual void resetFlatField() {
|
||||
#ifndef MYROOT1
|
||||
for (int ibx=0; ibx<nbeta*nbeta; ibx++) {
|
||||
heta[ibx]=0;
|
||||
hhx[ibx]=0;
|
||||
hhy[ibx]=0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MYROOT1
|
||||
heta->Reset();
|
||||
hhx->Reset();
|
||||
hhy->Reset();
|
||||
#endif
|
||||
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef MYROOT1
|
||||
TH2D *setEta(TH2D *h, int nb=-1, double emin=1, double emax=0)
|
||||
@@ -117,6 +136,9 @@ class etaInterpolationBase : public slsInterpolation {
|
||||
{
|
||||
return setEta(h, nb, emin, emax);
|
||||
};
|
||||
|
||||
|
||||
|
||||
int *getFlatField(){return setEta(NULL);};
|
||||
|
||||
int *getFlatField(int &nb, double &emin, double &emax){
|
||||
@@ -183,6 +205,8 @@ class etaInterpolationBase : public slsInterpolation {
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -154,11 +154,15 @@ class eta2InterpolationPosXY : public virtual eta2InterpolationBase, public virt
|
||||
eta2InterpolationPosXY(int nx=400, int ny=400, int ns=25, int nb=-1, double emin=1, double emax=0) : etaInterpolationBase(nx,ny,ns, nb, emin,emax),eta2InterpolationBase(nx,ny,ns, nb, emin,emax),etaInterpolationPosXY(nx,ny,ns, nb, emin,emax){
|
||||
// cout << "e2pxy " << nb << " " << emin << " " << emax << endl;
|
||||
};
|
||||
|
||||
eta2InterpolationPosXY(eta2InterpolationPosXY *orig): etaInterpolationBase(orig), etaInterpolationPosXY(orig) {};
|
||||
|
||||
virtual eta2InterpolationPosXY* Clone() { return new eta2InterpolationPosXY(this);};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
class eta3InterpolationPosXY : public virtual eta3InterpolationBase, public virtual etaInterpolationPosXY {
|
||||
public:
|
||||
eta3InterpolationPosXY(int nx=400, int ny=400, int ns=25, int nb=-1, double emin=1, double emax=0) : etaInterpolationBase(nx,ny,ns, nb, emin,emax),eta3InterpolationBase(nx,ny,ns, nb, emin,emax), etaInterpolationPosXY(nx,ny,ns, nb, emin,emax){
|
||||
|
||||
@@ -56,18 +56,30 @@ hint=new TH2F("hint","hint",ns*nx, 0, nx, ns*ny, 0, ny);
|
||||
#endif
|
||||
|
||||
#ifndef MYROOT1
|
||||
hint=new int[nSubPixels*nPixelsX*nSubPixels*nPixelsY];
|
||||
memcpy(hint, orig->hint,nSubPixels*nPixelsX*nSubPixels*nPixelsY*sizeof(int));
|
||||
hint=new int[nSubPixels*nPixelsX*nSubPixels*nPixelsY];
|
||||
memcpy(hint, orig->hint,nSubPixels*nPixelsX*nSubPixels*nPixelsY*sizeof(int));
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
virtual int setId(int i) {id=i; return id;};
|
||||
|
||||
virtual slsInterpolation* Clone() = 0;
|
||||
virtual slsInterpolation* Clone() =0; /*{
|
||||
return new slsInterpolation(this);
|
||||
}*/
|
||||
|
||||
int getNSubPixels() {return nSubPixels;};
|
||||
|
||||
|
||||
int setNSubPixels(int ns) {
|
||||
if (ns>0 && ns!=nSubPixels) {
|
||||
delete [] hint;
|
||||
nSubPixels=ns;
|
||||
hint=new int[nSubPixels*nPixelsX*nSubPixels*nPixelsY];
|
||||
}
|
||||
return nSubPixels;
|
||||
}
|
||||
|
||||
int getImageSize(int &nnx, int &nny, int &ns) {
|
||||
nnx=nSubPixels*nPixelsX;
|
||||
nny=nSubPixels*nPixelsY;
|
||||
@@ -187,6 +199,8 @@ hint=new TH2F("hint","hint",ns*nx, 0, nx, ns*ny, 0, ny);
|
||||
virtual int *getFlatField(int &nb, double &emin, double &emax){nb=0; emin=0; emax=0; return getFlatField();};
|
||||
#endif
|
||||
|
||||
virtual void resetFlatField()=0;
|
||||
|
||||
//virtual void Streamer(TBuffer &b);
|
||||
|
||||
static int calcQuad(int *cl, double &sum, double &totquad, double sDum[2][2]){
|
||||
|
||||
Reference in New Issue
Block a user