71 const std::string& method =
"LOG",
72 const double& gamma = 1.0);
85 const GEnergy&
at(
const int& index)
const;
90 void remove(
const int& index);
94 void set(
const int& num,
97 const std::string& method =
"LOG",
98 const double& gamma = 1.0);
101 const bool& clobber =
false)
const;
115 const double& gamma);
130 return (
"GEnergies");
Definition of interface for container classes.
Energy value class definition.
FITS table abstract base class interface definition.
FITS file class interface definition.
Interface class for container classes.
Energy boundaries container class.
std::string print(const GChatter &chatter=NORMAL) const
Print energy container information.
void init_members(void)
Initialise class members.
void read(const GFitsTable &table)
Read energies from FITS table.
void load(const GFilename &filename)
Load energies from FITS file.
GEnergies & operator=(const GEnergies &energies)
Assignment operator.
GEnergies(void)
Void constructor.
void clear(void)
Clear energy container.
int size(void) const
Return number of energies in container.
void set_pow(const int &num, const GEnergy &emin, const GEnergy &emax, const double &gamma)
Set power-law spaced energy intervals.
void copy_members(const GEnergies &energies)
Copy class members.
GEnergy & at(const int &index)
Return reference to energy.
void set(const GEbounds &ebounds)
Set energies from energy boundaries.
void reserve(const int &num)
Reserves space for energies in container.
void extend(const GEnergies &energies)
Append energy container.
GEnergies * clone(void) const
Clone energy container.
GEnergy & append(const GEnergy &energy)
Append energy to container.
std::string classname(void) const
Return class name.
void save(const GFilename &filename, const bool &clobber=false) const
Save energies into FITS file.
GEnergy & operator[](const int &index)
Return reference to energy.
virtual ~GEnergies(void)
Destructor.
void write(GFits &file, const std::string &extname=gammalib::extname_energies) const
Write energies into FITS object.
void set_lin(const int &num, const GEnergy &emin, const GEnergy &emax)
Set linearly spaced energies.
void remove(const int &index)
Remove energy from container.
bool is_empty(void) const
Signals if there are no energies in container.
void set_log(const int &num, const GEnergy &emin, const GEnergy &emax)
Set logarithmically spaced energies.
GEnergy & insert(const int &index, const GEnergy &energy)
Insert energy into container.
void free_members(void)
Delete class members.
std::vector< GEnergy > m_energies
List of energies.
Class that handles energies in a unit independent way.
Abstract interface for FITS table.
const std::string extname_energies