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 387 of file xAODRootTest.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 388 of file xAODRootTest.py.

388  def __init__ (self, ifname, ofname = None):
389  self.algs = []
390  self.f = ROOT.TFile (ifname)
391  self.event = ROOT.xAOD.TEvent (ROOT.xAOD.TEvent.kAthenaAccess)
392  CHECK (self.event.readFrom (self.f, True, 'CollectionTree'))
393  self.tree = ROOT.xAOD.MakeTransientTree(self.event, 'CollectionTree')
394  self.fout = None
395  if ofname:
396  self.fout = ROOT.TFile.Open (ofname, 'recreate')
397  CHECK (self.event.writeTo (self.fout))
398  return
399 

Member Function Documentation

◆ add()

def xAODRootTest.Analysis.add (   self,
  alg 
)

Definition at line 400 of file xAODRootTest.py.

400  def add (self, alg):
401  self.algs.append (alg)
402  return
403 

◆ finalize()

def xAODRootTest.Analysis.finalize (   self)

Definition at line 417 of file xAODRootTest.py.

417  def finalize (self):
418  if self.fout:
419  CHECK (self.event.finishWritingTo (self.fout))
420  return
421 
422 

◆ run()

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

Definition at line 404 of file xAODRootTest.py.

404  def run (self, n=None):
405  nent = self.tree.GetEntries()
406  if n != None:
407  nent = min (n, nent)
408  for i in range(nent):
409  self.tree.GetEntry(i)
410  print ('---> Event', i)
411  for a in self.algs:
412  a.execute (self.tree, self.event)
413  if self.fout != None:
414  self.event.fill()
415  return
416 

Member Data Documentation

◆ algs

xAODRootTest.Analysis.algs

Definition at line 389 of file xAODRootTest.py.

◆ event

xAODRootTest.Analysis.event

Definition at line 391 of file xAODRootTest.py.

◆ f

xAODRootTest.Analysis.f

Definition at line 390 of file xAODRootTest.py.

◆ fout

xAODRootTest.Analysis.fout

Definition at line 394 of file xAODRootTest.py.

◆ tree

xAODRootTest.Analysis.tree

Definition at line 393 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
GetEntries
TGraphErrors * GetEntries(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:4019
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
add
bool add(const std::string &hname, TKey *tobj)
Definition: fastadd.cxx:55
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18