Dear pyroot expert:
I have an inputfile Fulltest.root which contains the following information:
Now processing /home/pixel_dev/PSI_Software/Output/roc-001/Fulltest.root
TFile** /home/pixel_dev/PSI_Software/Output/roc-001/Fulltest.root
TFile* /home/pixel_dev/PSI_Software/Output/roc-001/Fulltest.root
KEY: TParameter IA;1 Named templated parameter type
KEY: TParameter VA;1 Named templated parameter type
KEY: TParameter ID;1 Named templated parameter type
KEY: TParameter VD;1 Named templated parameter type
KEY: TGraph TempCalibration_C0;3
KEY: TGraph TempCalibration_C0;2
KEY: TGraph TempCalibration_C0;1
KEY: TGraph TempMeasurement_C0;3
KEY: TGraph TempMeasurement_C0;2
KEY: TGraph TempMeasurement_C0;1
KEY: TH2D CalThresholdMap_C0;8 CalThresholdMap_C0
KEY: TH2D CalThresholdMap_C0;7 CalThresholdMap_C0
How can I create a list which contains the names of each of those TH2D, TGraph, TParameter? I want to parse the infile.ls() information but it does not work:
infile = TFile("Fulltest.root",'r')
list = infile.ls()
for i in range(len(list)):
h1 = infile.Get(list[i].split()[2])
# perform some analysis on h1.
Could you show me how could I create such a list in pyroot instead of printing it on the scrren?
Cheers,Gang