// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
// Source File Name: TTree.java
package hep.rootio.reps;
import hep.rootio.RootObjectRepresentation;
import hep.rootio.implementation.HollowRootObject;
import hep.rootio.implementation.SpecificRootObject;
// Referenced classes of package hep.rootio.reps:
// TObjArray
public class TTree extends SpecificRootObject
{
public TTree()
{
}
public int getNBranches()
{
TObjArray branches = (TObjArray)get("fBranches");
RootObjectRepresentation reps[] = (RootObjectRepresentation[])branches.get("fArray");
for(int i = 0; i < reps.length; i++)
if(reps[i] == null)
return i;
return reps.length;
}
public RootObjectRepresentation getBranch(int index)
{
TObjArray branches = (TObjArray)get("fBranches");
RootObjectRepresentation reps[] = (RootObjectRepresentation[])branches.get("fArray");
return reps[index];
}
public RootObjectRepresentation getBranch(String name)
{
TObjArray branches = (TObjArray)get("fBranches");
RootObjectRepresentation reps[] = (RootObjectRepresentation[])branches.get("fArray");
for(int i = 0; i < reps.length; i++)
if(reps[i].get("fName").toString().equals(name))
return reps[i];
throw new RuntimeException("Branch " + name + " not found in tree " + get("fName"));
}
}
Ads help maintain this website.