CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
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;
64 
72 
73  // -------------------------------------------------------------------
74  // Public Get & Set functions
75  public:
80  inline uint32_t GetTimeInMs()
81  {return m_timeInMs;}
86  inline uint16_t GetNbLines()
87  {return m_nbLines;};
93  inline uint32_t GetID1(int a_line)
94  {return mp_ID1[a_line];}
100  inline uint32_t GetID2(int a_line)
101  {return mp_ID2[a_line];}
106  inline uint32_t* GetEventID1()
107  {return mp_ID1;}
112  inline uint32_t* GetEventID2()
113  {return mp_ID2;}
118  inline int GetDataType()
119  {return m_dataType;}
124  inline int GetDataMode()
125  {return m_dataMode;}
131  inline void SetTimeInMs(uint32_t a_value)
132  {m_timeInMs = a_value;};
140  virtual void SetEventValue(int a_bin, FLTNBDATA a_value) = 0;
146  inline void SetNbLines(uint16_t a_value)
147  {m_nbLines = a_value;};
154  inline void SetID1(int a_line, uint32_t a_value)
155  {mp_ID1[a_line] = a_value;}
162  inline void SetID2(int a_line, uint32_t a_value)
163  {mp_ID2[a_line] = a_value;}
169  inline void SetVerbose(int a_verbose)
170  {m_verbose = a_verbose;}
177  virtual FLTNB GetEventValue(int a_bin) = 0;
183  virtual FLTNB GetAdditiveCorrections(int a_bin) = 0;
189  inline virtual FLTNB GetBlankValue()
190  {return 0.;}
196  virtual FLTNB GetMultiplicativeCorrections() = 0;
202  virtual INTNB GetNbValueBins() = 0;
208  virtual void MultiplyAdditiveCorrections(FLTNB a_factor) = 0; inline void SetEventIndex(int a_eventIndex)
214  {m_eventIndex = a_eventIndex;}
219  inline int64_t GetEventIndex()
220  {return m_eventIndex;}
221 
226  virtual int GetNbCustomFLTData()
227  {return m_nbCustomFLTData;}
228 
233  virtual int GetNbCustomINTData()
234  {return m_nbCustomINTData;}
235 
241  virtual void SetNbCustomFLTData( int a_value )
242  {m_nbCustomFLTData = a_value;}
243 
249  virtual void SetNbCustomINTData( int a_value )
250  {m_nbCustomINTData = a_value;}
251 
257  {return mp_customFLTData;}
258 
264  {return mp_customINTData;}
265 
271  virtual EVTFLTDATA GetCustomFLTData(int a_idx);
272 
278  virtual EVTINTDATA GetCustomINTData(int a_idx);
279 
287  virtual int SetCustomFLTData(int a_idx, EVTFLTDATA a_value);
288 
296  virtual int SetCustomINTData(int a_idx, EVTINTDATA a_value);
297 
298 
299  // -------------------------------------------------------------------
300  // Private member functions
301  private:
302 
303  // -------------------------------------------------------------------
304  // Data members
305  protected:
306  uint32_t m_timeInMs;
307  uint16_t m_nbLines;
308  uint32_t* mp_ID1;
309  uint32_t* mp_ID2;
311  int m_dataType;
312  int m_dataMode;
313  int m_dataSpec;
314  int m_verbose;
315  int64_t m_eventIndex;
321 };
322 
323 #endif
virtual EVTFLTDATA * GetCustomFLTData()
uint32_t GetID2(int a_line)
void SetNbLines(uint16_t a_value)
void SetEventIndex(int a_eventIndex)
Set current index associated to the event.
#define EVTINTDATA
int AllocateCustomINTData()
Instantiate the m_nbCustomINTData array.
virtual int SetCustomINTData(int a_idx, EVTINTDATA a_value)
EVTFLTDATA * mp_customFLTData
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.
uint32_t * GetEventID2()
virtual int GetNbCustomFLTData()
int64_t GetEventIndex()
Get current index associated to the event.
EVTINTDATA * mp_customINTData
virtual void SetNbCustomFLTData(int a_value)
initialize the number of custom INT data with a_value
virtual void SetEventValue(int a_bin, FLTNBDATA a_value)=0
virtual FLTNB GetBlankValue()
uint32_t * GetEventID1()
vEvent()
vEvent constructor. Initialize the member variables to their default values.
virtual int SetCustomFLTData(int a_idx, EVTFLTDATA a_value)
int AllocateID()
Instantiate the mp_ID1 and mp_ID2 indices arrays.
virtual FLTNB GetEventValue(int a_bin)=0
#define EVTFLTDATA
void SetID2(int a_line, uint32_t a_value)
virtual int GetNbCustomINTData()
uint16_t GetNbLines()
virtual int AllocateSpecificData()=0
Pure virtual function implemented in the child classes, dedicated to the allocation of specific data ...
int AllocateCustomFLTData()
Instantiate the m_nbCustomFLTData array.
virtual void Describe()=0
This function can be used to get a description of the event printed out.
void SetTimeInMs(uint32_t a_value)
virtual void SetNbCustomINTData(int a_value)
initialize the number of custom INT data with a_value
Mother class for the Event objects.
virtual INTNB GetNbValueBins()=0
Get the number of event value bins.
uint32_t GetID1(int a_line)
virtual EVTINTDATA * GetCustomINTData()
void SetVerbose(int a_verbose)
uint32_t GetTimeInMs()
virtual ~vEvent()
vEvent destructor
void SetID1(int a_line, uint32_t a_value)