GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GEventList.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GEventList.hpp - Abstract event atom container class *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2009-2016 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 GEventList.hpp
23  * @brief Abstract event atom container class interface definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GEVENTLIST_HPP
28 #define GEVENTLIST_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include "GEvents.hpp"
32 #include "GEventAtom.hpp"
33 
34 /* __ Forward declarations _______________________________________________ */
35 class GFilename;
36 
37 
38 /***********************************************************************//**
39  * @class GEventList
40  *
41  * @brief Abstract event atom container class
42  *
43  * This class is an abstract container class for event atoms.
44  *
45  * In addition to the base class methods, it defines also an interface to the
46  * region of interest (ROI) that is covered by the data space. The ROI can
47  * be accessed by the roi() methods.
48  ***************************************************************************/
49 class GEventList : public GEvents {
50 
51 public:
52  // Constructors and destructors
53  GEventList(void);
54  GEventList(const GEventList& list);
55  virtual ~GEventList(void);
56 
57  // Operators
58  virtual GEventList& operator=(const GEventList& list);
59  virtual GEventAtom* operator[](const int& index) = 0;
60  virtual const GEventAtom* operator[](const int& index) const = 0;
61 
62  // Pure virtual methods
63  virtual void clear(void) = 0;
64  virtual GEventList* clone(void) const = 0;
65  virtual std::string classname(void) const = 0;
66  virtual int size(void) const = 0;
67  virtual void load(const GFilename& filename) = 0;
68  virtual void save(const GFilename& filename,
69  const bool& clobber = false) const = 0;
70  virtual void read(const GFits& file) = 0;
71  virtual void write(GFits& file) const = 0;
72  virtual int number(void) const = 0;
73  virtual void roi(const GRoi& roi) = 0;
74  virtual const GRoi& roi(void) const = 0;
75  virtual std::string print(const GChatter& chatter = NORMAL) const = 0;
76 
77 protected:
78  // Protected methods
79  void init_members(void);
80  void copy_members(const GEventList& list);
81  void free_members(void);
82  virtual void set_energies(void) = 0;
83  virtual void set_times(void) = 0;
84 };
85 
86 #endif /* GEVENTLIST_HPP */
virtual std::string classname(void) const =0
Return class name.
GEventList(void)
Void constructor.
Definition: GEventList.cpp:51
Abstract event atom container class.
Definition: GEventList.hpp:49
void init_members(void)
Initialise class members.
Definition: GEventList.cpp:143
virtual int size(void) const =0
virtual void save(const GFilename &filename, const bool &clobber=false) const =0
FITS file class.
Definition: GFits.hpp:63
virtual ~GEventList(void)
Destructor.
Definition: GEventList.cpp:82
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
virtual GEventList * clone(void) const =0
Clones object.
virtual const GRoi & roi(void) const =0
virtual void set_times(void)=0
Filename class.
Definition: GFilename.hpp:62
void copy_members(const GEventList &list)
Copy class members.
Definition: GEventList.cpp:155
virtual void write(GFits &file) const =0
virtual GEventList & operator=(const GEventList &list)
Assignment operator.
Definition: GEventList.cpp:104
Abstract event atom base class definition.
GChatter
Definition: GTypemaps.hpp:33
virtual void load(const GFilename &filename)=0
virtual void set_energies(void)=0
void free_members(void)
Delete class members.
Definition: GEventList.cpp:165
virtual int number(void) const =0
virtual void clear(void)=0
Clear object.
virtual GEventAtom * operator[](const int &index)=0
Abstract event container class.
Definition: GEvents.hpp:66
virtual void read(const GFits &file)=0
Interface for the region of interest classes.
Definition: GRoi.hpp:48
Abstract event container class interface definition.
Abstract interface for the event atom class.
Definition: GEventAtom.hpp:62