mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-08 19:10:42 +02:00
minor
This commit is contained in:
parent
1895ee1ebe
commit
e921dbb6a7
@ -138,7 +138,7 @@ int multiSlsDetector::decodeNChannel(int offsetX, int offsetY, int& channelX, in
|
|||||||
std::string multiSlsDetector::getErrorMessage(int& critical, int detPos) {
|
std::string multiSlsDetector::getErrorMessage(int& critical, int detPos) {
|
||||||
int64_t multiMask = 0, slsMask = 0;
|
int64_t multiMask = 0, slsMask = 0;
|
||||||
std::string retval = "";
|
std::string retval = "";
|
||||||
char sNumber[100];
|
// char sNumber[100];
|
||||||
critical = 0;
|
critical = 0;
|
||||||
size_t posmin = 0, posmax = detectors.size();
|
size_t posmin = 0, posmax = detectors.size();
|
||||||
|
|
||||||
@ -184,15 +184,15 @@ std::string multiSlsDetector::getErrorMessage(int& critical, int detPos) {
|
|||||||
if ((multiMask & (1 << idet)) || (detPos >= 0)) {
|
if ((multiMask & (1 << idet)) || (detPos >= 0)) {
|
||||||
|
|
||||||
//append detector id
|
//append detector id
|
||||||
sprintf(sNumber, "%ld", idet);
|
// sprintf(sNumber, "%ld", idet);
|
||||||
retval.append("Detector " + std::string(sNumber) + std::string(":\n"));
|
retval.append("Detector " + std::to_string(idet) + std::string(":\n"));
|
||||||
|
|
||||||
//get sls det error mask
|
//get sls det error mask
|
||||||
slsMask = detectors[idet]->getErrorMask();
|
slsMask = detectors[idet]->getErrorMask();
|
||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
//append sls det error mask
|
//append sls det error mask
|
||||||
sprintf(sNumber, "0x%lx", slsMask);
|
// sprintf(sNumber, "0x%lx", slsMask);
|
||||||
retval.append("Error Mask " + std::string(sNumber) + std::string("\n"));
|
retval.append("Error Mask " + std::to_string(slsMask) + std::string("\n"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//get the error critical level
|
//get the error critical level
|
||||||
@ -236,7 +236,7 @@ void multiSlsDetector::setAcquiringFlag(bool b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool multiSlsDetector::getAcquiringFlag() {
|
bool multiSlsDetector::getAcquiringFlag() const {
|
||||||
return thisMultiDetector->acquiringFlag;
|
return thisMultiDetector->acquiringFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3969,7 +3969,6 @@ int multiSlsDetector::setThreadedProcessing(int enable) {
|
|||||||
|
|
||||||
|
|
||||||
void multiSlsDetector::startProcessingThread() {
|
void multiSlsDetector::startProcessingThread() {
|
||||||
|
|
||||||
setTotalProgress();
|
setTotalProgress();
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout << "start thread stuff" << std::endl;
|
std::cout << "start thread stuff" << std::endl;
|
||||||
@ -3988,19 +3987,14 @@ void multiSlsDetector::startProcessingThread() {
|
|||||||
/* Initialize and set thread detached attribute */
|
/* Initialize and set thread detached attribute */
|
||||||
pthread_attr_init(&tattr);
|
pthread_attr_init(&tattr);
|
||||||
pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE);
|
pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE);
|
||||||
|
pthread_setschedparam(pthread_self(), policy, &mparam);
|
||||||
ret = pthread_setschedparam(pthread_self(), policy, &mparam);
|
|
||||||
|
|
||||||
|
|
||||||
ret = pthread_create(&dataProcessingThread, &tattr,startProcessData, (void*)this);
|
ret = pthread_create(&dataProcessingThread, &tattr,startProcessData, (void*)this);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
printf("ret %d\n", ret);
|
printf("ret %d\n", ret);
|
||||||
|
|
||||||
pthread_attr_destroy(&tattr);
|
pthread_attr_destroy(&tattr);
|
||||||
|
|
||||||
// scheduling parameters of target thread
|
// scheduling parameters of target thread
|
||||||
ret = pthread_setschedparam(dataProcessingThread, policy, ¶m);
|
pthread_setschedparam(dataProcessingThread, policy, ¶m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ public:
|
|||||||
* Get acquiring flag from shared memory
|
* Get acquiring flag from shared memory
|
||||||
* @returns acquiring flag
|
* @returns acquiring flag
|
||||||
*/
|
*/
|
||||||
bool getAcquiringFlag();
|
bool getAcquiringFlag() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if acquiring flag is set, set error if set
|
* Check if acquiring flag is set, set error if set
|
||||||
|
Loading…
x
Reference in New Issue
Block a user