DiffractionExperiment: Detector Geometry can be modified with a setter function
This commit is contained in:
@@ -78,12 +78,18 @@ DiffractionExperiment::DiffractionExperiment(const DetectorGeometry& geom) {
|
||||
internal.set_storage_cells(1);
|
||||
internal.set_storage_cell_start(15);
|
||||
|
||||
*internal.mutable_conv_geometry() = geom;
|
||||
|
||||
Geometry(geom);
|
||||
Mode(DetectorMode::Conversion);
|
||||
}
|
||||
|
||||
// setter functions
|
||||
DiffractionExperiment &DiffractionExperiment::Geometry(const DetectorGeometry &input) {
|
||||
check_min("Number of modules", input.GetModulesNum(), 1);
|
||||
check_max("Number of modules", input.GetModulesNum(), 64); // if operating > 32M, would need to check the code anyway
|
||||
|
||||
*internal.mutable_conv_geometry() = input;
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::Mode(DetectorMode input) {
|
||||
switch (input) {
|
||||
|
||||
@@ -36,6 +36,7 @@ public:
|
||||
explicit DiffractionExperiment(const JFJochProtoBuf::JungfraujochSettings &settings);
|
||||
|
||||
// Methods below can be chained together
|
||||
DiffractionExperiment& Geometry(const DetectorGeometry &input);
|
||||
DiffractionExperiment& Mode(DetectorMode input);
|
||||
DiffractionExperiment& DataStreams(int64_t input);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user