CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
code/include/datafile/vEvent.hh
Go to the documentation of this file.
1 
8 #ifndef VEVENT_HH
9 #define VEVENT_HH 1
10 
11 #include "gVariables.hh"
12 
20 class vEvent
21 {
22  // -------------------------------------------------------------------
23  // Constructor & Destructor
24  public:
29  vEvent();
33  virtual ~vEvent();
34 
35  // -------------------------------------------------------------------
36  // Public member functions
37  public:
45  int AllocateID();
51  virtual int AllocateSpecificData() = 0;
56  virtual void Describe() = 0;
57 
58  // -------------------------------------------------------------------
59  // Public Get & Set functions
60  public:
65  inline uint32_t GetTimeInMs()
66  {return m_timeInMs;}
71  inline uint16_t GetNbLines()
72  {return m_nbLines;};
78  inline uint32_t GetID1(int a_line)
79  {return mp_ID1[a_line];}
85  inline uint32_t GetID2(int a_line)
86  {return mp_ID2[a_line];}
91  inline uint32_t* GetEventID1()
92  {return mp_ID1;}
97  inline uint32_t* GetEventID2()
98  {return mp_ID2;}
103  inline int GetDataType()
104  {return m_dataType;}
109  inline int GetDataMode()
110  {return m_dataMode;}
116  inline void SetTimeInMs(uint32_t a_value)
117  {m_timeInMs = a_value;};
125  virtual void SetEventValue(int a_bin, FLTNBDATA a_value) = 0;
131  inline void SetNbLines(uint16_t a_value)
132  {m_nbLines = a_value;};
139  inline void SetID1(int a_line, uint32_t a_value)
140  {mp_ID1[a_line] = a_value;}
147  inline void SetID2(int a_line, uint32_t a_value)
148  {mp_ID2[a_line] = a_value;}
154  inline void SetVerbose(int a_verbose)
155  {m_verbose = a_verbose;}
162  virtual FLTNB GetEventValue(int a_bin) = 0;
168  virtual FLTNB GetAdditiveCorrections(int a_bin) = 0;
174  inline virtual FLTNB GetBlankValue()
175  {return 0.;}
181  virtual FLTNB GetMultiplicativeCorrections() = 0;
187  virtual INTNB GetNbValueBins() = 0;
193  virtual void MultiplyAdditiveCorrections(FLTNB a_factor) = 0;
194 
195  // -------------------------------------------------------------------
196  // Private member functions
197  private:
198 
199  // -------------------------------------------------------------------
200  // Data members
201  protected:
202  uint32_t m_timeInMs;
203  uint16_t m_nbLines;
204  uint32_t* mp_ID1;
205  uint32_t* mp_ID2;
210  int m_verbose;
211 };
212 
213 #endif
uint32_t GetID2(int a_line)
void SetNbLines(uint16_t a_value)
virtual FLTNB GetBlankValue()
This is a pure virtual function implemented in the child classes.
uint32_t * GetEventID2()
virtual FLTNB GetAdditiveCorrections(int a_bin)=0
virtual void MultiplyAdditiveCorrections(FLTNB a_factor)=0
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
vEvent()
vEvent constructor. Initialize the member variables to their default values.
int AllocateID()
Instantiate the mp_ID1 and mp_ID2 indices arrays.
virtual FLTNB GetEventValue(int a_bin)=0
void SetID2(int a_line, uint32_t a_value)
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)
Mother class for the Event objects.
virtual INTNB GetNbValueBins()=0
Get the number of event value bins.
uint32_t * GetEventID1()
uint32_t GetID1(int a_line)
void SetVerbose(int a_verbose)
virtual ~vEvent()
vEvent destructor
void SetID1(int a_line, uint32_t a_value)