27 #ifndef GRESPONSECACHE_HPP
28 #define GRESPONSECACHE_HPP
32 #include <sys/types.h>
33 #if defined(__sun) && (defined(__svr4__) || defined(__SVR4)) // SOLARIS
34 typedef uint64_t u_int64_t;
78 void set(
const std::string& name,
82 void set(
const std::string& name,
87 void remove(
const std::string& name);
88 bool contains(
const std::string& name,
91 double* value = NULL)
const;
92 bool contains(
const std::string& name,
96 double* value = NULL)
const;
119 return (
"GResponseCache");
std::map< std::string, GResponseCacheEnergy > GResponseCacheName
std::map< u_int64_t, GResponseCacheDir > GResponseCacheEnergy
void free_members(void)
Delete class members.
Energy value class definition.
void init_members(void)
Initialise class members.
std::string classname(void) const
Return class name.
GResponseCache & operator=(const GResponseCache &cache)
Assignment operator.
Definition of interface for all GammaLib classes.
GResponseCache(void)
Void constructor.
void copy_members(const GResponseCache &cache)
Copy class members.
int size(void) const
Return number of elements in cache.
u_int64_t hash(const GEnergy &ereco, const GEnergy &etrue) const
Encode reconstructued and true energy into hash value.
Abstract instrument direction base class.
void remove(const std::string &name)
Remove cache for source.
std::map< u_int64_t, double > GResponseCacheDir
virtual ~GResponseCache(void)
Destructor.
Interface class for all GammaLib classes.
bool is_empty(void) const
Checks whether the cache is empty.
GResponseCacheName m_cache
int nenergies(void) const
Return number of energies in cache.
GResponseCache * clone(void) const
Clone response cache.
void clear(void)
Clear response cache.
bool contains(const std::string &name, const GEnergy &ereco, const GEnergy &etrue, double *value=NULL) const
Check if cache contains a value for specific parameters.
void set(const std::string &name, const GEnergy &ereco, const GEnergy &etrue, const double &value)
Set cache value.
std::string print(const GChatter &chatter=NORMAL) const
Print response cache.
Class that handles energies in a unit independent way.