Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: 6.24/00
-
Component/s: RDataFrame
-
Labels:None
-
Environment:
any
Description
The problem is that arrays of characters are treated as all other arrays. They should be special-cased.
Reproducer:
#include <ROOT/RDataFrame.hxx>
|
#include <TTree.h>
|
#include <TFile.h>
|
#include <algorithm>
|
|
int main() { |
{
|
TFile f("f.root", "recreate"); |
TTree t("t", "t"); |
char str[4] = "asd"; |
t.Branch("str", str, "str[4]/C"); |
t.Fill();
|
char otherstr[4] = "bar"; |
std::copy(otherstr, otherstr + 4, str);
|
t.Fill();
|
f.Write();
|
}
|
ROOT::RDataFrame("t", "f.root").Display()->Print(); |
return 0; |
}
|
prints
str |
|
'a' |
|
... |
|
'0x00' |
|
'b' |
|
... |
|
'0x00' |
|