mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
mutli.cpp updated half (without masking multi error and no check on detectors boundaries for adding exceptions later. done upto savecalibrationfile
This commit is contained in:
parent
251a7c2446
commit
1c70f9ec65
@ -22,12 +22,6 @@ public:
|
||||
std::string GetMessage() const { return "Shared Memory Failed";};
|
||||
};
|
||||
|
||||
struct ThreadpoolException : public SlsDetectorPackageExceptions {
|
||||
public:
|
||||
ThreadpoolException() {}
|
||||
std::string GetMessage() const { return "Threadpool Failed";};
|
||||
};
|
||||
|
||||
struct SocketException : public SlsDetectorPackageExceptions {
|
||||
public:
|
||||
SocketException() {}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -97,12 +97,6 @@ private:
|
||||
/** timer values */
|
||||
int64_t timerValue[MAX_TIMERS];
|
||||
|
||||
/** detector settings (standard, fast, etc.) */
|
||||
detectorSettings currentSettings;
|
||||
|
||||
/** detector threshold (eV) */
|
||||
int currentThresholdEV;
|
||||
|
||||
/** threaded processing flag (i.e. if data are processed and written to
|
||||
* file in a separate thread) */
|
||||
int threadedProcessing;
|
||||
@ -149,12 +143,17 @@ public:
|
||||
*/
|
||||
void setupMultiDetector(bool verify = true, bool update = true);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Loop through the detectors serially
|
||||
* and return a vector of results
|
||||
*/
|
||||
template <typename RT, typename... CT>
|
||||
std::vector<RT> serialCall(RT (slsDetector::*somefunc)(CT...), CT... Args);
|
||||
|
||||
/**
|
||||
* Loop through the detectors in parallel threads
|
||||
* and return a vector of results
|
||||
*/
|
||||
template <typename RT, typename... CT>
|
||||
std::vector<RT> parallelCall(RT (slsDetector::*somefunc)(CT...), CT... Args);
|
||||
|
||||
@ -167,8 +166,6 @@ public:
|
||||
*/
|
||||
std::string concatResultOrPos(std::string (slsDetector::*somefunc)(int), int pos);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Decodes which detector and the corresponding channel numbers for it
|
||||
* Mainly useful in a multi detector setROI (Gotthard, Mythen?)
|
||||
@ -261,7 +258,7 @@ public:
|
||||
/**
|
||||
* Free shared memory and delete shared memory structure
|
||||
* occupied by the sharedMultiSlsDetector structure
|
||||
* Clears all the vectors and destroys threadpool to bring
|
||||
* Clears all the vectors and bring
|
||||
* object back to state before object creation amap
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
@ -391,18 +388,16 @@ public:
|
||||
/**
|
||||
* Get Detector offset from shared memory in dimension d
|
||||
* @param d dimension d
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns offset in dimension d, -1 if pos is not an actual position in list
|
||||
*/
|
||||
int getDetectorOffset(dimension d, int detPos = -1);
|
||||
int getDetectorOffset(dimension d);
|
||||
|
||||
/**
|
||||
* Set Detector offset in shared memory in dimension d
|
||||
* @param d dimension d
|
||||
* @param off offset for detector
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void setDetectorOffset(dimension d, int off, int detPos = -1);
|
||||
void setDetectorOffset(dimension d, int off);
|
||||
|
||||
/**
|
||||
* Updates the channel offsets in X and Y dimension for all the sls detectors
|
||||
@ -1236,13 +1231,6 @@ public:
|
||||
*/
|
||||
int getFramesCaughtByReceiver(int detPos = -1);
|
||||
|
||||
/**
|
||||
* Gets the number of frames caught by any one receiver (to avoid using threadpool)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns number of frames caught by any one receiver (master receiver if exists)
|
||||
*/
|
||||
int getFramesCaughtByAnyReceiver(int detPos = -1);
|
||||
|
||||
/**
|
||||
* Gets the current frame index of receiver
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
@ -1614,9 +1602,6 @@ private:
|
||||
/** mutex to synchronize slsdetector threads */
|
||||
pthread_mutex_t ms;
|
||||
|
||||
/** true if post processing thread is enabled */
|
||||
int threadedProcessing;
|
||||
|
||||
/** sets when the acquisition is finished */
|
||||
int jointhread;
|
||||
|
||||
|
@ -124,7 +124,10 @@ public:
|
||||
} \
|
||||
del=1; \
|
||||
} \
|
||||
|
||||
if (pos >= myDetector->getNumberOfDetectors()) { \
|
||||
std::cout << "position is out of bounds." << std::endl; \
|
||||
return; \
|
||||
} \
|
||||
// call multi detector command line
|
||||
myCmd=new multiSlsDetectorCommand(myDetector); \
|
||||
try { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user