Increase the number of entries in a root file

Hi @Debashis_sahoo,
As shown in the docs , TTree::GetEntry() returns the number of bytes read from the input buffer, so you’re not getting the actual value of the entry in the tree. Furthermore, any getter function would only give you a value from the class instance you are trying to access, but that doesn’t mean you would be modifying the content of the object. For that goal you should use setter functions (e.g. SetBinContent in the TH1 family).

Now, I’m assuming you already have a TTree and you finally want to create an histogram from its content. I would also presume that you really do not want to use any of the methods shown here to normalize your histogram or just fill it with weighted values. Then in this case I suggest that you simply TTree::Fill() a new branch of the tree with the number of values you want. An example is shown in this tutorial.

If you need any more help, please attach the program/macro you are working with.
Best,
Vincenzo