mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
formatting
This commit is contained in:
parent
397e846509
commit
01e4bcb47e
@ -2928,7 +2928,8 @@ int softwareTrigger(int block) {
|
||||
usleep(100);
|
||||
|
||||
#ifndef VIRTUAL
|
||||
// block till frame sent out & back to wait for trigger (or not busy anymore)
|
||||
// block till frame sent out & back to wait for trigger (or not busy
|
||||
// anymore)
|
||||
if (block) {
|
||||
uint32_t retval = bus_r(STATUS_REG);
|
||||
while ((retval & RUN_BUSY_MSK) && !(retval & WAITING_FOR_TRIGGER_MSK)) {
|
||||
@ -2974,8 +2975,7 @@ enum runStatus getRunStatus() {
|
||||
|
||||
// running
|
||||
else if (retval & RUN_BUSY_MSK) {
|
||||
if ((retval &
|
||||
WAITING_FOR_TRIGGER_MSK) ||
|
||||
if ((retval & WAITING_FOR_TRIGGER_MSK) ||
|
||||
(retval & WAITING_FOR_START_FRAME_MSK)) {
|
||||
LOG(logINFOBLUE, ("Status: WAITING\n"));
|
||||
s = WAITING;
|
||||
|
@ -1954,8 +1954,7 @@ int acquire(int blocking, int file_des) {
|
||||
uint64_t sourcemac = getDetectorMAC();
|
||||
char src_mac[MAC_ADDRESS_SIZE];
|
||||
getMacAddressinString(src_mac, MAC_ADDRESS_SIZE, sourcemac);
|
||||
sprintf(
|
||||
mess,
|
||||
sprintf(mess,
|
||||
"Invalid udp source mac address for this detector. Must be "
|
||||
"same as hardware detector mac address %s\n",
|
||||
src_mac);
|
||||
@ -1966,8 +1965,7 @@ int acquire(int blocking, int file_des) {
|
||||
uint32_t sourceip = getDetectorIP();
|
||||
char src_ip[INET_ADDRSTRLEN];
|
||||
getIpAddressinString(src_ip, sourceip);
|
||||
sprintf(
|
||||
mess,
|
||||
sprintf(mess,
|
||||
"Invalid udp source ip address for this detector. Must be "
|
||||
"same as hardware detector ip address %s in 1G readout "
|
||||
"mode \n",
|
||||
|
@ -886,7 +886,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.");
|
||||
|
@ -1229,8 +1229,7 @@ int DetectorImpl::acquire() {
|
||||
// handle jf sync issue (master idle, slaves stopped)
|
||||
if (statusList.contains_only(IDLE, STOPPED)) {
|
||||
status = STOPPED;
|
||||
}
|
||||
else
|
||||
} else
|
||||
status = statusList.squash(RUNNING);
|
||||
}
|
||||
|
||||
@ -1239,7 +1238,8 @@ int DetectorImpl::acquire() {
|
||||
double progress = (*std::max_element(a.begin(), a.end()));
|
||||
|
||||
// callback
|
||||
acquisition_finished(progress, static_cast<int>(status), acqFinished_p);
|
||||
acquisition_finished(progress, static_cast<int>(status),
|
||||
acqFinished_p);
|
||||
}
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &end);
|
||||
|
@ -84,9 +84,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
||||
*/
|
||||
virtual ~DetectorImpl();
|
||||
|
||||
template <class CT> struct NonDeduced {
|
||||
using type = CT;
|
||||
};
|
||||
template <class CT> struct NonDeduced { using type = CT; };
|
||||
template <typename RT, typename... CT>
|
||||
Result<RT> Parallel(RT (Module::*somefunc)(CT...),
|
||||
std::vector<int> positions,
|
||||
|
@ -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) {
|
||||
|
@ -19,17 +19,18 @@ using test::PUT;
|
||||
|
||||
/* dacs */
|
||||
TEST_CASE("Setting and reading back moench dacs", "[.cmd][.dacs]") {
|
||||
// vbp_colbuf, vipre, vin_cm, vb_sda, vcasc_sfp, vout_cm, vipre_cds, ibias_sfp
|
||||
// vbp_colbuf, vipre, vin_cm, vb_sda, vcasc_sfp, vout_cm, vipre_cds,
|
||||
// ibias_sfp
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::MOENCH) {
|
||||
SECTION("vbp_colbuf") { test_dac(defs::VBP_COLBUF, "vbp_colbuf", 1300); }
|
||||
SECTION("vbp_colbuf") {
|
||||
test_dac(defs::VBP_COLBUF, "vbp_colbuf", 1300);
|
||||
}
|
||||
SECTION("vipre") { test_dac(defs::VIPRE, "vipre", 1000); }
|
||||
SECTION("vin_cm") { test_dac(defs::VIN_CM, "vin_cm", 1400); }
|
||||
SECTION("vb_sda") {
|
||||
test_dac(defs::VB_SDA, "vb_sda", 680);
|
||||
}
|
||||
SECTION("vb_sda") { test_dac(defs::VB_SDA, "vb_sda", 680); }
|
||||
SECTION("vcasc_sfp") { test_dac(defs::VCASC_SFP, "vcasc_sfp", 1428); }
|
||||
SECTION("vout_cm") { test_dac(defs::VOUT_CM, "vout_cm", 1200); }
|
||||
SECTION("vipre_cds") { test_dac(defs::VIPRE_CDS, "vipre_cds", 800); }
|
||||
@ -105,5 +106,4 @@ TEST_CASE("Setting and reading back moench dacs", "[.cmd][.dacs]") {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace sls
|
||||
|
@ -103,8 +103,6 @@ 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>
|
||||
@ -112,5 +110,6 @@ 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;
|
||||
using AllSame =
|
||||
typename std::enable_if<Conjunction<std::is_same<T, Ts>...>::value>::type;
|
||||
} // namespace sls
|
Loading…
x
Reference in New Issue
Block a user