TreePlotter helper class in python
Definition at line 13 of file TTreeHelper.py.
◆ __init__()
def TTreeHelper.TTreeSelector.__init__ |
( |
|
self, |
|
|
* |
args |
|
) |
| |
Definition at line 15 of file TTreeHelper.py.
16 super(TTreeSelector, self).
__init__()
19 self.file = TFile.Open(args[0])
21 print (
'[!] You need to specify a file name in the argument list')
23 self.hashlist = self.file.GetListOfKeys()
25 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 27 of file TTreeHelper.py.
27 def loadTrees(self, arg):
28 """load Trees method: loads trees that match one of the arguments in name"""
30 for itree
in range(0,self.entries):
31 treename = self.hashlist.At(itree).GetName()
32 if treename.find(arg) >= 0 :
33 tree = self.file.
Get(treename)
34 treedict[treename] = tree
35 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,...