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
Line 
1# ----------------------------------------------------------------------
2#  EXAMPLE: Rappture <load><run> output elements
3# ======================================================================
4#  AUTHOR: Derrick S. Kearney, Purdue University
5#  Copyright (c) 2005-2008  Purdue Research Foundation
6#
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
11
12# open the XML file containing the run parameters
13set driver [Rappture::library [lindex $argv 0]]
14
15set type [$driver get input.choice(importtype).current]
16set run1 [$driver get input.choice(first).current]
17set run2 [$driver get input.choice(second).current]
18
19$driver put output.log "hi mom"
20
21if { ("load" == $type) || ("both" == $type) } {
22    # test load.run
23    $driver put output.load.run(run1) $run1
24    $driver put output.load.run(run2) $run2
25}
26
27if { ("include" == $type) || ("both" == $type) } {
28    # test include.run
29    $driver put output.include.run(run1) $run1
30    $driver put output.include.run(run2) $run2
31}
32
33# save the updated XML describing the run...
34Rappture::result $driver
35exit 0
Note: See TracBrowser for help on using the repository browser.