Define time using std::chrono::nanosecond whenever possible, than if needed for I/O convert to micro/milli-seconds
Build Packages / build:rpm (rocky8_nocuda) (push) Failing after 5m48s
Build Packages / build:rpm (rocky9_nocuda) (push) Failing after 6m18s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Failing after 6m22s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Failing after 7m12s
Build Packages / build:rpm (rocky8_sls9) (push) Failing after 8m53s
Build Packages / XDS test (JFJoch plugin) (push) Has been cancelled
Build Packages / XDS test (neggia plugin) (push) Has been cancelled
Build Packages / Generate python client (push) Has been cancelled
Build Packages / Build documentation (push) Has been cancelled
Build Packages / Unit tests (push) Has been cancelled
Build Packages / Create release (push) Has been cancelled
Build Packages / build:rpm (ubuntu2204) (push) Has been cancelled
Build Packages / DIALS test (push) Has been cancelled
Build Packages / build:rpm (rocky8) (push) Has been cancelled
Build Packages / build:rpm (rocky9_sls9) (push) Has been cancelled
Build Packages / build:rpm (rocky9) (push) Has been cancelled
Build Packages / build:rpm (ubuntu2404) (push) Has been cancelled
Build Packages / XDS test (durin plugin) (push) Has been cancelled

This commit is contained in:
2026-04-28 14:45:26 +02:00
parent beb4f316e5
commit c2d15e22ab
27 changed files with 184 additions and 174 deletions
+10 -10
View File
@@ -47,7 +47,7 @@ DetectorSetup::DetectorSetup(std::shared_ptr<DetectorGeometry> in_geometry,
detector_type(in_detector_type),
read_out_time(0),
min_frame_time(std::chrono::milliseconds(1)),
min_count_time(std::chrono::duration_cast<std::chrono::microseconds>(MIN_COUNT_TIME)) {
min_count_time(MIN_COUNT_TIME) {
if (description.empty())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
@@ -56,7 +56,7 @@ DetectorSetup::DetectorSetup(std::shared_ptr<DetectorGeometry> in_geometry,
switch (detector_type) {
case DetectorType::EIGER:
high_voltage = 150;
read_out_time = std::chrono::microseconds(20);
read_out_time = PSI_EIGER_READOUT_TIME;
if (!det_modules_hostname.empty() && (2 * geometry->GetModulesNum() != det_modules_hostname.size()))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Mismatch between number of modules in detector geometry and hostname (For EIGER - one module = 2 hostnames)");
@@ -64,7 +64,7 @@ DetectorSetup::DetectorSetup(std::shared_ptr<DetectorGeometry> in_geometry,
case DetectorType::JUNGFRAU:
high_voltage = 120;
bit_depth_readout = 16;
read_out_time = std::chrono::microseconds(20);
read_out_time = PSI_JUNGFRAU_READOUT_TIME;
if (!det_modules_hostname.empty() && (geometry->GetModulesNum() != det_modules_hostname.size()))
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Mismatch between number of modules in detector geometry and hostname");
@@ -276,14 +276,14 @@ std::chrono::nanoseconds DetectorSetup::GetReadOutTime() const {
return read_out_time;
}
std::chrono::microseconds DetectorSetup::GetMinFrameTime() const {
std::chrono::nanoseconds DetectorSetup::GetMinFrameTime() const {
switch (GetDetectorType()) {
case DetectorType::EIGER:
return std::chrono::duration_cast<std::chrono::microseconds>(MIN_FRAME_TIME_EIGER);
return MIN_FRAME_TIME_EIGER;
case DetectorType::JUNGFRAU:
if (GetUDPInterfaceCount() == 1)
return std::chrono::duration_cast<std::chrono::microseconds>(MIN_FRAME_TIME_JUNGFRAU_HALF_SPEED);
return std::chrono::duration_cast<std::chrono::microseconds>(MIN_FRAME_TIME_JUNGFRAU_FULL_SPEED);
return MIN_FRAME_TIME_JUNGFRAU_HALF_SPEED;
return MIN_FRAME_TIME_JUNGFRAU_FULL_SPEED;
case DetectorType::DECTRIS:
return min_frame_time;
default:
@@ -292,16 +292,16 @@ std::chrono::microseconds DetectorSetup::GetMinFrameTime() const {
}
}
std::chrono::microseconds DetectorSetup::GetMinCountTime() const {
std::chrono::nanoseconds DetectorSetup::GetMinCountTime() const {
return min_count_time;
}
DetectorSetup &DetectorSetup::MinCountTime(std::chrono::microseconds input) {
DetectorSetup &DetectorSetup::MinCountTime(std::chrono::nanoseconds input) {
min_count_time = input;
return *this;
}
DetectorSetup &DetectorSetup::MinFrameTime(std::chrono::microseconds input) {
DetectorSetup &DetectorSetup::MinFrameTime(std::chrono::nanoseconds input) {
min_frame_time = input;
return *this;
}