12 #ifndef SSTMAC_COMMON_STATS_STAT_LOGGER_H_INCLUDED 13 #define SSTMAC_COMMON_STATS_STAT_LOGGER_H_INCLUDED 67 return "stat_collector";
103 const std::string& ns,
104 const std::string&
deflt,
125 check_open(std::fstream& myfile,
const std::string& fname, std::ios::openmode flags = std::ios::out);
139 const std::string& ns,
140 const std::string&
deflt,
141 const char* suffix = 0){
144 T* t =
dynamic_cast<T*
>(coll);
147 "failed casting stats objects");
virtual void simulation_finished(timestamp end)=0
This is to notify that the statistics collector is done.
void set_registered(bool reg)
void clone_into(stat_collector *cln) const
static bool check_open(std::fstream &myfile, const std::string &fname, std::ios::openmode flags=std::ios::out)
Check to see if the file is open.
virtual void dump_global_data()=0
After post-processing, this notifies the collector to dump data to a file.
A type of logger that collects some kind of statistic and outputs to a file during or at the end of a...
virtual void set_id(int id)
virtual ~stat_collector()
A basic container for time (subject to future transplant).
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
void add_suffix(const std::string &suffix)
virtual void reduce(stat_collector *coll)=0
virtual void global_reduce(parallel_runtime *rt)=0
virtual stat_collector * clone() const =0
std::string fileroot() const
static stat_collector * optional_build(sprockit::sim_parameters *params, const std::string &ns, const std::string &deflt, const char *suffix)
#define spkt_throw(exc,...)
T * optional_stats(sprockit::sim_parameters *params, const std::string &ns, const std::string &deflt, const char *suffix=0)
virtual std::string to_string() const
virtual void init_factory_params(sprockit::sim_parameters *params)
virtual void dump_local_data()=0
After post-processing, this notifies the collector to dump data to a file.
DeclareFactory(parallel_runtime)
Error indicating some internal value was unexpected.