JFJochReceiver: add bkg estimate to measurement statistics
This commit is contained in:
@@ -172,12 +172,12 @@ void JFJochStateMachine::Start(const JFJochProtoBuf::DatasetSettings& settings)
|
||||
if (measurement.valid())
|
||||
measurement.get(); // In case measurement was running - clear thread
|
||||
|
||||
ClearAndSetMeasurementStatistics();
|
||||
|
||||
auto mod_settings = settings;
|
||||
SetDatasetDefaults(mod_settings);
|
||||
experiment.LoadDatasetSettings(mod_settings);
|
||||
|
||||
ClearAndSetMeasurementStatistics();
|
||||
|
||||
cancel_sequence = false;
|
||||
|
||||
try {
|
||||
@@ -313,6 +313,8 @@ void JFJochStateMachine::SetFullMeasurementOutput(JFJochProtoBuf::BrokerFullStat
|
||||
|
||||
if (output.receiver().has_indexing_rate())
|
||||
tmp.set_indexing_rate(output.receiver().indexing_rate());
|
||||
if (output.receiver().has_bkg_estimate())
|
||||
tmp.set_bkg_estimate(output.receiver().bkg_estimate());
|
||||
}
|
||||
|
||||
if (last_receiver_output.writer_size() > 0) {
|
||||
|
||||
@@ -243,6 +243,7 @@ message ReceiverOutput {
|
||||
string master_file_name = 11;
|
||||
repeated JFPedestal pedestal_result = 12;
|
||||
optional float indexing_rate = 13;
|
||||
optional float bkg_estimate = 14;
|
||||
}
|
||||
|
||||
message ReceiverNetworkConfigDevice {
|
||||
@@ -459,6 +460,8 @@ message MeasurementStatistics {
|
||||
int64 detector_pixel_depth = 14;
|
||||
|
||||
repeated DataFileStatistics file_statistics = 15;
|
||||
|
||||
optional float bkg_estimate = 16;
|
||||
}
|
||||
|
||||
message BrokerStatus {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -543,6 +543,10 @@ void JFJochReceiver::GetStatistics(JFJochProtoBuf::ReceiverOutput &ret) const {
|
||||
auto tmp = indexing_solution.Mean();
|
||||
if (!std::isnan(tmp))
|
||||
ret.set_indexing_rate(tmp);
|
||||
|
||||
tmp = bkg_estimate.Mean();
|
||||
if (!std::isnan(tmp))
|
||||
ret.set_bkg_estimate(tmp);
|
||||
}
|
||||
|
||||
void JFJochReceiver::Cancel() {
|
||||
|
||||
Reference in New Issue
Block a user