37 #define G_READ "GCTARoi::read(GXmlElement&)"
38 #define G_WRITE "GCTARoi::write(GXmlElement&)"
39 #define G_RADIUS "GCTARoi::radius(double&)"
281 centre.radec_deg(ra,dec);
286 std::string msg =
"Attributes \"ra\", \"dec\" and/or \"rad\" not found"
287 " in XML parameter \"RegionOfInterest\"."
288 " Please verify the XML format.";
347 result.append(
"=== GCTARoi ===");
375 std::string msg =
"Invalid RoI radius "+
gammalib::str(radius)+
376 " encountered. Please specify a strictly"
virtual GRoi & operator=(const GRoi &roi)
Assignment operator.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print ROI information.
virtual ~GCTARoi(void)
Destructor.
XML element node class interface definition.
void free_members(void)
Delete class members.
Abstract interface for the event classes.
const double & radius(void) const
Returns radius of region of interest in degrees.
Interface for the CTA region of interest class.
void write(GXmlElement &xml) const
Write region of interest into XML element.
void dir(const GSkyDir &dir)
Set sky direction.
std::string centre(const std::string &s, const int &n, const char &c= ' ')
Centre string to achieve a length of n characters.
const GXmlAttribute * attribute(const int &index) const
Return attribute.
void copy_members(const GCTARoi &roi)
Copy class members.
GCTARoi(void)
Void constructor.
const GCTAInstDir & centre(void) const
Returns region of interest centre.
void init_members(void)
Initialise class members.
bool has_attribute(const std::string &name) const
Check if element has a given attribute.
virtual GCTARoi * clone(void) const
Clone instance.
GXmlElement * xml_need_par(const std::string &origin, GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
Abstract event base class definition.
virtual bool contains(const GEvent &event) const
Check if region of interest contains an event.
virtual void clear(void)
Clear instance.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print instrument direction information.
CTA region of interest class interface definition.
void free_members(void)
Delete class members.
virtual void clear(void)
Clear CTA instrument direction.
double m_radius
Radius of ROI in degrees.
CTA instrument direction class.
GCTARoi & operator=(const GCTARoi &roi)
Assignment operator.
Interface for the region of interest classes.
void read(const GXmlElement &xml)
Read region of interest from XML element.
void init_members(void)
Initialise class members.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
GCTAInstDir m_centre
Centre of ROI in instrument coordinates.
const GXmlElement * xml_get_par(const std::string &origin, const GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
double todouble(const std::string &arg)
Convert string into double precision value.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.