| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GenTools::Helpers::HepEVT Class Reference

List of all members.

Public Member Functions

def __init__
def tools

Detailed Description

Configure kinematics to use a HepEVT source.

Definition at line 185 of file Helpers.py.


Member Function 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 188 of file Helpers.py.

00196                   :
00197         ''' Configure for a HepEVT data source.  First argument is the
00198         data source and must be specified.  If it is an executable
00199         source the last character in the string must be a pipe ('|')
00200         and if the executable is not specified with an absolute path
00201         it will be looked up using your PATH environment variable.
00202         You may specify the "positioner", "timerator", and "transformer" tools or later
00203         configure them through the members of these same names.
00204         '''
00205 
00206         exe = hepEvtDataSource.split(' ')[0]
00207         if name == None:
00208             # Automatically set name based on executable
00209             exeName = exe[exe.rfind('/')+1:]
00210             dot = exeName.rfind('.')
00211             basename = exeName
00212             if dot > 0: basename = exeName[:dot]
00213             sanitized = basename.replace('.','_')
00214             name = sanitized
00215 
00216         # If we got an executable and it is relative, look for it in the path
00217         if hepEvtDataSource[-1] == '|' and hepEvtDataSource[0] != '/':
00218             import os, os.path
00219             path = os.getenv('PATH')
00220             for p in path:
00221                 if (os.path.isfile(path+'/'+exe)):
00222                     hepEvtDataSource = path+'/'+exe + ' ' + ' '.join(hepEvtDataSource.split(' ')[1:])
00223                     break
00224                 continue
00225             pass
00226         
00227         self.hepevt = GtHepEvtGenTool(name+'HepEvt',
00228                                       HepEvtDataSource = hepEvtDataSource)
00229         if positioner == None:
00230             positioner = GtPositionerTool(name+"Positioner")
00231         if timerator == None:
00232             timerator = GtTimeratorTool(name+"Timerator",
00233                                         LifeTime = 1*units.second)
00234         if transformer == None:
00235             transformer = GtTransformTool(name+"Transformer")
00236 
00237 
00238         self.positioner = positioner
00239         
00240         self.timerator = timerator
00241         
00242         self.transformer = transformer
00243 
        return

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

Definition at line 244 of file Helpers.py.

00246                    :
        return [self.hepevt,self.positioner,self.timerator,self.transformer]


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

Generated on Mon Apr 11 20:55:39 2011 for GenTools by doxygen 1.4.7