* Enhancements for XFEL
* Enhancements for EIGER * Writer is more flexible and capable of handling DECTRIS data
This commit is contained in:
@@ -4,14 +4,19 @@
|
||||
#include "JFJochException.h"
|
||||
|
||||
DetectorSetup::DetectorSetup(const DetectorGeometry &in_geometry)
|
||||
: DetectorSetup(in_geometry, "Detector", std::vector<std::string>()) {}
|
||||
: DetectorSetup(in_geometry, DetectorType::JUNGFRAU, "Detector", std::vector<std::string>()) {}
|
||||
|
||||
DetectorSetup::DetectorSetup(const DetectorGeometry &in_geometry, DetectorType in_detector_type)
|
||||
: DetectorSetup(in_geometry, in_detector_type, "Detector", std::vector<std::string>()) {}
|
||||
|
||||
DetectorSetup::DetectorSetup(const DetectorGeometry &in_geometry,
|
||||
DetectorType in_detector_type,
|
||||
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) {
|
||||
det_modules_hostname(in_det_modules_hostname),
|
||||
detector_type(in_detector_type) {
|
||||
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");
|
||||
@@ -49,6 +54,7 @@ void DetectorSetup::LoadGain(const std::vector<std::string> &filenames) {
|
||||
if (filenames.size() != GetModulesNum())
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Mismatch in number of gain calibration files");
|
||||
gain_file_names = filenames;
|
||||
for (const auto& i: filenames)
|
||||
gain_calibration.emplace_back(i);
|
||||
}
|
||||
@@ -99,3 +105,11 @@ DetectorSetup &DetectorSetup::TxDelay(const std::vector<int64_t> &v) {
|
||||
const std::vector<int64_t> &DetectorSetup::GetTxDelay() const {
|
||||
return tx_delay;
|
||||
}
|
||||
|
||||
const std::vector<std::string> &DetectorSetup::GetGainFileNames() const {
|
||||
return gain_file_names;
|
||||
}
|
||||
|
||||
DetectorType DetectorSetup::GetDetectorType() const {
|
||||
return detector_type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user