From 22f20507dbc9ba07f7ecc2a2fb099ffd903724ca Mon Sep 17 00:00:00 2001 From: bergamaschi Date: Mon, 16 Dec 2013 16:01:20 +0000 Subject: [PATCH] Some improved documentation git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@15 113b152e-814d-439b-b186-022a431db7b5 --- .../commonModeSubtraction.h | 7 +++-- slsDetectorCalibration/doxy.config | 2 +- slsDetectorCalibration/moenchReadData.C | 30 ++++++++++--------- slsDetectorCalibration/singlePhotonDetector.h | 5 ++-- slsDetectorCalibration/slsDetectorData.h | 4 +-- slsDetectorCalibration/slsReceiverData.h | 6 ++-- 6 files changed, 30 insertions(+), 24 deletions(-) diff --git a/slsDetectorCalibration/commonModeSubtraction.h b/slsDetectorCalibration/commonModeSubtraction.h index f68738d35..04a014418 100644 --- a/slsDetectorCalibration/commonModeSubtraction.h +++ b/slsDetectorCalibration/commonModeSubtraction.h @@ -37,7 +37,9 @@ class commonModeSubtraction { }}; /** adds the pixel to the sum of pedestals -- virtual func must be overloaded to define the regions of interest - \param ix region of interest index + \param val value to add + \param ix pixel x coordinate + \param iy pixel y coordinate */ virtual void addToCommonMode(double val, int ix=0, int iy=0) { (void) ix; (void) iy; @@ -48,7 +50,8 @@ class commonModeSubtraction { }; /** gets the common mode i.e. the difference between the current average sum of pedestals mode and the average pedestal -- virtual func must be overloaded to define the regions of interest - \param isc region of interest index + \param ix pixel x coordinate + \param iy pixel y coordinate \return the difference between the current average sum of pedestals and the average pedestal */ virtual double getCommonMode(int ix=0, int iy=0) { diff --git a/slsDetectorCalibration/doxy.config b/slsDetectorCalibration/doxy.config index 66307cc55..b81d49e48 100644 --- a/slsDetectorCalibration/doxy.config +++ b/slsDetectorCalibration/doxy.config @@ -80,6 +80,6 @@ LATEX_HIDE_INDICES = YES PREDEFINED = __cplusplus -INPUT = MovingStat.h slsDetectorData.h slsReceiverData.h moench02ModuleData.h pedestalSubtraction.h commonModeSubtraction.h moenchCommonMode.h singlePhotonDetector.h energyCalibration.h moenchReadData.C +INPUT = MovingStat.h slsDetectorData.h slsReceiverData.h moench02ModuleData.h pedestalSubtraction.h commonModeSubtraction.h moenchCommonMode.h singlePhotonDetector.h energyCalibration.h moenchReadData.C single_photon_hit.h OUTPUT_DIRECTORY = docs diff --git a/slsDetectorCalibration/moenchReadData.C b/slsDetectorCalibration/moenchReadData.C index 337f13c2d..a948c3e2c 100644 --- a/slsDetectorCalibration/moenchReadData.C +++ b/slsDetectorCalibration/moenchReadData.C @@ -33,20 +33,22 @@ using namespace std; /** - \param fformat, file name format - \param tit, title of the tree etc. - \param runmin, minimum run number - \param runmax, max run number - \param nbins=1500, number of bins for spectrum hists - \param hmin=-500, minimum for spectrum hists - \param hmax=1000, maximum for spectrum hists - \param sign=1, sign of the spectrum to find hits - \param hc=0, readout correlation coefficient with previous pixel - \param xmin=0, minimum x coordinate - \param xmax=NC, maximum x coordinate - \param ymin=0, minimum y coordinate - \param ymax=NR, maximum y coordinate - \param cmsub=0 enable commonmode subtraction +Loops over data file to find single photons, fills the tree (and writes it to file, althoug the root file should be opened before) and creates 1x1, 2x2, 3x3 cluster histograms with ADCu on the x axis, channel number (160*x+y) on the y axis. + + \param fformat file name format + \param tit title of the tree etc. + \param runmin minimum run number + \param runmax max run number + \param nbins number of bins for spectrum hists + \param hmin histo minimum for spectrum hists + \param hmax histo maximum for spectrum hists + \param sign sign of the spectrum to find hits + \param hc readout correlation coefficient with previous pixel + \param xmin minimum x coordinate + \param xmax maximum x coordinate + \param ymin minimum y coordinate + \param ymax maximum y coordinate + \param cmsub enable commonmode subtraction \returns pointer to histo stack with cluster spectra */ diff --git a/slsDetectorCalibration/singlePhotonDetector.h b/slsDetectorCalibration/singlePhotonDetector.h index 78c6e1ea2..03d2585d8 100644 --- a/slsDetectorCalibration/singlePhotonDetector.h +++ b/slsDetectorCalibration/singlePhotonDetector.h @@ -44,9 +44,10 @@ class singlePhotonDetector { /** Constructor (no error checking if datasize and offsets are compatible!) - \param s detector data structure to be used + \param d detector data structure to be used \param csize cluster size (should be an odd number). Defaults to 3 \param nsigma number of rms to discriminate from the noise. Defaults to 5 + \param sign 1 if photons are positive, -1 if negative \param cm common mode subtraction algorithm, if any. Defaults to NULL i.e. none \param nped number of samples for pedestal averaging \param nd number of dark frames to average as pedestals without photon discrimination at the beginning of the measurement @@ -269,7 +270,7 @@ class singlePhotonDetector { #ifdef MYROOT1 /** generates a tree and maps the branches \param tname name for the tree - \param iframe pointer to the frame number + \param iFrame pointer to the frame number \returns returns pointer to the TTree */ TTree *initEventTree(char *tname, int *iFrame=NULL) { diff --git a/slsDetectorCalibration/slsDetectorData.h b/slsDetectorCalibration/slsDetectorData.h index c28e447aa..c4c5a6f32 100644 --- a/slsDetectorCalibration/slsDetectorData.h +++ b/slsDetectorCalibration/slsDetectorData.h @@ -148,8 +148,8 @@ class slsDetectorData { /** Returns detector size in x,y - \param nx reference to number of channels in x - \param ny reference to number of channels in y (will be 1 for strips) + \param npx reference to number of channels in x + \param npy reference to number of channels in y (will be 1 for strips) \returns total number of channels */ int getDetectorSize(int &npx, int &npy){npx=nx; npy=ny; return nx*ny;}; diff --git a/slsDetectorCalibration/slsReceiverData.h b/slsDetectorCalibration/slsReceiverData.h index 67d3cf51f..a7f10dc21 100644 --- a/slsDetectorCalibration/slsReceiverData.h +++ b/slsDetectorCalibration/slsReceiverData.h @@ -56,13 +56,13 @@ class slsReceiverData : public slsDetectorData { Loops over a memory slot until a complete frame is found (i.e. all packets 0 to nPackets, same frame number). Can be overloaded for different kind of detectors! \param data pointer to the memory to be analyzed - \param ndata + \param ndata size of frame returned \param dsize size of the memory slot to be analyzed \returns pointer to the first packet of the last good frame (might be incomplete if npackets lower than the number of packets), or NULL if no frame is found */ - virtual char *findNextFrame(char *data, int &npackets, int dsize) { + virtual char *findNextFrame(char *data, int &ndata, int dsize) { char *retval=NULL, *p=data; int dd=0; int fn, fnum=-1, np=0, pnum=-1; @@ -103,7 +103,7 @@ class slsReceiverData : public slsDetectorData { cout << "Too few packets for this frame! "<< fnum << " " << pnum << endl; } - npackets=np*packetSize; + ndata=np*packetSize; return retval; };