1 | #ifdef STATISTICS |
---|
2 | |
---|
3 | #ifndef morpheo_behavioural_Statistics_h |
---|
4 | #define morpheo_behavioural_Statistics_h |
---|
5 | |
---|
6 | /* |
---|
7 | * $Id$ |
---|
8 | * |
---|
9 | * [ Description ] |
---|
10 | * |
---|
11 | */ |
---|
12 | |
---|
13 | #include <stdint.h> |
---|
14 | #include <iostream> |
---|
15 | #include "Behavioural/include/Parameters_Statistics.h" |
---|
16 | #include "Include/Average.h" |
---|
17 | #include "Include/Percent.h" |
---|
18 | |
---|
19 | using namespace std; |
---|
20 | |
---|
21 | namespace morpheo { |
---|
22 | namespace behavioural { |
---|
23 | |
---|
24 | class Statistics |
---|
25 | { |
---|
26 | // -----[ fields ]---------------------------------------------------- |
---|
27 | protected : const string _name; |
---|
28 | protected : const Parameters_Statistics _parameters_statistics; |
---|
29 | |
---|
30 | protected : uint32_t _nb_statistics; // nb period ... |
---|
31 | protected : uint32_t _period_current; // nb cycle in current period |
---|
32 | |
---|
33 | // -----[ methods ]--------------------------------------------------- |
---|
34 | public : Statistics (string name , |
---|
35 | Parameters_Statistics parameters_statistics); |
---|
36 | public : virtual ~Statistics (); |
---|
37 | |
---|
38 | protected : uint32_t compute_cycle_begin (uint32_t num_statistics); |
---|
39 | protected : uint32_t compute_cycle_end (uint32_t num_statistics, uint32_t nb_cycle); |
---|
40 | |
---|
41 | public : virtual string print_body (uint32_t depth) = 0; |
---|
42 | public : virtual string print (uint32_t depth) = 0; |
---|
43 | public : void generate_file (string stat ); |
---|
44 | public : void generate_file (void); |
---|
45 | |
---|
46 | private : template <class Counters, class Parameters_Counters> void save (Counters ** &, Parameters_Counters parameters); |
---|
47 | protected : template <class Counters, class Parameters_Counters> void test_if_save(Counters ** &, Parameters_Counters parameters); |
---|
48 | }; |
---|
49 | |
---|
50 | }; // end namespace behavioural |
---|
51 | }; // end namespace morpheo |
---|
52 | |
---|
53 | #endif |
---|
54 | #endif |
---|