I am working on Root file and it has Tdirectory and Tmap object. I am not able to work with Tmap object. I am working with root file using python not c++.please help me

I am working on Root file and it has Tdirectory and Tmap object. I am not able to work with Tmap object. I am working with root file using python not c++.please help me

Hello @asifulla, welcome to the Forum.
I invite you to read the Introductory manual section about TFiles to learn how to use ROOT. It has examples both for C++ and Python and it should get you up to speed quickly.

Roughly speaking it sounds like you want to retrieve your TMap object from the ROOT file, which is done like this:

with ROOT.TFile.Open("myFile.root") as file:
  myMap = file.Get("nameOfMapObject")
  # `myMap` now contains the TMap object

can we connect please @silverweed

this code is not working with my file.
My file has Tdirectory and Tmap object. I have dealt with Tdirectory but not able to work witg Tmap

Sorry but it’s a bit hard to help with so little context. Could you be a bit more specific in what are you trying to do, what you tried and how it is not working?
If you have some specific code that is behaving unexpectedly, could you post it?
Otherwise, if it’s a more conceptual problem, please try to formulate it in more detail.

can you provide me your email adress