From 8387f70071c501ad13f92c646db950a32d297531 Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Fri, 26 Oct 2012 09:38:54 +0000 Subject: [PATCH] doxygen for slsReceiver and slsReceiverInterface git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@315 951219d9-93cf-4727-9268-0efd64621fa3 --- slsDetectorSoftware/doxy.config | 2 +- .../multiSlsDetector/multiSlsDetector.cpp | 15 +++++++-------- .../multiSlsDetector/multiSlsDetector.h | 2 +- slsDetectorSoftware/slsDetector/slsDetector.cpp | 2 +- slsDetectorSoftware/slsDetector/slsDetector.h | 2 +- .../slsDetector/slsDetectorCommand.cpp | 4 ++-- .../slsDetector/slsDetectorUtils.h | 5 ++++- .../slsReceiverInterface/receiverInterface.h | 7 +++++-- 8 files changed, 22 insertions(+), 17 deletions(-) diff --git a/slsDetectorSoftware/doxy.config b/slsDetectorSoftware/doxy.config index 44787dc88..8cd51ab33 100644 --- a/slsDetectorSoftware/doxy.config +++ b/slsDetectorSoftware/doxy.config @@ -80,7 +80,7 @@ LATEX_HIDE_INDICES = YES PREDEFINED = __cplusplus -INPUT = slsDetector/slsDetectorUsers.h slsDetector/slsDetectorBase.h commonFiles/sls_detector_defs.h slsDetector/slsDetector.h MySocketTCP/MySocketTCP.h usersFunctions/usersFunctions.h multiSlsDetector/multiSlsDetector.h commonFiles/sls_detector_defs.h slsDetector/slsDetectorUtils.h slsDetector/slsDetectorBase.h slsDetector/slsDetectorCommand.h slsDetector/slsDetectorActions.h multiSlsDetector/multiSlsDetector.h slsDetectorAnalysis/detectorData.h slsDetectorAnalysis/energyConversion.h slsDetectorAnalysis/postProcessing.h slsDetectorAnalysis/angularConversion.h slsDetectorAnalysis/fileIO.h multiSlsDetector/multiSlsDetectorClient.h multiSlsDetector/multiSlsDetectorCommand.h slsDetectorAnalysis/angularConversionStatic.h slsDetectorAnalysis/angleConversionConstant.h slsDetectorAnalysis/enCalLogClass.h slsDetectorAnalysis/angCalLogClass.h slsDetectorAnalysis/badChannelCorrections.h slsDetectorAnalysis/fileIOStatic.h +INPUT = slsDetector/slsDetectorUsers.h slsDetector/slsDetectorBase.h commonFiles/sls_detector_defs.h slsDetector/slsDetector.h MySocketTCP/MySocketTCP.h usersFunctions/usersFunctions.h multiSlsDetector/multiSlsDetector.h commonFiles/sls_detector_defs.h slsDetector/slsDetectorUtils.h slsDetector/slsDetectorBase.h slsDetector/slsDetectorCommand.h slsDetector/slsDetectorActions.h multiSlsDetector/multiSlsDetector.h slsDetectorAnalysis/detectorData.h slsDetectorAnalysis/energyConversion.h slsDetectorAnalysis/postProcessing.h slsDetectorAnalysis/angularConversion.h slsDetectorAnalysis/fileIO.h multiSlsDetector/multiSlsDetectorClient.h multiSlsDetector/multiSlsDetectorCommand.h slsDetectorAnalysis/angularConversionStatic.h slsDetectorAnalysis/angleConversionConstant.h slsDetectorAnalysis/enCalLogClass.h slsDetectorAnalysis/angCalLogClass.h slsDetectorAnalysis/badChannelCorrections.h slsDetectorAnalysis/fileIOStatic.h slsReceiverInterface/receiverInterface.h slsReceiver/slsReceiver_funcs.h slsReceiver/slsReceiverFunctionList.h OUTPUT_DIRECTORY = docs diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index b7f87694f..e02943bce 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -3673,15 +3673,14 @@ slsDetectorDefs::runStatus multiSlsDetector::getReceiverStatus(){ int multiSlsDetector::getFramesCaughtByReciver() { - int ret=-100,ret1; + int ret=0,ret1=0; for (int i=0; inumberOfDetectors; i++) - if (detectors[i]){ - ret1=detectors[i]->getFramesCaughtByReciver(); - if(ret==-100) - ret=ret1; - else if (ret!=ret1) - ret=-1; - } + if (detectors[i]) + ret1+=detectors[i]->getFramesCaughtByReceiver(); + + if(!thisMultiDetector->numberOfDetectors) + return ret; + ret=(int)(ret1/thisMultiDetector->numberOfDetectors); return ret; } diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h index 4aac1bb05..e45c0b5b9 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.h @@ -1076,7 +1076,7 @@ class multiSlsDetector : public slsDetectorUtils { /** gets the number of frames caught by receiver \returns number of frames caught by receiver */ - int getFramesCaughtByReciver(); + int getFramesCaughtByReceiver(); /** Locks/Unlocks the connection to the receiver /param lock sets (1), usets (0), gets (-1) the lock diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 6c47956b7..e909447be 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -5624,7 +5624,7 @@ slsDetectorDefs::runStatus slsDetector::getReceiverStatus(){ -int slsDetector::getFramesCaughtByReciver(){ +int slsDetector::getFramesCaughtByReceiver(){ int fnum=F_GET_FRAMES_CAUGHT; int ret = FAIL; int retval=-1; diff --git a/slsDetectorSoftware/slsDetector/slsDetector.h b/slsDetectorSoftware/slsDetector/slsDetector.h index 1357d6f10..32c721e0b 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.h +++ b/slsDetectorSoftware/slsDetector/slsDetector.h @@ -1452,7 +1452,7 @@ class slsDetector : public slsDetectorUtils, public energyConversion { /** gets the number of frames caught by receiver \returns number of frames caught by receiver */ - int getFramesCaughtByReciver(); + int getFramesCaughtByReceiver(); /** Locks/Unlocks the connection to the receiver /param lock sets (1), usets (0), gets (-1) the lock diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index f8b4e73ea..15cb352de 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -3517,7 +3517,7 @@ string slsDetectorCommand::cmdReceiver(int narg, char *args[], int action) { if (action==PUT_ACTION) return string("cannot put"); else{ - sprintf(answer,"%d",myDet->getFramesCaughtByReciver()); + sprintf(answer,"%d",myDet->getFramesCaughtByReceiver()); return string(answer); } } @@ -3535,7 +3535,7 @@ string slsDetectorCommand::helpReceiver(int narg, char *args[], int action) { os << "receiver [status] \t starts/stops the receiver to listen to detector packets. - can be start or stop" << std::endl; if (action==GET_ACTION || action==HELP_ACTION){ os << "receiver \t returns the status of receiver - can be running or idle" << std::endl; - os << "framescaught \t returns the number of frames caught by receiver" << std::endl; + os << "framescaught \t returns the number of frames caught by receiver(average for multi)" << std::endl; } return os.str(); diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h index 1aee9befd..d3eb74590 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUtils.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorUtils.h @@ -610,7 +610,10 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing { */ virtual string getFileName()=0; - + /** + \returns frames caught by receiver(average for multi) + */ + virtual int getFramesCaughtByReceiver()=0; protected: diff --git a/slsDetectorSoftware/slsReceiverInterface/receiverInterface.h b/slsDetectorSoftware/slsReceiverInterface/receiverInterface.h index f0f27d041..ce9dc40c2 100644 --- a/slsDetectorSoftware/slsReceiverInterface/receiverInterface.h +++ b/slsDetectorSoftware/slsReceiverInterface/receiverInterface.h @@ -17,7 +17,7 @@ /** - @short interface between sls detector and sls receiver + @short */ class receiverInterface{ @@ -35,7 +35,10 @@ public: */ virtual ~receiverInterface(); - + /** + * Set the datasocket + * @param socket the data socket + */ void setSocket(MySocketTCP *socket){dataSocket=socket;};