ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
xAODRootTest.Analysis Class Reference
Collaboration diagram for xAODRootTest.Analysis:

Public Member Functions

def __init__ (self, ifname, ofname=None)
 
def add (self, alg)
 
def run (self, n=None)
 
def finalize (self)
 

Public Attributes

 algs
 
 f
 
 event
 
 tree
 
 fout
 

Detailed Description

Definition at line 308 of file xAODRootTest.py.

Constructor & Destructor Documentation

◆ __init__()

def xAODRootTest.Analysis.__init__ (   self,
  ifname,
  ofname = None 
)

Definition at line 309 of file xAODRootTest.py.

309  def __init__ (self, ifname, ofname = None):
310  self.algs = []
311  self.f = ROOT.TFile (ifname)
312  self.event = ROOT.xAOD.TEvent (ROOT.xAOD.TEvent.kAthenaAccess)
313  CHECK (self.event.readFrom (self.f, True, 'CollectionTree'))
314  self.tree = ROOT.xAOD.MakeTransientTree(self.event, 'CollectionTree')
315  self.fout = None
316  if ofname:
317  self.fout = ROOT.TFile.Open (ofname, 'recreate')
318  CHECK (self.event.writeTo (self.fout))
319  return
320 

Member Function Documentation

◆ add()

def xAODRootTest.Analysis.add (   self,
  alg 
)

Definition at line 321 of file xAODRootTest.py.

321  def add (self, alg):
322  self.algs.append (alg)
323  return
324 

◆ finalize()

def xAODRootTest.Analysis.finalize (   self)

Definition at line 338 of file xAODRootTest.py.

338  def finalize (self):
339  if self.fout:
340  CHECK (self.event.finishWritingTo (self.fout))
341  return
342 
343 

◆ run()

def xAODRootTest.Analysis.run (   self,
  n = None 
)

Definition at line 325 of file xAODRootTest.py.

325  def run (self, n=None):
326  nent = self.tree.GetEntries()
327  if n != None:
328  nent = min (n, nent)
329  for i in range(nent):
330  self.tree.GetEntry(i)
331  print ('---> Event', i)
332  for a in self.algs:
333  a.execute (self.tree, self.event)
334  if self.fout != None:
335  self.event.fill()
336  return
337 

Member Data Documentation

◆ algs

xAODRootTest.Analysis.algs

Definition at line 310 of file xAODRootTest.py.

◆ event

xAODRootTest.Analysis.event

Definition at line 312 of file xAODRootTest.py.

◆ f

xAODRootTest.Analysis.f

Definition at line 311 of file xAODRootTest.py.

◆ fout

xAODRootTest.Analysis.fout

Definition at line 315 of file xAODRootTest.py.

◆ tree

xAODRootTest.Analysis.tree

Definition at line 314 of file xAODRootTest.py.


The documentation for this class was generated from the following file:
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
lumiFormat.fill
fill
Definition: lumiFormat.py:111
generate::GetEntries
double GetEntries(TH1D *h, int ilow, int ihi)
Definition: rmsFrac.cxx:20