mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +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;
|
||||
uint32_t flagsum = 0;
|
||||
|
||||
for (const auto &it : dataProcessor) {
|
||||
for (const auto &it : listener) {
|
||||
flagsum += it->GetStartedFlag();
|
||||
currentFrameIndex =
|
||||
std::min(currentFrameIndex, it->GetProcessedIndex());
|
||||
currentFrameIndex = std::max(currentFrameIndex, it->GetListenedIndex());
|
||||
}
|
||||
// no data processed
|
||||
if (flagsum != dataProcessor.size()) {
|
||||
if (flagsum != listener.size()) {
|
||||
currentFrameIndex = -1;
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,10 @@ bool Listener::GetStartedFlag() { return startedFlag; }
|
||||
|
||||
uint64_t Listener::GetCurrentFrameIndex() { return currentFrameIndex; }
|
||||
|
||||
uint64_t Listener::GetListenedIndex() {
|
||||
return currentFrameIndex_ - firstIndex_;
|
||||
}
|
||||
|
||||
void Listener::SetFifo(Fifo *f) { fifo = f; }
|
||||
|
||||
void Listener::ResetParametersforNewAcquisition() {
|
||||
|
@ -70,6 +70,8 @@ class Listener : private virtual slsDetectorDefs, public ThreadObject {
|
||||
bool GetStartedFlag();
|
||||
|
||||
uint64_t GetCurrentFrameIndex();
|
||||
/** (-1 if no frames have been caught) */
|
||||
uint64_t GetListenedIndex();
|
||||
|
||||
/**
|
||||
* Set Fifo pointer to the one given
|
||||
|
Loading…
x
Reference in New Issue
Block a user