mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
corrected Makefile target install_inc
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@708 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
a485e33e82
commit
3fa2fe5392
@ -82,6 +82,6 @@ install: package
|
|||||||
|
|
||||||
install_inc:
|
install_inc:
|
||||||
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
|
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
|
||||||
cp -P slsDetector/slsDetectorUsers.h slsDetectorAnalysis/detectorData.h $(DESTDIR) slsReceiver/slsReceiverUsers.h
|
cp -P slsDetector/slsDetectorUsers.h slsDetectorAnalysis/detectorData.h $(DESTDIR) slsReceiver/slsReceiverUsers.h $(DESTDIR)
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,13 +16,12 @@ singlePhotonFilter::singlePhotonFilter(int nx, int ny,
|
|||||||
int16_t *m, int16_t *s, CircularFifo<char>* f, int d, int* tfcaught, int* fcaught,uint32_t* cframenum):
|
int16_t *m, int16_t *s, CircularFifo<char>* f, int d, int* tfcaught, int* fcaught,uint32_t* cframenum):
|
||||||
#ifdef MYROOT1
|
#ifdef MYROOT1
|
||||||
myTree(NULL),
|
myTree(NULL),
|
||||||
myFile(NULL),
|
|
||||||
#else
|
#else
|
||||||
myFile(NULL),
|
|
||||||
|
|
||||||
nHitsPerFile(0),
|
nHitsPerFile(0),
|
||||||
nTotalHits(0),
|
nTotalHits(0),
|
||||||
#endif
|
#endif
|
||||||
|
myFile(NULL),
|
||||||
nHitsPerFrame(0),
|
nHitsPerFrame(0),
|
||||||
nChannelsX(nx),
|
nChannelsX(nx),
|
||||||
nChannelsY(ny),
|
nChannelsY(ny),
|
||||||
@ -67,6 +66,9 @@ singlePhotonFilter::singlePhotonFilter(int nx, int ny,
|
|||||||
#ifndef MYROOT1
|
#ifndef MYROOT1
|
||||||
//photonHitList=(single_photon_hit**) (new int*[nChannelsX*nChannelsY/(nClusterX*nClusterY)*1000]);
|
//photonHitList=(single_photon_hit**) (new int*[nChannelsX*nChannelsY/(nClusterX*nClusterY)*1000]);
|
||||||
photonHitList=new single_photon_hit*[nChannelsX*nChannelsY/(nClusterX*nClusterY)*1000];
|
photonHitList=new single_photon_hit*[nChannelsX*nChannelsY/(nClusterX*nClusterY)*1000];
|
||||||
|
for (int ii=0; ii<nChannelsX*nChannelsY/(nClusterX*nClusterY)*1000; ii++)
|
||||||
|
photonHitList[ii]=new single_photon_hit(nClusterX, nClusterY);
|
||||||
|
cout << nClusterX << " " << nClusterY << " " << nClusterX*nClusterY << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sqrtCluster = sqrt(nClusterX*nClusterY);
|
sqrtCluster = sqrt(nClusterX*nClusterY);
|
||||||
@ -228,10 +230,10 @@ int singlePhotonFilter::writeToFile(){
|
|||||||
/*cout<<"writing "<< nHitsPerFrame << " hits to file" << endl;*/
|
/*cout<<"writing "<< nHitsPerFrame << " hits to file" << endl;*/
|
||||||
for (ii=0; ii<nHitsPerFrame; ii++) {
|
for (ii=0; ii<nHitsPerFrame; ii++) {
|
||||||
photonHitList[ii]->write(myFile);
|
photonHitList[ii]->write(myFile);
|
||||||
delete photonHitList[ii];
|
// delete photonHitList[ii];
|
||||||
}
|
}
|
||||||
delete photonHitList[ii];
|
// delete photonHitList[ii];
|
||||||
|
// photonHitList[0]=new single_photon_hit(nClusterX,nClusterY);
|
||||||
|
|
||||||
// fwrite((void*)(photonHitList), 1, sizeof(single_photon_hit)*nHitsPerFrame, myFile);
|
// fwrite((void*)(photonHitList), 1, sizeof(single_photon_hit)*nHitsPerFrame, myFile);
|
||||||
/*framesInFile += nHitsPerFrame;*/
|
/*framesInFile += nHitsPerFrame;*/
|
||||||
@ -412,10 +414,6 @@ int singlePhotonFilter::verifyFrame(char *inData){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void singlePhotonFilter::findHits(){
|
void singlePhotonFilter::findHits(){
|
||||||
int ir,ic,r,c,i;
|
int ir,ic,r,c,i;
|
||||||
int currentIndex;
|
int currentIndex;
|
||||||
@ -423,7 +421,7 @@ void singlePhotonFilter::findHits(){
|
|||||||
int clusterIndex;
|
int clusterIndex;
|
||||||
// single_photon_hit *hit;
|
// single_photon_hit *hit;
|
||||||
|
|
||||||
double* clusterData;// = hit.data;
|
double clusterData[nClusterX*nClusterY];// = hit.data;
|
||||||
double sigmarms;
|
double sigmarms;
|
||||||
double clusterrms;
|
double clusterrms;
|
||||||
double clusterped;
|
double clusterped;
|
||||||
@ -491,8 +489,7 @@ void singlePhotonFilter::findHits(){
|
|||||||
#endif
|
#endif
|
||||||
clusteriframe -= f0;
|
clusteriframe -= f0;
|
||||||
myData = (int16_t*)isData;
|
myData = (int16_t*)isData;
|
||||||
if (nHitsPerFrame==0)
|
|
||||||
photonHitList[nHitsPerFrame]=new single_photon_hit(nClusterX, nClusterY);
|
|
||||||
|
|
||||||
clusterData=photonHitList[nHitsPerFrame]->data;
|
clusterData=photonHitList[nHitsPerFrame]->data;
|
||||||
|
|
||||||
@ -566,7 +563,9 @@ void singlePhotonFilter::findHits(){
|
|||||||
#ifdef MYROOT1
|
#ifdef MYROOT1
|
||||||
myTree->Fill();
|
myTree->Fill();
|
||||||
#else
|
#else
|
||||||
// photonHitList[nHitsPerFrame].data = clusterData;
|
for (int ix=0; ix<nClusterX*nClusterY; ix++)
|
||||||
|
photonHitList[nHitsPerFrame]->data[ix] = clusterData[ix];
|
||||||
|
|
||||||
photonHitList[nHitsPerFrame]->x = ic;
|
photonHitList[nHitsPerFrame]->x = ic;
|
||||||
photonHitList[nHitsPerFrame]->y = ir;
|
photonHitList[nHitsPerFrame]->y = ir;
|
||||||
photonHitList[nHitsPerFrame]->rms = clusterrms;
|
photonHitList[nHitsPerFrame]->rms = clusterrms;
|
||||||
@ -575,7 +574,11 @@ void singlePhotonFilter::findHits(){
|
|||||||
//hit.write(myFile);
|
//hit.write(myFile);
|
||||||
|
|
||||||
nHitsPerFrame++;
|
nHitsPerFrame++;
|
||||||
photonHitList[nHitsPerFrame]=new single_photon_hit(nClusterX,nClusterY);
|
|
||||||
|
// cout << nHitsPerFrame << " " << nChannelsX*nChannelsY/(nClusterX*nClusterY)*1000 << endl;
|
||||||
|
|
||||||
|
// photonHitList[nHitsPerFrame]=new single_photon_hit(nClusterX,nClusterY);
|
||||||
|
// cout << "done" << endl;
|
||||||
nHitsPerFile++;
|
nHitsPerFile++;
|
||||||
nTotalHits++;
|
nTotalHits++;
|
||||||
if(nHitsPerFile >= MAX_HITS_PER_FILE-1)
|
if(nHitsPerFile >= MAX_HITS_PER_FILE-1)
|
||||||
@ -596,6 +599,7 @@ void singlePhotonFilter::findHits(){
|
|||||||
//write for each frame, not packet
|
//write for each frame, not packet
|
||||||
|
|
||||||
pthread_mutex_lock(&write_mutex);
|
pthread_mutex_lock(&write_mutex);
|
||||||
|
cout << "write to file " << nHitsPerFrame << endl;
|
||||||
writeToFile();
|
writeToFile();
|
||||||
pthread_mutex_unlock(&write_mutex);
|
pthread_mutex_unlock(&write_mutex);
|
||||||
|
|
||||||
@ -628,7 +632,7 @@ void singlePhotonFilter::findHits(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
delete [] clusterData;
|
// delete [] clusterData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,11 +21,12 @@ typedef int int32_t;
|
|||||||
class single_photon_hit {
|
class single_photon_hit {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
single_photon_hit(int nx, int ny): dx(nx), dy(ny) {data=new double[dx*dy];};
|
single_photon_hit(int nx, int ny=1): dx(nx), dy(ny) {data=new double[dx*dy];};
|
||||||
~single_photon_hit(){delete [] data;};
|
~single_photon_hit(){delete [] data;};
|
||||||
void write(FILE *myFile) {fwrite((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fwrite((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
void write(FILE *myFile) {fwrite((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fwrite((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
||||||
void read(FILE *myFile) {fread((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fread((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
void read(FILE *myFile) {fread((void*)this, 1, 3*sizeof(int)+2*sizeof(double), myFile); fread((void*)data, 1, dx*dy*sizeof(double), myFile);};
|
||||||
|
void set_data(double v, int ix, int iy=0){data[(iy+ny/2)*nx+ix+nx/2]=v;};
|
||||||
|
double get_data(int ix, int iy=0){return data[(iy+ny/2)*nx+ix+nx/2];};
|
||||||
|
|
||||||
|
|
||||||
int x; /**< x-coordinate of the center of hit */
|
int x; /**< x-coordinate of the center of hit */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user