Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRestMetadata. if datamember does not support units, the value is ret… #117

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions source/framework/core/src/TRestMetadata.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ using namespace REST_Physics;
map<string, string> TRestMetadata_UpdatedConfigFile;

ClassImp(TRestMetadata);
///////////////////////////////////////////////
///////////////////////////////////////////////
/// \brief TRestMetadata default constructor
///
TRestMetadata::TRestMetadata() : endl(this) {
Expand Down Expand Up @@ -1121,8 +1121,9 @@ void TRestMetadata::ExpandIncludeFile(TiXmlElement* e) {
if ((string)e->Value() == "include") {
localele = (TiXmlElement*)e->Parent();
if (localele == nullptr) return;
if (localele->Attribute("expanded") == nullptr ? false : ((string)localele->Attribute("expanded") ==
"true")) {
if (localele->Attribute("expanded") == nullptr
? false
: ((string)localele->Attribute("expanded") == "true")) {
debug << "----already expanded----" << endl;
return;
}
Expand Down Expand Up @@ -1157,8 +1158,9 @@ void TRestMetadata::ExpandIncludeFile(TiXmlElement* e) {
// overwrites "type"
else {
localele = e;
if (localele->Attribute("expanded") == nullptr ? false : ((string)localele->Attribute("expanded") ==
"true")) {
if (localele->Attribute("expanded") == nullptr
? false
: ((string)localele->Attribute("expanded") == "true")) {
debug << "----already expanded----" << endl;
return;
}
Expand Down Expand Up @@ -2361,7 +2363,7 @@ void TRestMetadata::ReadOneParameter(string name, string value) {
<< this->ClassName() << " find unit definition in parameter: " << name
<< ", but the corresponding data member doesn't support it. Data member type: "
<< datamember.type << endl;
datamember.ParseString(val);
datamember.ParseString(value);
}
} else {
datamember.ParseString(value);
Expand Down Expand Up @@ -2456,8 +2458,7 @@ void TRestMetadata::SetWarning(string message, bool print) {
if (message != "") {
fWarningMessage += message + "\n";
if (print) {
if (fVerboseLevel>=REST_Warning)
cout << message << endl;
if (fVerboseLevel >= REST_Warning) cout << message << endl;
}
}
}
Expand All @@ -2474,4 +2475,4 @@ TString TRestMetadata::GetWarningMessage() {
return fWarningMessage;
else
return "No warning!";
}
}