Fixes after MAX IV experiment
This commit is contained in:
@@ -9,7 +9,9 @@ DetectorSetup::DetectorSetup(const DetectorGeometry &in_geometry)
|
||||
DetectorSetup::DetectorSetup(const DetectorGeometry &in_geometry,
|
||||
const std::string &in_description,
|
||||
const std::vector<std::string> &in_det_modules_hostname) :
|
||||
geometry(in_geometry), description(in_description), det_modules_hostname(in_det_modules_hostname) {
|
||||
geometry(in_geometry),
|
||||
description(in_description),
|
||||
det_modules_hostname(in_det_modules_hostname) {
|
||||
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");
|
||||
@@ -81,3 +83,19 @@ DetectorSetup &DetectorSetup::PixelSize_um(float input) {
|
||||
pixel_size_um = input;
|
||||
return *this;
|
||||
}
|
||||
|
||||
DetectorSetup &DetectorSetup::TxDelay(const std::vector<int64_t> &v) {
|
||||
if (!v.empty() && (v.size() != GetModulesNum()))
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Mismatch between size of TX delay vector and modules number");
|
||||
for (const auto &i: v) {
|
||||
if ((i < 0) || (i > 31))
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "TX delay must be in range 0-31");
|
||||
}
|
||||
tx_delay = v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
const std::vector<int64_t> &DetectorSetup::GetTxDelay() const {
|
||||
return tx_delay;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user