Files
karl/include/simulation/logger.h
T
csendlinger 2e5923ab6f restructured fields for cpu sync;
no longer whole object in species but additional
fields in the corresponding classes
2024-08-13 15:00:13 +02:00

36 lines
824 B
C++
Executable File

#ifndef LOGGER_H
#define LOGGER_H
#include <map>
#include <vector>
#include "simulation/coordinates.h"
enum class DeletionType {
wall,
recombination,
max_interactions,
max_time_alive,
cluster_formation
};
class DeletionLogger {
public:
DeletionLogger(std::vector<DeletionType> used_types);
// why a coordinate as a parameter -> not used in implementation
virtual void logDeletion(const Coordinate& coordinate, DeletionType type);
std::map<DeletionType, long int> numDeletions() const;
void numDeletions(long int new_value, DeletionType type);
long int numDeletions(DeletionType type) const;
void resetDeletionLogger();
friend class CpuSynchronizer;
private:
std::map<DeletionType, long int> num_deletions;
std::map<DeletionType, long int> sync_num_deletions;
};
#endif /* LOGGER_H */