mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 10:00:40 +02:00
formatting
This commit is contained in:
parent
d44329117d
commit
91140bbb71
@ -861,7 +861,8 @@ void Detector::stopDetector(Positions pos) {
|
||||
// idle before stopping will return running (after async start script) when
|
||||
// getting status after, which will then be stopped again.
|
||||
|
||||
while (!status.contains_only(defs::runStatus::IDLE, defs::runStatus::STOPPED)){
|
||||
while (!status.contains_only(defs::runStatus::IDLE,
|
||||
defs::runStatus::STOPPED)) {
|
||||
if (status.any(defs::runStatus::ERROR)) {
|
||||
throw RuntimeError("Could not stop detector. At least one module "
|
||||
"returned error status.");
|
||||
|
@ -692,7 +692,8 @@ TEST_CASE("confadc", "[.cmd]") {
|
||||
const int ndet = det.size();
|
||||
const int nchip = 10;
|
||||
const int nadc = 32;
|
||||
std::vector<std::vector<std::vector<int>>> prev_val(ndet, std::vector<std::vector<int>>(nchip, std::vector<int>(nadc)));
|
||||
std::vector<std::vector<std::vector<int>>> prev_val(
|
||||
ndet, std::vector<std::vector<int>>(nchip, std::vector<int>(nadc)));
|
||||
for (int i = 0; i != ndet; ++i) {
|
||||
for (int j = 0; j != nchip; ++j) {
|
||||
for (int k = 0; k != nadc; ++k) {
|
||||
|
@ -196,24 +196,24 @@ TEST_CASE("String conversions") {
|
||||
"[{one: 1}, {one: 1, three: 3, two: 2}, {one: 1}]");
|
||||
}
|
||||
|
||||
TEST_CASE("Any element is equal"){
|
||||
Result<int> r{1,2,3,4,5};
|
||||
TEST_CASE("Any element is equal") {
|
||||
Result<int> r{1, 2, 3, 4, 5};
|
||||
REQUIRE(r.any(3));
|
||||
REQUIRE_FALSE(r.any(9));
|
||||
}
|
||||
|
||||
TEST_CASE("Result contains only the specified elements"){
|
||||
Result<int> r{1,1,1};
|
||||
TEST_CASE("Result contains only the specified elements") {
|
||||
Result<int> r{1, 1, 1};
|
||||
REQUIRE(r.contains_only(1));
|
||||
REQUIRE(r.contains_only(1,1));
|
||||
REQUIRE(r.contains_only(1, 1));
|
||||
}
|
||||
|
||||
TEST_CASE("Only with multiple values"){
|
||||
Result<int> r{1,1,2,1,2,1,1};
|
||||
TEST_CASE("Only with multiple values") {
|
||||
Result<int> r{1, 1, 2, 1, 2, 1, 1};
|
||||
REQUIRE_FALSE(r.contains_only(1));
|
||||
REQUIRE_FALSE(r.contains_only(2));
|
||||
REQUIRE(r.contains_only(1,2));
|
||||
REQUIRE(r.contains_only(2,1));
|
||||
REQUIRE(r.contains_only(1, 2));
|
||||
REQUIRE(r.contains_only(2, 1));
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
@ -103,14 +103,13 @@ template <typename T> struct is_vector : public std::false_type {};
|
||||
template <typename T>
|
||||
struct is_vector<std::vector<T>> : public std::true_type {};
|
||||
|
||||
|
||||
|
||||
template<class...> struct Conjunction : std::true_type {};
|
||||
template<class B1> struct Conjunction<B1> : B1 {};
|
||||
template<class B1, class... Bn>
|
||||
template <class...> struct Conjunction : std::true_type {};
|
||||
template <class B1> struct Conjunction<B1> : B1 {};
|
||||
template <class B1, class... Bn>
|
||||
struct Conjunction<B1, Bn...>
|
||||
: std::conditional<bool(B1::value), Conjunction<Bn...>, B1>::type {};
|
||||
|
||||
template<typename T, typename... Ts>
|
||||
using AllSame = typename std::enable_if<Conjunction<std::is_same<T, Ts>...>::value>::type;
|
||||
template <typename T, typename... Ts>
|
||||
using AllSame =
|
||||
typename std::enable_if<Conjunction<std::is_same<T, Ts>...>::value>::type;
|
||||
} // namespace sls
|
@ -10,4 +10,4 @@
|
||||
#define APIJUNGFRAU "7.0.3 0x230922"
|
||||
#define APIMYTHEN3 "7.0.3 0x230922"
|
||||
#define APIMOENCH "7.0.3 0x230922"
|
||||
#define APIEIGER "7.0.3 0x231018"
|
||||
#define APIEIGER "7.0.3 0x231018"
|
||||
|
Loading…
x
Reference in New Issue
Block a user