Hello everyone, I am new to use ROOT,i have met a question like this:
SysError in TFile::TFile: could not delete /home/lujian/ (errno: 13) (权限不够)
Error in TROOT::WriteTObject: The current directory (root) is not associated with a file. The object (treeASICConfig) has not been written.
I just want save a .root file in my PC Linux , advacne for your help!
Hi,
could you please post a minimal reproducer of the issue (i.e. the shortest snippet of code that I could run to reproduce your problem)?
In the meanwhile, note that this is how one usually saves an object (in this example an histogram) to a ROOT file using the ROOT interpreter:
$ root // start the root interpreter
[0] TFile f("f.root", "recreate");
[1] TH1D h("h", "h", 100, -1., 1.);
[2] h.FillRandom("gaus"); // fill the histogram with random data
[3] h.Write();
[4] .q // quit the root interpreter
One easy way to inspect the ROOT file produced ("f.root"
) is to execute the following in your terminal: rootbrowse f.root
.
Hope this helps,
Enrico
hi eguiraud,
Thank for your help,I really want post a minimal code,but I haven’t the source code. My tutor gave me a application which I run it in my PC Linux,the result like this above I post, I think the application can be use,the problem is :
SysError in TFile::TFile: could not delete /home/lujian/ (errno: 13) (permission denied)
is there need other way to execute the application?advance for your help!
lujian
Hi,
perhaps getting the permissions on that directory?
Cheers,
D
hi dpiparo
thanks for your help,but I am new to use Ubantu and ROOT.How to getting the permissions on that directory? thanks!
lujian
Hi this is the standard linux procedure.
hi
um… but I am really new to use it.I mean what I need input in the shell?
thanks
Hi,
on the web you’ll find a lot of documentation, e.g. https://www.pluralsight.com/blog/it-ops/linux-file-permissions, but this is not a ROOT related question.
Cheers,
D
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.