TreePlotter helper class in python
Definition at line 12 of file TTreeHelper.py.
◆ __init__()
def TTreeHelper.TTreeSelector.__init__ |
( |
|
self, |
|
|
* |
args |
|
) |
| |
Definition at line 14 of file TTreeHelper.py.
15 super(TTreeSelector, self).
__init__()
18 self.file = TFile.Open(args[0])
20 print (
'[!] You need to specify a file name in the argument list')
22 self.hashlist = self.file.GetListOfKeys()
24 print (
'[>] File [',args[0],
'] sucessfully loaded')
◆ loadTrees()
def TTreeHelper.TTreeSelector.loadTrees |
( |
|
self, |
|
|
|
arg |
|
) |
| |
load Trees method: loads trees that match one of the arguments in name
Definition at line 26 of file TTreeHelper.py.
26 def loadTrees(self, arg):
27 """load Trees method: loads trees that match one of the arguments in name"""
29 for itree
in range(0,self.entries):
30 treename = self.hashlist.At(itree).GetName()
31 if treename.find(arg) >= 0 :
32 tree = self.file.
Get(treename)
33 treedict[treename] = tree
34 print (
'[>] ',len(treedict),
'Trees loaded matching the selection:', arg)
◆ entries
TTreeHelper.TTreeSelector.entries |
◆ file
TTreeHelper.TTreeSelector.file |
◆ hashlist
TTreeHelper.TTreeSelector.hashlist |
The documentation for this class was generated from the following file:
T * Get(TFile &f, const std::string &n, const std::string &dir="", const chainmap_t *chainmap=0, std::vector< std::string > *saved=0)
get a histogram given a path, and an optional initial directory if histogram is not found,...