def generate(self, process, model, multiparticles=[]): """Create a process""" def run_cmd(cmd): interface.exec_cmd(cmd, errorhandling=False, printcmd=False, precmd=True, postcmd=True) interface = MGCmd.MasterCmd() interface.no_notification() # Select the Tensor Integral to include in the test misc.deactivate_dependence('pjfry', cmd = interface, log='stdout') misc.deactivate_dependence('samurai', cmd = interface, log='stdout') misc.activate_dependence('golem', cmd = interface, log='stdout') misc.activate_dependence('ninja', cmd = interface, log='stdout',MG5dir=MG5DIR) run_cmd('import model %s' % model) for multi in multiparticles: run_cmd('define %s' % multi) if isinstance(process, str): run_cmd('generate %s' % process) else: for p in process: run_cmd('add process %s' % p) files.rm(self.IOpath) run_cmd('output %s -f' % self.IOpath)
def testIO_TIR_output(self): """ target: [ggttx_IOTest/SubProcesses/(.*)\.f] """ interface = MGCmd.MasterCmd() interface.no_notification() def run_cmd(cmd): interface.exec_cmd(cmd, errorhandling=False, printcmd=False, precmd=True, postcmd=True) # Select the Tensor Integral to include in the test misc.deactivate_dependence('pjfry', cmd=interface, log='stdout') misc.deactivate_dependence('samurai', cmd=interface, log='stdout') misc.activate_dependence('golem', cmd=interface, log='stdout') misc.activate_dependence('ninja', cmd=interface, log='stdout', MG5dir=MG5DIR) run_cmd('generate g g > t t~ [virt=QCD]') interface.onecmd('output %s -f' % str(pjoin(self.IOpath, 'ggttx_IOTest')))
def testIO_TIR_output(self): """ target: [ggttx_IOTest/SubProcesses/(.*)\.f] """ interface = MGCmd.MasterCmd() interface.no_notification() def run_cmd(cmd): interface.exec_cmd(cmd, errorhandling=False, printcmd=False, precmd=True, postcmd=True) # Select the Tensor Integral to include in the test misc.deactivate_dependence('pjfry', cmd=interface, log='stdout') misc.deactivate_dependence('samurai', cmd=interface, log='stdout') misc.activate_dependence('golem', cmd=interface, log='stdout') misc.activate_dependence('ninja', cmd=interface, log='stdout', MG5dir=MG5DIR) run_cmd('generate g g > t t~ [virt=QCD]') interface.onecmd('output %s -f' % str(pjoin(self.IOpath, 'ggttx_IOTest'))) #remove some function from some file: IOTests.IOTest.remove_f77_function_from_file( pjoin(self.IOpath, 'ggttx_IOTest', 'SubProcesses', 'MadLoopCommons.f'), 'PRINT_MADLOOP_BANNER')
def setUp(self): """ Initialize the test """ self.interface = MGCmd.MasterCmd() self.interface.no_notification() # Below the key is the name of the logger and the value is a tuple with # first the handlers and second the level. self.logger_saved_info = {} # Select the Tensor Integral to include in the test misc.deactivate_dependence('pjfry', cmd=self.interface, log='stdout') misc.activate_dependence('golem', cmd=self.interface, log='stdout')
def setUp(self): """ Initialize the test """ self.interface = MGCmd.MasterCmd() self.interface.no_notification() # Below the key is the name of the logger and the value is a tuple with # first the handlers and second the level. self.logger_saved_info = {} # Select the Tensor Integral to include in the test misc.deactivate_dependence('pjfry', cmd = self.interface, log='stdout') misc.deactivate_dependence('samurai', cmd = self.interface, log='stdout') misc.activate_dependence('golem', cmd = self.interface, log='stdout') misc.activate_dependence('ninja', cmd = self.interface, log='stdout',MG5dir=MG5DIR)
def testIO_TIR_output(self): """ target: [ggttx_IOTest/SubProcesses/(.*)\.f] """ interface = MGCmd.MasterCmd() interface.no_notification() def run_cmd(cmd): interface.exec_cmd(cmd, errorhandling=False, printcmd=False, precmd=True, postcmd=True) # Select the Tensor Integral to include in the test misc.deactivate_dependence('pjfry', cmd = interface, log='stdout') misc.deactivate_dependence('samurai', cmd = interface, log='stdout') misc.activate_dependence('golem', cmd = interface, log='stdout') misc.activate_dependence('ninja', cmd = interface, log='stdout',MG5dir=MG5DIR) run_cmd('generate g g > t t~ [virt=QCD]') interface.onecmd('output %s -f' % str(pjoin(self.IOpath,'ggttx_IOTest')))