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

In This Package:

__init__.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 __all__ = ['Configure','GenToolsConf','Helpers', 'Dumper']
00004 
00005 import GenToolsConf
00006 
00007 class Configure:
00008 
00009     def __init__(self,algname="Generator",genname="Kinematics",helper=None,use_sim_subseq=False):
00010         ''' Create default configuration for GenTools.  This creates a
00011         GtGenerator algorithm of the given algname and genname and
00012         adds it to the list of top algorithms.  You can then configure
00013         one of various different GenTools.Helpers object and register
00014         them with register().  If you pass a pre-created helper object
00015         in this constructor it will be register()ed for you.
00016         '''
00017         self.generator = GenToolsConf.GtGenerator(algname)
00018         self.generator.GenName = genname
00019         if helper:
00020             self.register(helper)
00021         if not use_sim_subseq:
00022             from Gaudi.Configuration import ApplicationMgr
00023             theApp = ApplicationMgr()
00024             theApp.TopAlg.append(self.generator)
00025             pass
00026             
00027         return
00028 
00029     def register(self, helper):
00030         '''
00031         Register an instance of a specific configuration helper (Gun, HepEVT, etc)
00032         '''
00033         self.helper = helper
00034         self.generator.GenTools = helper.tools()
00035         return
00036 
00037 class Dumper:
00038     '''
00039     Configure and add the dumper algorithm
00040     '''
00041     def __init__(self):
00042         from GenTools.GenToolsConf import GtHepMCDumper
00043         dumper = GtHepMCDumper("gendumper")
00044         from Gaudi.Configuration import ApplicationMgr
00045         theApp = ApplicationMgr()
00046         theApp.TopAlg.append(dumper)
00047         self.dumper = dumper
00048         return
00049 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

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