/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Classes | Public Member Functions | Public Attributes
GenTools::histograms::HistBase Class Reference
Inheritance diagram for GenTools::histograms::HistBase:
Inheritance graph
[legend]
Collaboration diagram for GenTools::histograms::HistBase:
Collaboration graph
[legend]

List of all members.

Classes

class  PerSite

Public Member Functions

def __init__
def initialize
def site_ad_by_point
def __init__
def initialize
def execute
def finalize
def verbose
def debug
def info
def warning
def error
def fatal
def getAES
def initializeHeader
def finalizeHeader

Public Attributes

 prefix
 sites
 msgSvc
 archiveSvc
 stats
 defaultInputLocation
 execNumber
 currentJobId

Detailed Description

Basic histogram handling common to all algs

Definition at line 30 of file histograms.py.


Constructor & Destructor Documentation

def GenTools::histograms::HistBase::__init__ (   self,
  name,
  prefix 
)

Reimplemented in GenTools::histograms::HistVerts.

Definition at line 44 of file histograms.py.

00045                                   :
00046         DybPythonAlg.__init__(self,name)
00047         self.prefix = prefix
00048         self.sites = []         # PerSite infor
00049         return


Member Function Documentation

def GenTools::histograms::HistBase::initialize (   self)

Reimplemented in GenTools::histograms::HistVerts.

Definition at line 50 of file histograms.py.

00051                         :
00052         print 'Calling DybPythonAlg.initialize(self)'
00053         sc = DybPythonAlg.initialize(self)
00054         if sc.isFailure(): return sc
00055 
00056         print 'HistBase.initialize()'
00057 
00058         statSvc = self.svc('IStatisticsSvc','StatisticsSvc')
00059 
00060         for nads,nick in [(2,'db'),(2,'la'),(4,'far')]:
00061             keeper = hists.Keeper(statSvc,self.prefix+nick)
00062             site_de_name = '/dd/Structure/Sites/%s-rock' % nick
00063             site_de = self.getDet(site_de_name)
00064             ad_des = []
00065             for iad in range(nads):
00066                 iad += 1
00067                 ad_de_name = '/dd/Structure/AD/%s-oil%d' % (nick,iad)
00068                 ad_de = self.getDet(ad_de_name)
00069                 ad_des.append(ad_de)
00070                 continue                
00071             self.sites.append(HistBase.PerSite(nick,site_de,ad_des,keeper))
00072             continue
00073 
00074         return SUCCESS

def GenTools::histograms::HistBase::site_ad_by_point (   self,
  gaudi_point 
)
Return tuple of (site,ad_de) that contains the given global gaudi point.
If not in a site, both are None.  If not in an AD ad_de is None.

Definition at line 75 of file histograms.py.

00076                                            :
00077         '''
00078         Return tuple of (site,ad_de) that contains the given global gaudi point.
00079         If not in a site, both are None.  If not in an AD ad_de is None.
00080         '''
00081 
00082         xyz  = [gaudi_point.x(),gaudi_point.y(),gaudi_point.z()]
00083         xyz_m = map(lambda x: x/units.meter, xyz)
00084         for site in self.sites:
00085             site_gi = site.site_de.geometry()
00086             local_point = site_gi.toLocal(gaudi_point)
00087             if not site_gi.isInside(gaudi_point):
00088                 continue
00089             for ad_de in site.ad_de:
00090                 if ad_de.geometry().isInside(gaudi_point):
00091                     return (site,ad_de)
00092                 continue
00093             return (site,None)
00094             continue
00095         return (None,None)


Member Data Documentation

Definition at line 44 of file histograms.py.

Definition at line 44 of file histograms.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:18:51 for GenTools by doxygen 1.7.4