Writing a binary file with ROOT

Hello All,

I am using GATE and ROOT. I am trying to open the .root file, extract some data from the root file and write selected data to a binary file. This binary file is to be opened, for instance, with IDL for further processing and plotting. How do I write data to a binary file with ROOT? How do I do this?


Use the Posix open or open64 function of your system. See example in TFile::SysOpen at


hello sir : i generated a root file through madgraph and build Neural Deep learning model. now my model need binary data . can any body help me to creat or buil binary data from root file.

“binary data” is a bit vague. Can you explain a bit more what you are doing exactly ?
What is “your model” ?
What kind of “binary data” do you need ?

i build Deep neural network model using higgs data (GitHub - uci-igb/higgs-susy: Python code to replicate the results on HIGGS and SUSY benchmarks using pylearn2 and theano.) using this csv file which in which the data is in binary form and the model is working. i follow the same process and create root file from madgraph and convert into csv , here is the problem that my csv data is not in binary form (0,1) and my model is not working.

Ok, but that does not tell what kind of binary is needed. As your question is related to neural network, I let @moneta have a look at your question. He might know.

binary data is in (0,1) form my model will give output in (0,1) form.