I have variety Array data in my txt file. Each event has special array data in txt file. I want to create root file and want to plot histogram. How can I get array data in txt file ?
My txt file is same this.
While I am define txt file (fstream file;) , I write x for first column and jet_pt for second column. But second column type is array and thats why ı can not take it. How can I get array data?
and welcome to the ROOT forum! This is not really a ROOT-related question: the complicated part is to read the text file and retrieve the values you want to fill the histogram with, but that can/should be solved with standard C++ or Python code – you can search google or stackoverflow for related how-tos. I guess you want to open the file, read it line by line, and for each line you want to extract the information you want.