Macro converts ASCI file to root file

I send you my macro that converts an ASCI file to root file,
conv.C (7.41 KB)

In attachment see your macro modified such that it works correctly.
The main change is:

//Int_t Ele_N,Jet_N,Muon_N,Tau_N,Photon_N; Int_t Ele_N=0,Jet_N=0,Muon_N=0,Tau_N=0,Photon_N=0;

ie you had uninitialized variables used later to count the number of particle species.

conv.C (7.68 KB)