ATLAS Offline Software
Loading...
Searching...
No Matches
python.changerun Namespace Reference

Functions

 bscan (b)
 adjust_run (x)

Variables

 newrun = int (sys.argv[1])
 infile = sys.argv[2]
 outfile = sys.argv[3]
 f1 = ROOT.TFile(infile)
 t1 = f1.CollectionTree
 m1 = f1.MetaData
 cl = ROOT.TClass.GetClass('Analysis::TruthInfo_p1')
 f2 = ROOT.TFile(outfile, 'RECREATE')
 t2 = t1.CloneTree (0)
 m2 = m1.CloneTree (0)
list kk = [k.GetName() for k in f1.GetListOfKeys()]
 o1 = f1.Get (k)
 o2 = o1.CloneTree()
 oldrun = None
 bn = b.GetName()
 pv = getattr (m1, bn).m_payload.m_payloadVec
 m_start
 m_stop
 r = pa.m_range

Function Documentation

◆ adjust_run()

python.changerun.adjust_run ( x)

Definition at line 68 of file changerun.py.

68def adjust_run (x):
69 xrun = x >> 32
70 if xrun <= 0 or xrun > 1000000: return x
71 return ((xrun-oldrun) + newrun) * (1<<32) + (x & ((1<<32)-1))
72
73

◆ bscan()

python.changerun.bscan ( b)

Definition at line 47 of file changerun.py.

47def bscan (b):
48 ifo = b.GetInfo()
49 types = ifo.GetTypes()
50 elts = ifo.GetElements()
51 for i in range(ifo.GetNdata()):
52 if elts[i].GetName() == 'm_athenabarcode' and types[i] == 217:
53 types[i] = 17
54 for bb in b.GetListOfBranches():
55 bscan (bb)
56 return

Variable Documentation

◆ bn

python.changerun.bn = b.GetName()

Definition at line 77 of file changerun.py.

◆ cl

python.changerun.cl = ROOT.TClass.GetClass('Analysis::TruthInfo_p1')

Definition at line 32 of file changerun.py.

◆ f1

python.changerun.f1 = ROOT.TFile(infile)

Definition at line 28 of file changerun.py.

◆ f2

python.changerun.f2 = ROOT.TFile(outfile, 'RECREATE')

Definition at line 35 of file changerun.py.

◆ infile

python.changerun.infile = sys.argv[2]

Definition at line 15 of file changerun.py.

◆ kk

list python.changerun.kk = [k.GetName() for k in f1.GetListOfKeys()]

Definition at line 39 of file changerun.py.

◆ m1

python.changerun.m1 = f1.MetaData

Definition at line 30 of file changerun.py.

◆ m2

python.changerun.m2 = m1.CloneTree (0)

Definition at line 37 of file changerun.py.

◆ m_start

python.changerun.m_start

Definition at line 82 of file changerun.py.

◆ m_stop

python.changerun.m_stop

Definition at line 83 of file changerun.py.

◆ newrun

python.changerun.newrun = int (sys.argv[1])

Definition at line 14 of file changerun.py.

◆ o1

python.changerun.o1 = f1.Get (k)

Definition at line 42 of file changerun.py.

◆ o2

python.changerun.o2 = o1.CloneTree()

Definition at line 43 of file changerun.py.

◆ oldrun

python.changerun.oldrun = None

Definition at line 60 of file changerun.py.

◆ outfile

python.changerun.outfile = sys.argv[3]

Definition at line 16 of file changerun.py.

◆ pv

python.changerun.pv = getattr (m1, bn).m_payload.m_payloadVec

Definition at line 79 of file changerun.py.

◆ r

python.changerun.r = pa.m_range

Definition at line 85 of file changerun.py.

◆ t1

python.changerun.t1 = f1.CollectionTree

Definition at line 29 of file changerun.py.

◆ t2

python.changerun.t2 = t1.CloneTree (0)

Definition at line 36 of file changerun.py.