source: trunk/examples/zoo/loadrun/loadrun.tcl @ 1217

Last change on this file since 1217 was 1217, checked in by dkearney, 16 years ago

adding ability to specify runfiles to be either loaded or included with the
results of the current simulation. loading a runfile will simply call the tool object's load function within analyzer and the runfile will be loaded as a previous simulation result. including a runfile involves copying the results (everything under output) from the runfile into the current run.xml file and all of the results are shown as one single simulation.

This behavior is demonstrated in the zoo's loadrun example.

File size: 1.2 KB
1# ----------------------------------------------------------------------
2#  EXAMPLE: Rappture <load><run> output elements
3# ======================================================================
4#  AUTHOR: Derrick S. Kearney, Purdue University
5#  Copyright (c) 2005-2008  Purdue Research Foundation
7#  See the file "license.terms" for information on usage and
8#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9# ======================================================================
10package require Rappture
12# open the XML file containing the run parameters
13set driver [Rappture::library [lindex $argv 0]]
15set type [$driver get input.choice(importtype).current]
16set run1 [$driver get input.choice(first).current]
17set run2 [$driver get input.choice(second).current]
19$driver put output.log "hi mom"
21if { ("load" == $type) || ("both" == $type) } {
22    # test
23    $driver put $run1
24    $driver put $run2
27if { ("include" == $type) || ("both" == $type) } {
28    # test
29    $driver put $run1
30    $driver put $run2
33# save the updated XML describing the run...
34Rappture::result $driver
35exit 0
Note: See TracBrowser for help on using the repository browser.