mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-12 23:42:12 +02:00
small fixes, but bug introduced here '40895b0148
'
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
Some checks failed
CMake / Configure and build using cmake (push) Failing after 2s
This commit is contained in:
parent
0f4d10912b
commit
6c604e2340
@ -130,7 +130,7 @@ std::set<uint64_t> get_valid_fnums(const PortFrameMap &port_frame_map) {
|
|||||||
|
|
||||||
// collect all unique frame numbers from all ports
|
// collect all unique frame numbers from all ports
|
||||||
std::set<uint64_t> unique_fnums;
|
std::set<uint64_t> unique_fnums;
|
||||||
for (auto it = port_frame_map.begin(); it != port_frame_map.begin(); ++it) {
|
for (auto it = port_frame_map.begin(); it != port_frame_map.end(); ++it) {
|
||||||
const FrameMap &frame_map = it->second;
|
const FrameMap &frame_map = it->second;
|
||||||
for (auto frame = frame_map.begin(); frame != frame_map.end();
|
for (auto frame = frame_map.begin(); frame != frame_map.end();
|
||||||
++frame) {
|
++frame) {
|
||||||
@ -151,9 +151,10 @@ std::set<uint64_t> get_valid_fnums(const PortFrameMap &port_frame_map) {
|
|||||||
LOG(sls::logDEBUG)
|
LOG(sls::logDEBUG)
|
||||||
<< "Fnum " << fnum << " is missing in port " << port;
|
<< "Fnum " << fnum << " is missing in port " << port;
|
||||||
// invalid: fnum greater than all in that port
|
// invalid: fnum greater than all in that port
|
||||||
auto last_frame = std::prev(frame_map.end());
|
auto last_frame =
|
||||||
auto last_fnum = last_frame->first;
|
frame_map.upper_bound(fnum); // std::prev(frame_map.end());
|
||||||
if (fnum > last_fnum) {
|
// auto last_fnum = last_frame->first;
|
||||||
|
if (last_frame == frame_map.end()) { //(fnum > last_fnum) {
|
||||||
LOG(sls::logDEBUG) << "And no larger fnum found. Fnum "
|
LOG(sls::logDEBUG) << "And no larger fnum found. Fnum "
|
||||||
<< fnum << " is invalid.\n";
|
<< fnum << " is invalid.\n";
|
||||||
is_valid = false;
|
is_valid = false;
|
||||||
|
@ -234,6 +234,7 @@ with open(fname, 'w') as fp:
|
|||||||
traceback.print_exc(file=fp_error) # This will log the full traceback
|
traceback.print_exc(file=fp_error) # This will log the full traceback
|
||||||
|
|
||||||
testError = True
|
testError = True
|
||||||
|
cleanup(fp)
|
||||||
break
|
break
|
||||||
|
|
||||||
# redirect to terminal
|
# redirect to terminal
|
||||||
@ -248,5 +249,5 @@ with open(fname, 'w') as fp:
|
|||||||
sys.stdout = original_stdout
|
sys.stdout = original_stdout
|
||||||
sys.stderr = original_stderr
|
sys.stderr = original_stderr
|
||||||
Log(Fore.RED, f'Exception caught with general testing. Cleaning up...')
|
Log(Fore.RED, f'Exception caught with general testing. Cleaning up...')
|
||||||
cleanSharedmemory(sys.stdout)
|
cleanup(fp)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user