Hi !
I got a script which converts the data in a rarely popular software to root format. But there is some kind of mistakes in this script and I am getting error while converting into root format.
Could you please help me in correcting the error? Candle2root_drawAll.C (858 Bytes) Candle2root_v1.cpp (7.5 KB)
and one more file is remaining which I am unable to upload here. Is there any other way to share it?
Also when I am running the following command I am getting the error as follows:
g++ -Wall -std=c++11 -o candle2root candle2root_v1.cpp `root-config --cflags --glibs` -lSpectrum
candle2root_v1.cpp: In function ‘void expand(datapackptr, datapackptr)’:
candle2root_v1.cpp:255:11: warning: variable ‘dstart’ set but not used [-Wunused-but-set-variable]
int16ptr dstart,wrtptr,rdptr,patptr;
^~~~~~
ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided
Ok @couet
I am trying to convert the .001 file into root format. But I don’t know how to do this. Could you please look at the above script so that you could suggest me something out of it. I am looking and thinking for it for the last 4 days but unable to get anything.
Even I try to ask from my colleagues but didn’t got anything.
If possible, Can you please help me.
One more thing is if you need .001 file (because I am unable to share it here) You can suggest me alternatives to share it with you.
Yes we would need the data file. Why does it refuses to be uploaded here ? may be change its name extension or use some external file system repo from where we can download.
@couet
Yes the file that I attached is not in the root format. But I want to convert into root for which I have the scripts.
Could you please run the other file.
(attached above)
root [0]
Processing Candle2root_v1.cpp...
In file included from input_line_12:1:
/Users/couet/Downloads/Candle2root_v1.cpp:21:10: fatal error: 'COMMON.h' file not found
#include "COMMON.h"
^~~~~~~~~~
@couet
Thanks for helping me.
But when I am running another file then it is not showing all the spectrum in TBrowser. The files are
I am getting the following warning of memory leak. Could you please help me in resolving this issue?
I have seen post similar to this warning but the problem still persists.
@couet
I am not sure.
Could you please run this file once?
Because what is happening in TBrowser it is showing only upto CL16_E4 histogram but the .001 file contains upto CL24_E4 and also other files.
May be due to the memory leakage error at CL16_E4, it is not showing all the histograms in the TBrowser.
% rootls Eu_26Dec.001.root -l
TH1F Sep 09 11:30 2020 ""
TTree Sep 09 11:30 2020 CandleData "All data from Candle"
TTree Sep 09 11:30 2020 CandleData "All data from Candle"
@couet
When I run the following root file.
root -l Eu_26Dec.001.root
root [0]
Attaching file Eu_26Dec.001.root as _file0…
(TFile *) 0x55fb4f324e40
root [1] new TBrowser
(TBrowser *) 0x55fb4f7c5860
Hi Robert,
The issue seems with whatever code is writing the file. You need to get that fixed; reading might not be able to recover the histograms simply because they are not in the file.
Cheers, Axel.