GammaLib 2.0.0
Loading...
Searching...
No Matches
GRoi.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GRoi.hpp - Abstract Region of interest base class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2010-2014 by Juergen Knoedlseder *
5 * ----------------------------------------------------------------------- *
6 * *
7 * This program is free software: you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation, either version 3 of the License, or *
10 * (at your option) any later version. *
11 * *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU General Public License *
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19 * *
20 ***************************************************************************/
21/**
22 * @file GRoi.hpp
23 * @brief Abstract Region of interest base class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GROI_HPP
28#define GROI_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include "GBase.hpp"
33
34/* __ Forward declarations _______________________________________________ */
35class GEvent;
36
37
38/***********************************************************************//**
39 * @class GRoi
40 *
41 * @brief Interface for the region of interest classes
42 *
43 * The region of interest class holds instrument specific information about
44 * the spatial region in detector or telescopes coordinates that is used
45 * for an analysis. In particular, the definition of a region of interest
46 * is required for an unbinned analysis.
47 ***************************************************************************/
48class GRoi : public GBase {
49
50 // Friend classes
51 friend class GObservation;
52
53public:
54 // Constructors and destructors
55 GRoi(void);
56 GRoi(const GRoi& roi);
57 virtual ~GRoi(void);
58
59 // Operators
60 virtual GRoi& operator=(const GRoi& roi);
61
62 // Pure virtual methods
63 virtual void clear(void) = 0;
64 virtual GRoi* clone(void) const = 0;
65 virtual std::string classname(void) const = 0;
66 virtual bool contains(const GEvent& event) const = 0;
67 virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
68
69protected:
70 // Protected methods
71 void init_members(void);
72 void copy_members(const GRoi& roi);
73 void free_members(void);
74};
75
76#endif /* GROI_HPP */
Definition of interface for all GammaLib classes.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Interface class for all GammaLib classes.
Definition GBase.hpp:52
Abstract interface for the event classes.
Definition GEvent.hpp:71
Abstract observation base class.
Interface for the region of interest classes.
Definition GRoi.hpp:48
void copy_members(const GRoi &roi)
Copy class members.
Definition GRoi.cpp:153
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
virtual std::string classname(void) const =0
Return class name.
virtual ~GRoi(void)
Destructor.
Definition GRoi.cpp:83
virtual void clear(void)=0
Clear object.
virtual bool contains(const GEvent &event) const =0
virtual GRoi * clone(void) const =0
Clones object.
virtual GRoi & operator=(const GRoi &roi)
Assignment operator.
Definition GRoi.cpp:104
GRoi(void)
Void constructor.
Definition GRoi.cpp:52
void free_members(void)
Delete class members.
Definition GRoi.cpp:163
void init_members(void)
Initialise class members.
Definition GRoi.cpp:141