Convert file .ntp to .root

Hi ROOTers,

It is possibile convert file .ntp to .root? If it is possibile how can i do?

Thanks for all.

what’s a .ntp file ?

1 Like

Is an Ntuple file from PawX11 (analysis toolkit before ROOT).

I read that I can convert with h2root but I don’t understand how install it.

Documentation is corrupted: http://root.cern.ch/root/HowtoConvert.html

Which ROOT version? Where does it come from?
BTW. ROOT binary distributions provided by the ROOT Team contain the “h2root” executable by default.

1 Like

Last version of ROOT. Come from PawX11.

By the way, I tried on ROOT version 6.18 (latest) but without good result, as you can see in the following image:

How can it work?

Hi,
I think you need to do it from the command shell and not from inside root.

With man h2root you can see the manual

Cheers
Stefano

I tried:

command not found… so, maybe ROOT is not contain any h2root by default @Wile_E_Coyote

If you take some ROOT binary distribution provided by the ROOT Team, you will have it by default.
If you build your own ROOT binaries, you need to “enable the Fortran components of ROOT”.

For build my root i used this procedure:

Building

Clone the repo

$ git clone https://github.com/root-project/root.git

$ cd root

$ git checkout -b v6-18-04 v6-18-04 (return in the folder previus cd root)

Make a directory for building

$ mkdir build
$ cd build

Run cmake and make

$ cmake ../root
$ make -j8

Setup and run ROOT

$ source bin/thisroot.sh
$ mousepad ~/.bashrc (add this lines at the end of file) : 
   
    source <Path>/thisroot.sh 
    alias root='root -l'

$ root

So if i want to enable all component, not only fortran, i need to change command “cmake …/root” in “cmake --all …/root”, is correct? I don’t understand this last procedure.

I tried, compile but doesn’t work…

Maybe you can attach your .ntp file to this thread, and those of us with the h2root command available (me for example) could convert it for you? Slide 13 of this presentation seems to say it is indeed possible, though man h2root does not mention the .ntp files at all…

Of course, you can find the file here.

But, of course, I want to be able to convert by myself.

Ok, thanks. Here is the converted file: d_exci_1pulser.root (38.7 KB)

Sure, but it was important to understand whether this is feasible to do with h2root to begin with. Because if it wasn’t, you wouldn’t want to mess up with your ROOT installation :slight_smile:

1 Like

So, how can I convert ntp to root? :slight_smile:

I’d suggest you take a binary distribution matching your OS:
https://root.cern.ch/content/release-61804
, otherwise proceed with Wile’s suggestion (I’m no expert in building my own ROOT binaries).

1 Like

I always installed ROOT from git source… There is a Guide for install it from Binary, @Wile_E_Coyote? I would install the complete version of it with all feature active.

At least: cmake -Dall=ON -Dfortran=ON ../root

1 Like

Summarizing, this procedure work!

Building

Clone the repo

$ git clone https://github.com/root-project/root.git

$ cd root

$ git checkout -b v6-18-04 v6-18-04 (return in the folder previus cd root)

Make a directory for building

$ mkdir build
$ cd build

Run cmake and make

$ cmake -Dall=ON -Dfortran=ON ../root
$ make -j8

Setup and run ROOT

$ source bin/thisroot.sh
$ mousepad ~/.bashrc (add this lines at the end of file) : 
   
    source <Path>/thisroot.sh 
    alias root='root -l'

$ root

After that going into directory that contain file .ntp open a terminal:

h2root name.ntp name.root

Thanks to @Wile_E_Coyote, @yus, @pcanal and @Dilicus.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.