better handling of values=n/a when dumping the header info.

This commit is contained in:
2025-10-01 12:36:01 +02:00
parent 32b49e7ac8
commit fbfce99790
2 changed files with 7 additions and 2 deletions

View File

@@ -1290,7 +1290,6 @@ void TMusrRunHeader::DumpHeader()
digit_d = GetLeastSignificantDigit(prop.GetDemand());
if (prop.GetDescription() != "n/a") {
fmt.Form("%%s: %%.%dlf +- %%.%dlf %%s; SP: %%.%dlf; %%s", digit, digit, digit_d);
tstr.Form(fmt, prop.GetLabel().Data(), prop.GetValue(), prop.GetError(), prop.GetUnit().Data(), prop.GetDemand(), prop.GetDescription().Data());
} else {
fmt.Form("%%s: %%.%dlf +- %%.%dlf %%s; SP: %%.%dlf", digit, digit, digit_d);
@@ -1327,6 +1326,12 @@ void TMusrRunHeader::DumpHeader()
fmt.Form("%%s: %%.%dlf %%s; SP: %%.%dlf", digit, digit_d);
tstr.Form(fmt, prop.GetLabel().Data(), prop.GetValue(), prop.GetUnit().Data(), prop.GetDemand());
}
} else if (prop.GetDemand() == MRH_UNDEFINED) { // <value> = n/a
fmt.Form("%%s: %%s %%s");
if ((prop.GetUnit() != "n/a"))
tstr.Form(fmt, prop.GetLabel().Data(), "n/a", prop.GetUnit().Data());
else
tstr.Form(fmt, prop.GetLabel().Data(), "n/a", "n/a");
}
str.Form(" %03d - %s -@%d", i, tstr.Data(), MRH_TMUSR_RUN_PHYSICAL_QUANTITY);
std::cout << std::endl << str;

View File

@@ -40,7 +40,7 @@
#include <TFolder.h>
#include <TDirectory.h>
#define MRH_UNDEFINED -9.99e99
#define MRH_UNDEFINED -9.9e99
#define MRH_DOUBLE_PREC 6