SST/macro
location_trace.h
Go to the documentation of this file.
1 #ifndef LOCATION_TRACE_H
2 #define LOCATION_TRACE_H
3 
6 
7 namespace sstmac {
8 
10  public stat_collector
11 {
12 
13  public:
14  std::string
15  to_string() const {
16  return "location trace";
17  }
18 
19  void
20  collect(timestamp created,
21  event_loc_id creator,
22  timestamp scheduled,
23  event_loc_id runner);
24 
25  bool
26  read(std::istream& myfile,
27  timestamp& created,
28  event_loc_id& creator,
29  timestamp& scheduled,
30  event_loc_id& runner);
31 
32  void
34 
35  void
37 
38  void
40 
41  void
43 
45  clone_me(int id) const {
46  location_trace* cln = new location_trace;
47  cln->set_id(id);
48  return cln;
49  }
50 
52  clone() const {
53  return clone_me(-1);
54  }
55 
56  void
57  reduce(stat_collector* coll);
58 
59  void clear();
60 
61  virtual ~location_trace() {}
62 
63 
64  private:
65  struct event {
70  };
71 
72  std::list<event> local_events_;
73 
74  std::map<timestamp, event> global_events_;
75 
76 };
77 
78 }
79 
80 #endif // LOCATION_TRACE_H
81 
std::map< timestamp, event > global_events_
void simulation_finished(timestamp end)
This is to notify that the statistics collector is done.
bool read(std::istream &myfile, timestamp &created, event_loc_id &creator, timestamp &scheduled, event_loc_id &runner)
void dump_local_data()
After post-processing, this notifies the collector to dump data to a file.
void dump_global_data()
After post-processing, this notifies the collector to dump data to a file.
void global_reduce(parallel_runtime *rt)
A type of logger that collects some kind of statistic and outputs to a file during or at the end of a...
std::string to_string() const
virtual void set_id(int id)
stat_collector * clone() const
void collect(timestamp created, event_loc_id creator, timestamp scheduled, event_loc_id runner)
A basic container for time (subject to future transplant).
Definition: timestamp.h:29
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
location_trace * clone_me(int id) const
std::list< event > local_events_
void reduce(stat_collector *coll)