mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 07:20:01 +02:00
progress also depends on listener index now
This commit is contained in:
parent
0d0429983b
commit
28fe6eadb5
@ -462,13 +462,12 @@ double Implementation::getProgress() const {
|
|||||||
uint64_t currentFrameIndex = -1;
|
uint64_t currentFrameIndex = -1;
|
||||||
uint32_t flagsum = 0;
|
uint32_t flagsum = 0;
|
||||||
|
|
||||||
for (const auto &it : dataProcessor) {
|
for (const auto &it : listener) {
|
||||||
flagsum += it->GetStartedFlag();
|
flagsum += it->GetStartedFlag();
|
||||||
currentFrameIndex =
|
currentFrameIndex = std::max(currentFrameIndex, it->GetListenedIndex());
|
||||||
std::min(currentFrameIndex, it->GetProcessedIndex());
|
|
||||||
}
|
}
|
||||||
// no data processed
|
// no data processed
|
||||||
if (flagsum != dataProcessor.size()) {
|
if (flagsum != listener.size()) {
|
||||||
currentFrameIndex = -1;
|
currentFrameIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,10 @@ bool Listener::GetStartedFlag() { return startedFlag; }
|
|||||||
|
|
||||||
uint64_t Listener::GetCurrentFrameIndex() { return currentFrameIndex; }
|
uint64_t Listener::GetCurrentFrameIndex() { return currentFrameIndex; }
|
||||||
|
|
||||||
|
uint64_t Listener::GetListenedIndex() {
|
||||||
|
return currentFrameIndex_ - firstIndex_;
|
||||||
|
}
|
||||||
|
|
||||||
void Listener::SetFifo(Fifo *f) { fifo = f; }
|
void Listener::SetFifo(Fifo *f) { fifo = f; }
|
||||||
|
|
||||||
void Listener::ResetParametersforNewAcquisition() {
|
void Listener::ResetParametersforNewAcquisition() {
|
||||||
|
@ -70,6 +70,8 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
|||||||
bool GetStartedFlag();
|
bool GetStartedFlag();
|
||||||
|
|
||||||
uint64_t GetCurrentFrameIndex();
|
uint64_t GetCurrentFrameIndex();
|
||||||
|
/** (-1 if no frames have been caught) */
|
||||||
|
uint64_t GetListenedIndex();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Fifo pointer to the one given
|
* Set Fifo pointer to the one given
|
||||||
|
Loading…
x
Reference in New Issue
Block a user