TObjLink dictionary

Hello,

What must be done for the TObjLink dictionary to be imported into PyROOT?

Python 2.6.4 (r264:75706, Jan  6 2010, 13:07:12) 
[GCC 4.3.2 20081007 (Red Hat 4.3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ROOT import TObjLink
TClass::TClass:0: RuntimeWarning: no dictionary for class TObjLink is available

Thanks,
Matthew Lockner

Matthew,

for a dictionary to be loadable, it needs to be created first. What is the use case for access to TObjLink, given that TList is pythonized?

Cheers,
WIm

I’m trying to write a PyROOT translation of Matevz’s alice_vsd.C demo in root/tutorials/eve. Around line 102 you’ll find a block that iterates over a TFile’s list of keys:

      TPMERegexp name_re("Event\\d+");
      TObjLink* lnk = fFile->GetListOfKeys()->FirstLink();
      while (lnk)
      {
         if (name_re.Match(lnk->GetObject()->GetName()))
         {
            fEvDirKeys->Add(lnk->GetObject());
         }
         lnk = lnk->Next();
      }

I am not sure how to work around it. I am trying to use a TIter, but I’ve never used one before and am having troubles.

Thanks,
Matthew Lockner

Matthew,

in that case, how about:[code]for key in fFile.GetListOfKeys():

etc …[/code]Of course, using TIter directly would work as well.

Cheers,
Wim

How delightfully straightforward. Thanks for the pointer.

Cheers,
Matthew Lockner