diff --git a/broker/JFJochServices.cpp b/broker/JFJochServices.cpp index ac8ad3a3..cf0210a6 100644 --- a/broker/JFJochServices.cpp +++ b/broker/JFJochServices.cpp @@ -10,18 +10,14 @@ JFJochServices::JFJochServices(Logger &in_logger) : logger(in_logger) {} void JFJochServices::Start(const DiffractionExperiment& experiment, const PixelMask &pixel_mask, - const JFCalibration &calibration) { + const JFCalibration *calibration) { logger.Info("Measurement start for: {}", experiment.GetFilePrefix()); cannot_stop_detector = false; if (receiver != nullptr) { logger.Info(" ... receiver start"); - if (experiment.IsJungfrauConvPhotonCnt()) - receiver->Start(experiment, pixel_mask, &calibration); - else - receiver->Start(experiment, pixel_mask, nullptr); - + receiver->Start(experiment, pixel_mask, calibration); if (detector && !experiment.IsUsingInternalPacketGen()) { logger.Info(" ... detector start"); detector->Start(experiment); diff --git a/broker/JFJochServices.h b/broker/JFJochServices.h index 196a1743..4595fc24 100644 --- a/broker/JFJochServices.h +++ b/broker/JFJochServices.h @@ -27,7 +27,7 @@ public: void ConfigureDetector(const DiffractionExperiment& experiment); void Start(const DiffractionExperiment& experiment, const PixelMask &pixel_mask, - const JFCalibration &calibration); + const JFCalibration *calibration = nullptr); JFJochServicesOutput Stop(); void Cancel(); void Trigger(); diff --git a/broker/JFJochStateMachine.cpp b/broker/JFJochStateMachine.cpp index 253d510d..ef840fd4 100644 --- a/broker/JFJochStateMachine.cpp +++ b/broker/JFJochStateMachine.cpp @@ -63,7 +63,7 @@ void JFJochStateMachine::TakePedestalInternalAll(std::unique_lock &u if (experiment.GetDetectorSetup().GetDetectorType() != DetectorType::JUNGFRAU) { try { calibration.reset(); - logger.Info("EIGER configuration"); + logger.Info("Photon counting detector configuration"); services.ConfigureDetector(experiment); logger.Info(" ... done "); SetState(JFJochState::Idle, @@ -125,7 +125,7 @@ void JFJochStateMachine::TakeDarkMaskInternal(std::unique_lock &ul) SetState(JFJochState::Pedestal, "Dark sequence for mask calculation", BrokerStatus::MessageSeverity::Info); services.ConfigureDetector(local_experiment); - services.Start(local_experiment, pixel_mask, *calibration); + services.Start(local_experiment, pixel_mask, nullptr); ul.unlock(); // Allow to cancel/abort during the mask data collection @@ -169,7 +169,7 @@ void JFJochStateMachine::TakePedestalInternalG0(std::unique_lock &ul SetState(JFJochState::Pedestal, message, BrokerStatus::MessageSeverity::Info); services.ConfigureDetector(local_experiment); - services.Start(local_experiment, pixel_mask, *calibration); + services.Start(local_experiment, pixel_mask, calibration.get()); services.Trigger(); @@ -212,7 +212,7 @@ void JFJochStateMachine::TakePedestalInternalG1(std::unique_lock &ul "Pedestal G1 SC" + std::to_string(storage_cell), BrokerStatus::MessageSeverity::Info); services.ConfigureDetector(local_experiment); - services.Start(local_experiment, pixel_mask, *calibration); + services.Start(local_experiment, pixel_mask, calibration.get()); services.Trigger(); @@ -252,7 +252,7 @@ void JFJochStateMachine::TakePedestalInternalG2(std::unique_lock &ul "Pedestal G2 SC" + std::to_string(storage_cell), BrokerStatus::MessageSeverity::Info); services.ConfigureDetector(local_experiment); - services.Start(local_experiment, pixel_mask, *calibration); + services.Start(local_experiment, pixel_mask, calibration.get()); services.Trigger(); @@ -361,7 +361,7 @@ void JFJochStateMachine::Start(const DatasetSettings &settings) { try { SetState(JFJochState::Busy, "Preparing measurement", BrokerStatus::MessageSeverity::Info); services.SetSpotFindingSettings(GetSpotFindingSettings()); - services.Start(experiment, pixel_mask, *calibration); + services.Start(experiment, pixel_mask, calibration.get()); SetState(JFJochState::Measuring, "Measuring ...", BrokerStatus::MessageSeverity::Info); measurement = std::async(std::launch::async, &JFJochStateMachine::MeasurementThread, this);