1 <chapter name="Save Settings">
5 The information on this webpage is only valid if you access the PHP
6 dynamic webpages via a web browser, and does not apply to the static
7 HTML equivalents. With PHP, all of the settings in the PYTHIA program
8 are represented by radio buttons or fill-in boxes, that makes it easy
9 for you to construct a file with your desired changes. This file can
10 then be read into PYTHIA by your main program to steer the whole run.
12 <h3>Basic instructions</h3>
14 The functionality of the PHP option is described in the following.
17 <table border="2" cellpadding="5"><td>
24 To begin with, you must specify a <b>(temporary) file name</b> in the
25 box above. If the filename already exists on the server, you will be
26 requested to pick a new name.</li>
29 Once you have <b>Submit</b>ted your filename, you can browse through the
30 pages and make your selections. The values currently selected when you
31 load the page are the default values.</li>
34 When you have finished making your changes to a particular page,
35 you <b>must</b> click on <b>Save Settings</b> at the <b>bottom</b> of
36 the page. This will write the changes to your temporary file. If you make
37 a mistake, just repeat the procedure for that category again.<br>
40 When you have finished all the changes you need, return to this page
41 and click <b>Finish File</b>.</li>
44 You will then get up a link, that you are asked to <b>right-click</b>
45 with your mouse (or equivalent).</li>
48 In the menu that appears, pick the option <b>Save Link As</b>
52 You will now get up a file browser, for you to pick and <b>Save</b>
53 the location and file name (the latter by default the same as the
54 temporary file name).</li>
57 At any time, if you click the <b>RESET</b> button, your temporary
58 file will be erased and you can start anew.</li>
61 Before you use a file, be sure to <b>check it visually</b> to confirm
62 that you saved what you intended to. Minor corrections are easily made
69 <h3>Supplementary notes</h3>
72 The documentation files exist in three versions.
76 As a set of <code>.xml</code> files, in the <code>xmldoc/</code>
77 subdirectory. These are the master copies that no user ever should
78 touch, but that are used to generate the variants below.</li>
81 As a set of <code>.html</code> files, in the <code>htmldoc/</code>
82 subdirectory. You can open your own locally installed copy of the
83 <code>Welcome.html</code> file in your web browser and thereafter
84 navigate among all the pages. You can learn which parameters are free
85 to be changed, but not change anything, except by brute-force
86 cut-and-paste to a file of your own.</li>
89 As a set of <code>.php</code> files, in the <code>phpdoc/</code>
90 subdirectory. For these files to provide the functionality described
91 above they have to accessed via a webserver. The one where you have
92 your homepage should work fine. Alternatively you can use pages already
93 available on another server.</li>
98 A few further comments about the operation of the PHP option:
102 To set up the PHP files on your webserver, you have to install the whole
103 <code>phpdoc/</code> subdirectory there. In addition to the
104 <code>.php</code> code this includes a few more files, plus a
105 subdirectory named <code>files</code> where the temporary files
106 are stored. This subdirectory must have public write access to work
107 (<code>chmod a+w files</code> if not).</li>
110 The "temporary" files stored in <code>files</code> actually remain
111 unless the RESET button is used. The good news is that this makes
112 it possible to recover a file that otherwise might be lost. The bad
113 news is that the <code>files</code> directory may need to be cleaned
114 up from time to time. (But typically the files are pretty small, so
115 this should not be a major problem.)</li>
118 When you click the <b>Save Settings</b> button on the bottom of a page
119 all changed settings are written on the temporary file in the format
121 name-of-flag/mode/parameter/word = value
123 with one variable per line. Thereafter all the settings on the page
124 are restored to their default values.</li>
127 You can return to a page to do some further changes and save those.
128 If you change the same parameter twice, it is the last value that
129 counts. (Both values are stored in the file, with the more recent
130 lower down, and then PYTHIA does the changes sequentially.) However
131 remember that unchanged values are not stored, so if you want to
132 restore some default value it may be simpler to edit the file
136 The changeable flags/modes/parameters/words are mainly in the
137 "Setup Run Tasks" section of the index, but a few (less
138 frequently used ones) can also be found lower down, in the
139 "Study Output" and "Link to Other Programs" pages.
142 It is not (yet) possible to modify particle data within the PHP-based
143 setup approach. This is a more difficult task, since e.g. the
144 modifications one may want to do in a decay table can be quite
149 <!-- Copyright (C) 2012 Torbjorn Sjostrand -->