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

Fixing issue with [[ ]] formatting, replacing by {{ }} #370

Merged
merged 5 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
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
14 changes: 7 additions & 7 deletions pipeline/analysisPlot/panel.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<panel font_size="0.06">
<label value="Run number : [[TRestRun::fRunNumber]]" x="0.25" y="0.9"/>
<label value="Run tag : [[TRestRun::fRunTag]]" x="0.25" y="0.82"/>
<label value="Run starts : [[startTime]]" x="0.25" y="0.74"/>
<label value="Run ends : [[endTime]]" x="0.25" y="0.66"/>
<label value="Entries : [[entries]]" x="0.25" y="0.58"/>
<label value="Run duration : [[runLength]] hours" x="0.25" y="0.50"/>
<label value="Mean rate : [[meanRate]] Hz" x="0.25" y="0.42"/>
<label value="Run number : {{TRestRun::fRunNumber}}" x="0.25" y="0.9"/>
<label value="Run tag : {{TRestRun::fRunTag}}" x="0.25" y="0.82"/>
<label value="Run starts : {{startTime}}" x="0.25" y="0.74"/>
<label value="Run ends : {{endTime}}" x="0.25" y="0.66"/>
<label value="Entries : {{entries}}" x="0.25" y="0.58"/>
<label value="Run duration : {{runLength}} hours" x="0.25" y="0.50"/>
<label value="Mean rate : {{meanRate}} Hz" x="0.25" y="0.42"/>

<label value="Detector pressure : [TRestDetector::fPressure] bar" x="0.25" y="0.30"/>
<label value="Mesh voltage : [TRestDetector::fAmplificationVoltage] V" x="0.25" y="0.22"/>
Expand Down
6 changes: 3 additions & 3 deletions source/framework/core/src/TRestRun.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1669,8 +1669,8 @@ string TRestRun::ReplaceMetadataMembers(const string& instr, Int_t precision) {
endPosition = 0;
}

outstring = Replace(outstring, "[[", "[");
outstring = Replace(outstring, "]]", "]");
outstring = Replace(outstring, "{{", "[");
outstring = Replace(outstring, "}}", "]");

return REST_StringHelper::ReplaceMathematicalExpressions(outstring, precision);
}
Expand All @@ -1693,7 +1693,7 @@ string TRestRun::ReplaceMetadataMembers(const string& instr, Int_t precision) {
///
string TRestRun::ReplaceMetadataMember(const string& instr, Int_t precision) {
if (instr.find("::") == string::npos && instr.find("->") == string::npos) {
return "[[" + instr + "]]";
return "{{" + instr + "}}";
}
vector<string> results = Split(instr, "::", false, true);
if (results.size() == 1) results = Split(instr, "->", false, true);
Expand Down