better handling of values=n/a when dumping the header info.
This commit is contained in:
7
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
7
src/external/MusrRoot/TMusrRunHeader.cpp
vendored
@@ -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;
|
||||
|
||||
2
src/external/MusrRoot/TMusrRunHeader.h
vendored
2
src/external/MusrRoot/TMusrRunHeader.h
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user