How to access to the number of TParameters contained in a ro

Dear experts,

I have a root file with a list of TParameter and two TMatrixT. I know how to access to the value of each parameter, through the GetVal() function, but my question is how to access to the total number of TParameters in the file ( in order to use that number in a for loop ending at the last parameter) and the name of each of them.

N = total number of TParameters;

for i in N

std::cout << TParameter_Name << TParameter_Value << std::endl;

end loop

Have you any suggestion?

Many thanks,
cheers.

Jordi Nadal

What kind of an object is exactly “a list of”?

Hi,

Below I post the printout of an .ls. (is this what you need?)
I want to do a loop over these values (JER,JES,…) and printing the value. is it possible?

Thanks,

Jordi
############## ############## ############## ############## ##############
Attaching file nominalFit_testTauErr_noTrig_doPlots/NuisanceToDoPlots.root as _file0…
root [1] .ls
TFile** nominalFit_testTauErr_noTrig_doPlots/NuisanceToDoPlots.root
TFile* nominalFit_testTauErr_noTrig_doPlots/NuisanceToDoPlots.root
KEY: TParameter nui_k_sig;1 Named templated parameter type
KEY: TParameter nui_k_bg;1 Named templated parameter type
KEY: TParameter BCtag;1 Named templated parameter type
KEY: TParameter ElectronFactors;1 Named templated parameter type
KEY: TParameter JER;1 Named templated parameter type
KEY: TParameter JES;1 Named templated parameter type
KEY: TParameter JetRecoEff;1 Named templated parameter type
KEY: TParameter Lumi;1 Named templated parameter type
############## ############## ############## ############## ##############

How to Read Objects from a File?
Chapter 11. Input/Output

Thanks! I found the solution.