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

In This Package:

Public Member Functions | Public Attributes
GenTools::Helpers::HepEVT Class Reference

List of all members.

Public Member Functions

def __init__
def tools

Public Attributes

 hepevt
 positioner
 timerator
 transformer

Detailed Description

Configure kinematics to use a HepEVT source.

Definition at line 254 of file Helpers.py.


Constructor & Destructor Documentation

def GenTools::Helpers::HepEVT::__init__ (   self,
  hepEvtDataSource,
  name = None,
  positioner = None,
  timerator = None,
  transformer = None 
)
Configure for a HepEVT data source.  First argument is the
data source and must be specified.  If it is an executable
source the last character in the string must be a pipe ('|')
and if the executable is not specified with an absolute path
it will be looked up using your PATH environment variable.
You may specify the "positioner", "timerator", and "transformer" tools or later
configure them through the members of these same names.

Definition at line 259 of file Helpers.py.

00266                   :
00267         ''' Configure for a HepEVT data source.  First argument is the
00268         data source and must be specified.  If it is an executable
00269         source the last character in the string must be a pipe ('|')
00270         and if the executable is not specified with an absolute path
00271         it will be looked up using your PATH environment variable.
00272         You may specify the "positioner", "timerator", and "transformer" tools or later
00273         configure them through the members of these same names.
00274         '''
00275 
00276         exe = hepEvtDataSource.split(' ')[0]
00277         if name == None:
00278             # Automatically set name based on executable
00279             exeName = exe[exe.rfind('/')+1:]
00280             dot = exeName.rfind('.')
00281             basename = exeName
00282             if dot > 0: basename = exeName[:dot]
00283             sanitized = basename.replace('.','_')
00284             name = sanitized
00285 
00286         # If we got an executable and it is relative, look for it in the path
00287         if hepEvtDataSource[-1] == '|' and hepEvtDataSource[0] != '/':
00288             import os, os.path
00289             path = os.getenv('PATH')
00290             for p in path:
00291                 if (os.path.isfile(path+'/'+exe)):
00292                     hepEvtDataSource = path+'/'+exe + ' ' + ' '.join(hepEvtDataSource.split(' ')[1:])
00293                     break
00294                 continue
00295             pass
00296         
00297         self.hepevt = GtHepEvtGenTool(name+'HepEvt',
00298                                       HepEvtDataSource = hepEvtDataSource)
00299         if positioner == None:
00300             positioner = GtPositionerTool(name+"Positioner")
00301         if timerator == None:
00302             timerator = GtTimeratorTool(name+"Timerator",
00303                                         LifeTime = 1*units.second)
00304         if transformer == None:
00305             transformer = GtTransformTool(name+"Transformer")
00306 
00307 
00308         self.positioner = positioner
00309         
00310         self.timerator = timerator
00311         
00312         self.transformer = transformer
00313 
00314         return


Member Function Documentation

def GenTools::Helpers::HepEVT::tools (   self)

Definition at line 315 of file Helpers.py.

00316                    :
00317         return [self.hepevt,self.positioner,self.timerator,self.transformer]


Member Data Documentation

Definition at line 266 of file Helpers.py.

Definition at line 266 of file Helpers.py.

Definition at line 266 of file Helpers.py.

Definition at line 266 of file Helpers.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