How to create a histogam from a .dat file

I know this question has been asked a lot on this site but I cannot find an example that pertains to my current situation. I have a .dat that has data for a time calibration spectrum. My problem is that it is just a wall of values (eg 0000000…000324000…0000000 continuously for 411 lines).

I’ve tried using TFile to open the file and

“TH1F *h1(TH1F *)TFile->Get();”

to read in the data but it is not a ROOT File. So then I tried a variant with ifstream but ifstream is not a pointer. Any advice?

1 Like