Rev 266 | Rev 319 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 266 | Rev 267 | ||
---|---|---|---|
Line 176... | Line 176... | ||
176 | } |
176 | } |
177 | 177 | ||
178 | $data = json_decode($code, true); |
178 | $data = json_decode($code, true); |
179 | 179 | ||
180 | $neve = $data['analysis']['neve']; |
180 | $neve = $data['analysis']['neve']; |
- | 181 | $first = $data['analysis']['first']; |
|
- | 182 | $evprint = $data['analysis']['print']; |
|
181 | $source= $data['analysis']['datasource']; |
183 | $source= $data['analysis']['datasource']; |
182 | 184 | ||
183 | $xml = '<?xml version="1.0" encoding="utf-8"?>' . xmlWalker($data,'start'); |
185 | $xml = '<?xml version="1.0" encoding="utf-8"?>' . xmlWalker($data,'start'); |
184 | $dom = new DOMDocument; |
186 | $dom = new DOMDocument; |
185 | $dom->loadXML($xml); |
187 | $dom->loadXML($xml); |
Line 194... | Line 196... | ||
194 | 196 | ||
195 | $fstart = $dom->createElement("init"); |
197 | $fstart = $dom->createElement("init"); |
196 | $dom->appendChild($fstart); |
198 | $dom->appendChild($fstart); |
197 | 199 | ||
198 | $el = $dom->getElementsByTagName('neve')->item(0); |
200 | $el = $dom->getElementsByTagName('neve')->item(0); |
- | 201 | $fstart->appendChild($el); |
|
- | 202 | $el = $dom->getElementsByTagName('first')->item(0); |
|
- | 203 | $fstart->appendChild($el); |
|
- | 204 | $el = $dom->getElementsByTagName('print')->item(0); |
|
199 | $fstart->appendChild($el); |
205 | $fstart->appendChild($el); |
200 | $el = $dom->getElementsByTagName('datasource')->item(0); |
206 | $el = $dom->getElementsByTagName('datasource')->item(0); |
201 | $fstart->appendChild($el); |
207 | $fstart->appendChild($el); |
202 | 208 | ||
203 | $histogramCount = $dom->getElementsByTagName('h1d')->length; |
209 | $histogramCount = $dom->getElementsByTagName('h1d')->length; |
Line 253... | Line 259... | ||
253 | 259 | ||
254 | 260 | ||
255 | $nodelist = $fstart->getElementsByTagName('h1d'); |
261 | $nodelist = $fstart->getElementsByTagName('h1d'); |
256 | $init = PHP_EOL . "void Blab2::Init(){" . PHP_EOL ; |
262 | $init = PHP_EOL . "void Blab2::Init(){" . PHP_EOL ; |
257 | $init .="fNeve=$neve;" . PHP_EOL ; |
263 | $init .="fNeve=$neve;" . PHP_EOL ; |
- | 264 | $init .="fNfirst=$first;" . PHP_EOL ; |
|
258 | $init .="fData=$source;" . PHP_EOL ; |
265 | $init .="fData=$source;" . PHP_EOL ; |
- | 266 | $init .="fPrint=$evprint;" . PHP_EOL ; |
|
259 | foreach ($nodelist as $node) { |
267 | foreach ($nodelist as $node) { |
260 | $init .= $node->nodeName . "("; |
268 | $init .= $node->nodeName . "("; |
261 | $cnt=0; |
269 | $cnt=0; |
262 | foreach ($node->childNodes as $el) { |
270 | foreach ($node->childNodes as $el) { |
263 | if ($cnt) { |
271 | if ($cnt) { |