]>
Commit | Line | Data |
---|---|---|
1 | <chapter name="Save Settings"> | |
2 | ||
3 | <h2>Save Settings</h2> | |
4 | ||
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. | |
11 | ||
12 | <h3>Basic instructions</h3> | |
13 | ||
14 | The functionality of the PHP option is described in the following. | |
15 | ||
16 | <p/> | |
17 | <table border="2" cellpadding="5"><td> | |
18 | <PHPFILECODE/> | |
19 | </td></table> | |
20 | ||
21 | <ul> | |
22 | ||
23 | <p/><li> | |
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> | |
27 | ||
28 | <p/><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> | |
32 | ||
33 | <p/><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> | |
38 | ||
39 | <p/><li> | |
40 | When you have finished all the changes you need, return to this page | |
41 | and click <b>Finish File</b>.</li> | |
42 | ||
43 | <p/><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> | |
46 | ||
47 | <p/><li> | |
48 | In the menu that appears, pick the option <b>Save Link As</b> | |
49 | (or equivalent).</li> | |
50 | ||
51 | <p/><li> | |
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> | |
55 | ||
56 | <p/><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> | |
59 | ||
60 | <p/><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 | |
63 | in a text editor. | |
64 | </li> | |
65 | ||
66 | </ul> | |
67 | ||
68 | <p/> | |
69 | <h3>Supplementary notes</h3> | |
70 | ||
71 | ||
72 | The documentation files exist in three versions. | |
73 | <ol> | |
74 | ||
75 | <p/><li> | |
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> | |
79 | ||
80 | <p/><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> | |
87 | ||
88 | <p/><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> | |
94 | ||
95 | </ol> | |
96 | ||
97 | <p/> | |
98 | A few further comments about the operation of the PHP option: | |
99 | <ul> | |
100 | ||
101 | <p/><li> | |
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> | |
108 | ||
109 | <p/><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> | |
116 | ||
117 | <p/><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 | |
120 | <pre> | |
121 | name-of-flag/mode/parameter/word = value | |
122 | </pre> | |
123 | with one variable per line. Thereafter all the settings on the page | |
124 | are restored to their default values.</li> | |
125 | ||
126 | <p/><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 | |
133 | afterwards.</li> | |
134 | ||
135 | <p/><li> | |
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. | |
140 | ||
141 | <p/><li> | |
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 | |
145 | interrelated. | |
146 | ||
147 | </chapter> | |
148 | ||
149 | <!-- Copyright (C) 2008 Torbjorn Sjostrand --> | |
150 |