mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-08-01 02:13:39 +02:00
removed ctb state check
This commit is contained in:
@@ -14,13 +14,12 @@ namespace sls {
|
||||
namespace acq = sls::test::acquire;
|
||||
namespace checks = sls::test::checks;
|
||||
|
||||
void acquire_and_check_file_size(
|
||||
Detector &det, const acq::CTBState &ctb_state = acq::default_ctb_state()) {
|
||||
void acquire_and_check_file_size(Detector &det) {
|
||||
auto acq_state = acq::default_acquisition_state();
|
||||
acq_state.num_frames = 2;
|
||||
auto file_state = acq::default_file_state();
|
||||
acq::run(det, acq_state, file_state, ctb_state);
|
||||
auto image_size = acq::get_expected_image_size(det, ctb_state);
|
||||
acq::run(det, acq_state, file_state);
|
||||
auto image_size = acq::get_expected_image_size(det);
|
||||
REQUIRE_NOTHROW(
|
||||
checks::check_binary_file_size(image_size, acq_state.num_frames));
|
||||
}
|
||||
@@ -44,91 +43,91 @@ void test_ctb_binary_file_size(Detector &det) {
|
||||
// trans mask = 0x3
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.dbit_reorder = true;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.dbit_offset = 16;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_reorder = true;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.dbit_reorder = true;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_reorder = true;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::DIGITAL_AND_TRANSCEIVER;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::DIGITAL_AND_TRANSCEIVER;
|
||||
ctb_state.dbit_offset = 16;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::DIGITAL_AND_TRANSCEIVER;
|
||||
ctb_state.dbit_reorder = true;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::DIGITAL_AND_TRANSCEIVER;
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_reorder = true;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::DIGITAL_AND_TRANSCEIVER;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::DIGITAL_AND_TRANSCEIVER;
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::DIGITAL_AND_TRANSCEIVER;
|
||||
ctb_state.dbit_reorder = true;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
@@ -136,51 +135,51 @@ void test_ctb_binary_file_size(Detector &det) {
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_reorder = true;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::TRANSCEIVER_ONLY;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::TRANSCEIVER_ONLY;
|
||||
ctb_state.dbit_reorder = true;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::TRANSCEIVER_ONLY;
|
||||
ctb_state.dbit_offset = 16;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::TRANSCEIVER_ONLY;
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_reorder = true;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::TRANSCEIVER_ONLY;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::TRANSCEIVER_ONLY;
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::TRANSCEIVER_ONLY;
|
||||
ctb_state.dbit_reorder = true;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
@@ -188,14 +187,14 @@ void test_ctb_binary_file_size(Detector &det) {
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_reorder = true;
|
||||
ctb_state.dbit_list.clear();
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
{
|
||||
acq::CTBStateGuard ctb_guard(det, ctb_state);
|
||||
ctb_state.readout_mode = defs::ANALOG_ONLY;
|
||||
ctb_state.dbit_offset = 16;
|
||||
ctb_state.dbit_reorder = true;
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det, ctb_state));
|
||||
REQUIRE_NOTHROW(acquire_and_check_file_size(det));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
|
||||
#include "Acquire.h"
|
||||
#include "CTBState.h"
|
||||
#include "FileState.h"
|
||||
|
||||
#include "catch.hpp"
|
||||
@@ -34,11 +33,6 @@ void run_acquisition(Detector &det) {
|
||||
|
||||
void run(Detector &det, const AcquisitionState &acq_state,
|
||||
const FileState &file_state) {
|
||||
run(det, acq_state, file_state, default_ctb_state());
|
||||
}
|
||||
|
||||
void run(Detector &det, const AcquisitionState &acq_state,
|
||||
const FileState &file_state, const CTBState &ctb_state) {
|
||||
FileStateGuard file_guard(det, file_state);
|
||||
AcquisitionStateGuard acq_guard(det, acq_state);
|
||||
run_acquisition(det);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
namespace sls::test::acquire {
|
||||
|
||||
class FileState;
|
||||
class CTBState;
|
||||
|
||||
// at the moment, only number of frames
|
||||
struct AcquisitionState {
|
||||
@@ -56,7 +55,5 @@ void wait_until_idle(const Detector &det);
|
||||
void run_acquisition(Detector &det);
|
||||
void run(Detector &det, const AcquisitionState &acq_state,
|
||||
const FileState &file_state);
|
||||
void run(Detector &det, const AcquisitionState &acq_state,
|
||||
const FileState &file_state, const CTBState &ctb_state);
|
||||
|
||||
} // namespace sls::test::acquire
|
||||
Reference in New Issue
Block a user