reverted singlephotondetector and slreceiverdata

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@51 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
l_maliakal_d 2014-04-10 12:48:55 +00:00
parent f8aeb91752
commit c352fbec21
2 changed files with 112 additions and 109 deletions

View File

@ -345,10 +345,14 @@ class singlePhotonDetector {
char tit[100]; char tit[100];
sprintf(tit,"data[%d]/D",clusterSize*clusterSizeY); sprintf(tit,"data[%d]/D",clusterSize*clusterSizeY);
tall->Branch("data",cluster->data,tit); tall->Branch("data",cluster->data,tit);
// tall->Branch("pedestal",&(cluster->ped),"pedestal/D"); tall->Branch("pedestal",&(cluster->ped),"pedestal/D");
// tall->Branch("rms",&(cluster->rms),"rms/D"); tall->Branch("rms",&(cluster->rms),"rms/D");
return tall; return tall;
}; };
#else
/** write cluster to filer*/
void writeCluster(FILE* myFile){cluster->write(myFile);};
#endif #endif

View File

@ -7,7 +7,7 @@ template <class dataType>
class slsReceiverData : public slsDetectorData<dataType> { class slsReceiverData : public slsDetectorData<dataType> {
public: public:
/** /**
slsReceiver data structure. Works for data acquired using the slsDetectorReceiver subdivided in different packets with headers and footers. slsReceiver data structure. Works for data acquired using the slsDetectorReceiver subdivided in different packets with headers and footers.
@ -26,7 +26,6 @@ class slsReceiverData : public slsDetectorData<dataType> {
slsReceiverData(int npx, int npy, int np, int psize, int **dMap=NULL, dataType **dMask=NULL, int **dROI=NULL): slsDetectorData<dataType>(npx, npy, np*psize, dMap, dMask, dROI), nPackets(np), packetSize(psize) {}; slsReceiverData(int npx, int npy, int np, int psize, int **dMap=NULL, dataType **dMask=NULL, int **dROI=NULL): slsDetectorData<dataType>(npx, npy, np*psize, dMap, dMask, dROI), nPackets(np), packetSize(psize) {};
/** /**
Returns the frame number for the given dataset. Virtual func: works for slsDetectorReceiver data (also for each packet), but can be overloaded. Returns the frame number for the given dataset. Virtual func: works for slsDetectorReceiver data (also for each packet), but can be overloaded.
@ -45,7 +44,7 @@ class slsReceiverData : public slsDetectorData<dataType> {
*/ */
virtual int getPacketNumber(char *buff) {return (*(int*)buff)&0xff;}; virtual int getPacketNumber(char *buff){return (*(int*)buff)&0xff;};
@ -74,11 +73,11 @@ class slsReceiverData : public slsDetectorData<dataType> {
retval=NULL; retval=NULL;
np=0; np=0;
} else if (pnum==1) { } else if (pnum==1) {
fnum=fn;
retval=p; retval=p;
if (np>0) if (np>0)
/*cout << "*Incomplete frame number " << fnum << endl;*/ /*cout << "*Incomplete frame number " << fnum << endl;*/
np=0; np=0;
fnum=fn;
} else if (fn!=fnum) { } else if (fn!=fnum) {
if (fnum!=-1) { if (fnum!=-1) {
/* cout << " **Incomplete frame number " << fnum << " pnum " << pnum << " " << getFrameNumber(p) << endl;*/ /* cout << " **Incomplete frame number " << fnum << " pnum " << pnum << " " << getFrameNumber(p) << endl;*/
@ -162,7 +161,7 @@ class slsReceiverData : public slsDetectorData<dataType> {
private: private:
const int nPackets; /**<number of UDP packets constituting one frame */ const int nPackets; /**<number of UDP packets constituting one frame */
const int packetSize; /**< size of a udp packet */ const int packetSize; /**< size of a udp packet */
}; };