77 const std::string& method =
"LOG",
78 const double& gamma = 1.0);
94 void remove(
const int&
index);
99 void set(
const int& num,
102 const std::string& method =
"LOG",
103 const double& gamma = 1.0);
106 const bool& clobber =
false,
107 const std::string& unit =
"keV")
const;
111 const std::string& unit =
"keV")
const;
117 void emin(
const int& index,
const GEnergy& energy);
118 void emax(
const int& index,
const GEnergy& energy);
GEnergy * m_max
Array of interval maximum energies.
void init_members(void)
Initialise class members.
void copy_members(const GEbounds &ebds)
Copy class members.
friend bool operator==(const GEbounds &a, const GEbounds &b)
Energy boundaries equality operator friend.
Energy value class definition.
GEnergy m_emin
Minimum energy of all intervals.
friend bool operator!=(const GEbounds &a, const GEbounds &b)
Energy boundaries inequality operator friend.
GEbounds(void)
Constructor.
int size(void) const
Return number of energy boundaries.
void append(const GEnergy &emin, const GEnergy &emax)
Append energy interval.
GEbounds * clone(void) const
Clone energy boundaries.
bool contains(const GEnergy &eng) const
Checks whether energy boundaries contain energy.
void set_attributes(void)
Set class attributes.
void read(const GFitsTable &table)
Read energy boundaries from FITS table.
GEnergy emean(const int &index) const
Returns mean energy for a given energy interval.
GEnergy ewidth(const int &index) const
Returns energy interval width.
void write(GFits &file, const std::string &extname=gammalib::extname_ebounds, const std::string &unit="keV") const
Write energy boundaries into FITS object.
int index(const GEnergy &eng) const
Returns energy bin index for a given energy.
int m_num
Number of energy boundaries.
void extend(const GEbounds &ebds)
Append energy boundaries.
void insert_eng(const int &index, const GEnergy &emin, const GEnergy &emax)
Insert energy interval.
void insert(const GEnergy &emin, const GEnergy &emax)
Insert energy interval.
Energy boundaries container class.
void set(const GEnergies &energies)
Set energy boundaries from energy container.
const GEnergy & emin(void) const
Return minimum energy of all intervals.
bool is_empty(void) const
Signal if there are no energy boundaries.
const std::string extname_ebounds
Abstract interface for FITS table.
std::string print(const GChatter &chatter=NORMAL) const
Print energy boundaries.
GEnergy elogmean(const int &index) const
Returns logarithmic mean energy for a given energy interval.
void reserve(const int &num)
Reserve space for energy intervals.
void clear(void)
Clear energy boundaries.
GEnergy * m_min
Array of interval minimum energies.
void free_members(void)
Delete class members.
std::string classname(void) const
Return class name.
GEnergy m_emax
Maximum energy of all intervals.
virtual ~GEbounds(void)
Destructor.
Definition of interface for container classes.
const GEnergy & emax(void) const
Return maximum energy of all intervals.
void save(const GFilename &filename, const bool &clobber=false, const std::string &unit="keV") const
Save energy boundaries into FITS file.
bool operator!=(const GEbounds &a, const GEbounds &b)
Energy boundaries inequality operator friend.
GEbounds & operator=(const GEbounds &ebds)
Assignment operator.
Interface class for container classes.
void merge(void)
Merge all overlapping or connecting successive energy intervals.
Class that handles energies in a unit independent way.
void load(const GFilename &filename)
Load energy boundaries from FITS file.