Package pyana

This package collects code which deals with various aspects of the analysis tasks.

Module pyana.config

Job configuration for pyana

This software was developed for the LUSI project. If you use all or part of it, please give an appropriate acknowledgment.

See also: RelatedModule

Version: $Id: config.py 5534 2013-02-27 22:30:02Z salnikov@SLAC.STANFORD.EDU $

Author: Andrei Salnikov

Class pyana.config.config

class pyana.config.config(args=None)[source]
files()[source]

Returns the list of input file names

getJobConfig(option, default=None)[source]

Gets configuration option from one of many sections

getModuleConfig(module)[source]

Gets configuration options for a module as a dictionary

Module pyana.event_keys

User analysis module for pyana framework.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

Version: $Id: event_keys.py 3020 2012-03-06 22:22:18Z salnikov@SLAC.STANFORD.EDU $

Author: Andy Salnikov

Class pyana.event_keys.event_keys

class pyana.event_keys.event_keys[source]

Pyana module which prints event keys.

begincalibcycle(evt, env)[source]
beginjob(evt, env)[source]
beginrun(evt, env)[source]
endcalibcycle(evt, env)[source]
endjob(evt, env)[source]
endrun(evt, env)[source]
event(evt, env)[source]

Module pyana.histo

This module is a collection classes and methods to create and manage histograms from user analysis modules. Current implementation is based on ROOT package (http://root.cern.ch/). Histograms objects produced byt this package are actually ROOT objects. For detailed description of their interfaces consult ROOT documentation.

Class pyana.histo.HistoMgrRoot

class pyana.histo.HistoMgrRoot(**kw)[source]

This class is histogram manager implementation based on ROOT library. Histograms that are created by this manager reside either in memory or in a ROOT file.

Creates new histogram manager object. Users should not instantiate new objects, instead the environment method hmgr() should be used to obtain existing manager object.

Keyword arguments: file - name of the ROOT file to store histograms, if missing then histograms will be memory-resident.

close()[source]

Write everything to file and close the file.

file() → TFile[source]

Returns ROOT file object for this manager, or None if histograms are stored in memory.

h1d(*args, **kw) → TH1D[source]

Creates 1-dimensional histogram with bin contents stored as double precision numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TH1D. The returned Python object also inherits most of the methods of the C++ class.

h1f(*args, **kw) → TH1F[source]

Creates 1-dimensional histogram with bin contents stored as single precision numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TH1F. The returned Python object also inherits most of the methods of the C++ class.

h1i(*args, **kw) → TH1I[source]

Creates 1-dimensional histogram with bin contents stored as integer numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TH1I. The returned Python object also inherits most of the methods of the C++ class.

h2d(*args, **kw) → TH2D[source]

Creates 2-dimensional histogram with bin contents stored as double precision numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TH2D. The returned Python object also inherits most of the methods of the C++ class.

h2f(*args, **kw) → TH2F[source]

Creates 2-dimensional histogram with bin contents stored as single precision numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TH2D. The returned Python object also inherits most of the methods of the C++ class.

h2i(*args, **kw) → TH2I[source]

Creates 2-dimensional histogram with bin contents stored as integer numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TH2I. The returned Python object also inherits most of the methods of the C++ class.

histos() → list[source]

Returns the list of histograms in the current ROOT directory. User code does not need to use this methods, for framework implementation only.

prof(*args, **kw) → TProfile[source]

Creates 1-dimensional profile histogram with bin contents stored as double precision numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TProfile. The returned Python object also inherits most of the methods of the C++ class.

prof2d(*args, **kw) → TProfile2D[source]

Creates 2-dimensional profile histogram with bin contents stored as double precision numbers.

Method accepts the same arguments as the constructors of the corresponding C++ ROOT class TProfile2D. The returned Python object also inherits most of the methods of the C++ class.

Function pyana.histo.HistoMgr

pyana.histo.HistoMgr() → HistoMgrRoot[source]

Factory method which returns an instance of the histogram manager. Current implementation always returns the same ROOT manager instance.

Module pyana.merger

Code that merges results of processing from individual jobs

This software was developed for the LUSI project. If you use all or part of it, please give an appropriate acknowledgment.

See also: RelatedModule

Version: $Id: merger.py 1091 2010-07-07 22:45:39Z salnikov $

Author: Andrei Salnikov

Class pyana.merger.merger

class pyana.merger.merger[source]
_merger__mergeFiles(files)
_merger__mergeHistos(histos)
finish(env)[source]
merge(result)[source]