ATLAS Offline Software
Functions | Variables
python.root_lsr_rank Namespace Reference

Functions

def dumpdir (d)
 

Variables

 parser
 
 help
 
 default
 
 choices
 
 action
 
 args
 
 ordering
 
 accounting
 
 hashes
 
 types
 
 f
 
 d
 
 key
 
 sortedl
 
 reverse
 

Function Documentation

◆ dumpdir()

def python.root_lsr_rank.dumpdir (   d)

Definition at line 42 of file root_lsr_rank.py.

42 def dumpdir(d):
43  thispath = d.GetPath()
44  if ':' in thispath:
45  thispath = thispath.split(':', 1)[1]
46  #print (thispath)
47  subdirs = []
48  for k in d.GetListOfKeys():
49  if not args.metadata and k.GetName() == 'metadata' and k.GetClassName() == 'TTree':
50  continue
51  if k.GetClassName().startswith('TDirectory'):
52  subdirs.append(k)
53  else:
54  if args.hash:
55  #lhash = ROOT.bufferhash(k)
56  #objsize = (k.GetNbytes()-k.GetKeylen())/8
57  #print ((k.GetNbytes()-k.GetKeylen())/8.)
58  #buf = ROOT.getbuffer(k); buf.SetSize(objsize)
59  #print (buf[objsize-1], objsize)
60  #lhash = zlib.adler32(str(buf))
61  #k.DeleteBuffer()
62  #obj=k.ReadObj();
63  #tm=ROOT.TMessage(ROOT.TMessage.kMESS_OBJECT)
64  #tm.WriteObject(obj)
65  lhash = ROOT.bufferhash2(k)
66  #obj.IsA().Destructor(obj)
67  #lhash = 0
68  else:
69  lhash = 0
70  idxname = os.path.join(thispath, k.GetName())
71  accounting[idxname] = (k.GetObjlen(), k.GetNbytes()-k.GetKeylen())
72  hashes[idxname] = lhash
73  types[idxname] = k.GetClassName()
74  #print ('%s,' % os.path.join(thispath, k.GetName()), end='')
75  #obj = k.ReadObj(); obj.IsA().Destructor(obj)
76  #print ('OK')
77  for k in subdirs:
78  dumpdir(k.ReadObj())
79 

Variable Documentation

◆ accounting

python.root_lsr_rank.accounting

Definition at line 33 of file root_lsr_rank.py.

◆ action

python.root_lsr_rank.action

Definition at line 25 of file root_lsr_rank.py.

◆ args

python.root_lsr_rank.args

Definition at line 29 of file root_lsr_rank.py.

◆ choices

python.root_lsr_rank.choices

Definition at line 21 of file root_lsr_rank.py.

◆ d

python.root_lsr_rank.d

Definition at line 82 of file root_lsr_rank.py.

◆ default

python.root_lsr_rank.default

Definition at line 20 of file root_lsr_rank.py.

◆ f

python.root_lsr_rank.f

Definition at line 80 of file root_lsr_rank.py.

◆ hashes

python.root_lsr_rank.hashes

Definition at line 34 of file root_lsr_rank.py.

◆ help

python.root_lsr_rank.help

Definition at line 19 of file root_lsr_rank.py.

◆ key

python.root_lsr_rank.key

Definition at line 92 of file root_lsr_rank.py.

◆ ordering

python.root_lsr_rank.ordering

Definition at line 31 of file root_lsr_rank.py.

◆ parser

python.root_lsr_rank.parser

Definition at line 17 of file root_lsr_rank.py.

◆ reverse

python.root_lsr_rank.reverse

Definition at line 97 of file root_lsr_rank.py.

◆ sortedl

python.root_lsr_rank.sortedl

Definition at line 97 of file root_lsr_rank.py.

◆ types

python.root_lsr_rank.types

Definition at line 35 of file root_lsr_rank.py.

python.root_lsr_rank.dumpdir
def dumpdir(d)
Definition: root_lsr_rank.py:42