CASToR  1.1
Tomographic Reconstruction (PET/SPECT)
 All Classes Files Functions Variables Typedefs Macros Groups Pages
vEvent.hh
Go to the documentation of this file.
1 
9 #ifndef VEVENT_HH
10 #define VEVENT_HH 1
11 
12 #include "gVariables.hh"
13 
14 
15 
23 class vEvent
24 {
25  // -------------------------------------------------------------------
26  // Constructor & Destructor
27  public:
32  vEvent();
36  virtual ~vEvent();
37 
38  // -------------------------------------------------------------------
39  // Public member functions
40  public:
48  int AllocateID();
54  virtual int AllocateSpecificData() = 0;
59  virtual void Describe() = 0;
60 
61  // -------------------------------------------------------------------
62  // Public Get & Set functions
63  public:
68  inline uint32_t GetTimeInMs()
69  {return m_timeInMs;}
74  inline uint16_t GetNbLines()
75  {return m_nbLines;};
81  inline uint32_t GetID1(int a_line)
82  {return mp_ID1[a_line];}
88  inline uint32_t GetID2(int a_line)
89  {return mp_ID2[a_line];}
94  inline uint32_t* GetEventID1()
95  {return mp_ID1;}
100  inline uint32_t* GetEventID2()
101  {return mp_ID2;}
106  inline int GetDataType()
107  {return m_dataType;}
112  inline int GetDataMode()
113  {return m_dataMode;}
119  inline void SetTimeInMs(uint32_t a_value)
120  {m_timeInMs = a_value;};
128  virtual void SetEventValue(int a_bin, FLTNBDATA a_value) = 0;
134  inline void SetNbLines(uint16_t a_value)
135  {m_nbLines = a_value;};
142  inline void SetID1(int a_line, uint32_t a_value)
143  {mp_ID1[a_line] = a_value;}
150  inline void SetID2(int a_line, uint32_t a_value)
151  {mp_ID2[a_line] = a_value;}
157  inline void SetVerbose(int a_verbose)
158  {m_verbose = a_verbose;}
165  virtual FLTNB GetEventValue(int a_bin) = 0;
171  virtual FLTNB GetAdditiveCorrections(int a_bin) = 0;
177  virtual FLTNB GetMultiplicativeCorrections() = 0;
178 
179 
180  // -------------------------------------------------------------------
181  // Private member functions
182  private:
183 
184 
185 
186  // -------------------------------------------------------------------
187  // Data members
188  protected:
189  uint32_t m_timeInMs;
190  uint16_t m_nbLines;
191  uint32_t* mp_ID1;
192  uint32_t* mp_ID2;
196  int m_verbose;
197 };
198 
199 #endif
This header file is mainly used to declare some macro definitions and all includes needed from the st...
void SetNbLines(uint16_t a_value)
Set the number of lines of the Event.
Definition: vEvent.hh:134
#define FLTNB
Definition: gVariables.hh:55
int m_verbose
Definition: vEvent.hh:196
int GetDataType()
Definition: vEvent.hh:106
uint32_t * mp_ID2
Definition: vEvent.hh:192
virtual FLTNB GetAdditiveCorrections(int a_bin)=0
Pure virtual function implemented in the child classes.
uint32_t * GetEventID2()
Definition: vEvent.hh:100
uint32_t GetID2(int a_line)
Definition: vEvent.hh:88
int m_dataType
Definition: vEvent.hh:194
virtual FLTNB GetMultiplicativeCorrections()=0
This is a pure virtual function implemented in the child classes.
virtual void SetEventValue(int a_bin, FLTNBDATA a_value)=0
This function is implemented by child classes.
Definition: vEvent.hh:120
int GetDataMode()
Definition: vEvent.hh:112
#define FLTNBDATA
Definition: gVariables.hh:59
uint32_t * mp_ID1
Definition: vEvent.hh:191
virtual FLTNB GetEventValue(int a_bin)=0
Pure virtual function implemented in the child classes.
FLTNB m_eventValue
Definition: vEvent.hh:193
vEvent()
vEvent constructor. Initialize the member variables to their default values.
Definition: vEvent.cc:32
int AllocateID()
Instantiate the mp_ID1 and mp_ID2 indices arrays.
Definition: vEvent.cc:71
void SetID2(int a_line, uint32_t a_value)
Set the indice associated with the line index for the 2nd ID of the Event.
Definition: vEvent.hh:150
uint16_t GetNbLines()
Definition: vEvent.hh:74
int m_dataMode
Definition: vEvent.hh:195
virtual int AllocateSpecificData()=0
Pure virtual function implemented in the child classes, dedicated to the allocation of specific data ...
virtual void Describe()=0
This function can be used to get a description of the event printed out.
void SetTimeInMs(uint32_t a_value)
Set the timestamp of the Event.
Definition: vEvent.hh:119
Mother class for the Event objects.
Definition: vEvent.hh:23
uint32_t GetID1(int a_line)
Definition: vEvent.hh:81
uint32_t * GetEventID1()
Definition: vEvent.hh:94
uint16_t m_nbLines
Definition: vEvent.hh:190
uint32_t m_timeInMs
Definition: vEvent.hh:189
void SetVerbose(int a_verbose)
Set verbosity.
Definition: vEvent.hh:157
uint32_t GetTimeInMs()
Definition: vEvent.hh:68
virtual ~vEvent()
vEvent destructor
Definition: vEvent.cc:53
void SetID1(int a_line, uint32_t a_value)
Set the indice associated with the line index for the 1st ID of the Event.
Definition: vEvent.hh:142