Dear all,
I’m using a ttree to read a csv file in which a column is composed by strings. I need those strings to make some if statements. However, the tree reads only 9 characters and the required string has 12 characters. There is some way to increased the number os characters on the tree?
Code:
void dataRead(){ //TString chamber, int numDate, TString datemeas
// Tree for read date from a csc file.
TTree *tree = new TTree("Data for scan","Data from csv file");
// Method to read the file .csv with two variables.
tree->ReadFile("Current_Scan_AllData_2019_03_13.csv","CHAMBER_NAME_CMSSW/C,d1/C,d2/C,d3/C,vmon/D,imon/D",',');
// Variables to put on the tree branch.
double current, voltage;
char chamb, date;
// Setting the branch address with those variables.
tree->SetBranchAddress("CHAMBER_NAME_CMSSW", &chamb);
tree->SetBranchAddress("d1", &date);
tree->SetBranchAddress("imon", ¤t);
tree->SetBranchAddress("vmon", &voltage);
........
}
kind regards,
_ROOT Version: 6.19/01
Platform: Ubuntu 20.04
Compiler: gcc 9.3.0