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
 
 fout
 

Detailed Description

Definition at line 378 of file xAODRootTest.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 379 of file xAODRootTest.py.

379  def __init__ (self, ifname, ofname = None):
380  self.algs = []
381  self.f = ROOT.TFile (ifname)
382  from xAODRootAccess.TPyEvent import TPyEvent
383  self.event = TPyEvent (ROOT.xAOD.TEvent.kAthenaAccess)
384  CHECK (self.event.readFrom (self.f, True, 'CollectionTree'))
385  self.fout = None
386  if ofname:
387  self.fout = ROOT.TFile.Open (ofname, 'recreate')
388  CHECK (self.event.writeTo (self.fout))
389  return
390 

Member Function Documentation

◆ add()

def xAODRootTest.Analysis.add (   self,
  alg 
)

Definition at line 391 of file xAODRootTest.py.

391  def add (self, alg):
392  self.algs.append (alg)
393  return
394 

◆ finalize()

def xAODRootTest.Analysis.finalize (   self)

Definition at line 408 of file xAODRootTest.py.

408  def finalize (self):
409  if self.fout:
410  CHECK (self.event.finishWritingTo (self.fout))
411  return
412 
413 

◆ run()

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

Definition at line 395 of file xAODRootTest.py.

395  def run (self, n=None):
396  nent = self.event.getEntries()
397  if n != None:
398  nent = min (n, nent)
399  for i in range(nent):
400  self.event.getEntry(i)
401  print ('---> Event', i)
402  for a in self.algs:
403  a.execute (self.event)
404  if self.fout != None:
405  self.event.fill()
406  return
407 

Member Data Documentation

◆ algs

xAODRootTest.Analysis.algs

Definition at line 380 of file xAODRootTest.py.

◆ event

xAODRootTest.Analysis.event

Definition at line 383 of file xAODRootTest.py.

◆ f

xAODRootTest.Analysis.f

Definition at line 381 of file xAODRootTest.py.

◆ fout

xAODRootTest.Analysis.fout

Definition at line 385 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:50
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
python.processes.powheg.ZZj_MiNNLO.ZZj_MiNNLO.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZj_MiNNLO.py:18
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
lumiFormat.fill
fill
Definition: lumiFormat.py:104