Last change
on this file since 87 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
899 bytes
|
Line | |
---|
1 | #ifdef STATISTICS |
---|
2 | #include "Behavioural/include/Stat.h" |
---|
3 | #include "Behavioural/include/Version.h" |
---|
4 | |
---|
5 | namespace morpheo { |
---|
6 | namespace behavioural { |
---|
7 | |
---|
8 | void Stat::generate_file (void) |
---|
9 | { |
---|
10 | std::string body = print(1); |
---|
11 | |
---|
12 | cycle_t _cycle_sum = sc_simulation_time(); |
---|
13 | |
---|
14 | morpheo::behavioural::XML * xml = new morpheo::behavioural::XML (_name_instance); |
---|
15 | |
---|
16 | xml->balise_open_begin("statistics"); |
---|
17 | xml->attribut("nb_cycle_before_begin",toString(_nb_cycle_before_begin)); |
---|
18 | xml->attribut("period",toString(_period)); |
---|
19 | xml->attribut("nb_cycle_simulation",toString(_cycle_sum)); |
---|
20 | xml->attribut("nb_cycle_statistics",toString(_cycle_sum-_nb_cycle_before_begin)); |
---|
21 | xml->attribut("morpheo_version",MORPHEO_VERSION); |
---|
22 | xml->balise_open_end(); |
---|
23 | |
---|
24 | xml->text (body); |
---|
25 | |
---|
26 | xml->balise_close(); |
---|
27 | |
---|
28 | xml->filename_extension ("stat"); |
---|
29 | xml->generate_file(); |
---|
30 | |
---|
31 | delete xml; |
---|
32 | } |
---|
33 | }; |
---|
34 | }; |
---|
35 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.