CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Protected Attributes | List of all members
vEvent Class Referenceabstract

Mother class for the Event objects. More...

#include <vEvent.hh>

Inheritance diagram for vEvent:
Inheritance graph
Collaboration diagram for vEvent:
Collaboration graph

Public Member Functions

 vEvent ()
 vEvent constructor. Initialize the member variables to their default values. More...
 
virtual ~vEvent ()
 vEvent destructor More...
 
int AllocateID ()
 Instantiate the mp_ID1 and mp_ID2 indices arrays. More...
 
virtual int AllocateSpecificData ()=0
 Pure virtual function implemented in the child classes, dedicated to the allocation of specific data in the child classes. More...
 
virtual void Describe ()=0
 This function can be used to get a description of the event printed out. More...
 
uint32_t GetTimeInMs ()
 
uint16_t GetNbLines ()
 
uint32_t GetID1 (int a_line)
 
uint32_t GetID2 (int a_line)
 
uint32_t * GetEventID1 ()
 
uint32_t * GetEventID2 ()
 
int GetDataType ()
 
int GetDataMode ()
 
void SetTimeInMs (uint32_t a_value)
 
virtual void SetEventValue (int a_bin, FLTNBDATA a_value)=0
 
void SetNbLines (uint16_t a_value)
 
void SetID1 (int a_line, uint32_t a_value)
 
void SetID2 (int a_line, uint32_t a_value)
 
void SetVerbose (int a_verbose)
 
virtual FLTNB GetEventValue (int a_bin)=0
 
virtual FLTNB GetAdditiveCorrections (int a_bin)=0
 
virtual FLTNB GetBlankValue ()
 This is a pure virtual function implemented in the child classes. More...
 
virtual FLTNB GetMultiplicativeCorrections ()=0
 This is a pure virtual function implemented in the child classes. More...
 
virtual INTNB GetNbValueBins ()=0
 Get the number of event value bins. More...
 
virtual void MultiplyAdditiveCorrections (FLTNB a_factor)=0
 
 vEvent ()
 vEvent constructor. Initialize the member variables to their default values. More...
 
virtual ~vEvent ()
 vEvent destructor More...
 
int AllocateID ()
 
virtual int AllocateSpecificData ()=0
 
virtual void Describe ()=0
 
int AllocateCustomINTData ()
 Instantiate the m_nbCustomINTData array. More...
 
int AllocateCustomFLTData ()
 Instantiate the m_nbCustomFLTData array. More...
 
uint32_t GetTimeInMs ()
 
uint16_t GetNbLines ()
 
uint32_t GetID1 (int a_line)
 
uint32_t GetID2 (int a_line)
 
uint32_t * GetEventID1 ()
 
uint32_t * GetEventID2 ()
 
int GetDataType ()
 
int GetDataMode ()
 
void SetTimeInMs (uint32_t a_value)
 
virtual void SetEventValue (int a_bin, FLTNBDATA a_value)=0
 
void SetNbLines (uint16_t a_value)
 
void SetID1 (int a_line, uint32_t a_value)
 
void SetID2 (int a_line, uint32_t a_value)
 
void SetVerbose (int a_verbose)
 
virtual FLTNB GetEventValue (int a_bin)=0
 
virtual FLTNB GetAdditiveCorrections (int a_bin)=0
 
virtual FLTNB GetBlankValue ()
 
virtual FLTNB GetMultiplicativeCorrections ()=0
 
virtual INTNB GetNbValueBins ()=0
 
virtual void MultiplyAdditiveCorrections (FLTNB a_factor)=0
 
void SetEventIndex (int a_eventIndex)
 Set current index associated to the event. More...
 
int64_t GetEventIndex ()
 Get current index associated to the event. More...
 
virtual int GetNbCustomFLTData ()
 
virtual int GetNbCustomINTData ()
 
virtual void SetNbCustomFLTData (int a_value)
 initialize the number of custom INT data with a_value More...
 
virtual void SetNbCustomINTData (int a_value)
 initialize the number of custom INT data with a_value More...
 
virtual EVTFLTDATAGetCustomFLTData ()
 
virtual EVTINTDATAGetCustomINTData ()
 
virtual EVTFLTDATA GetCustomFLTData (int a_idx)
 
virtual EVTINTDATA GetCustomINTData (int a_idx)
 
virtual int SetCustomFLTData (int a_idx, EVTFLTDATA a_value)
 
virtual int SetCustomINTData (int a_idx, EVTINTDATA a_value)
 

Protected Attributes

uint32_t m_timeInMs
 
uint16_t m_nbLines
 
uint32_t * mp_ID1
 
uint32_t * mp_ID2
 
FLTNB m_eventValue
 
int m_dataType
 
int m_dataMode
 
int m_dataSpec
 
int m_verbose
 
int64_t m_eventIndex
 
EVTFLTDATAmp_customFLTData
 
EVTINTDATAmp_customINTData
 
int m_nbCustomFLTData
 
int m_nbCustomINTData
 

Detailed Description

Mother class for the Event objects.

This class is designed to be a mother virtual class that should not be used on its own; only its children are used.
The pure virtual GetEventIndices method is implemented in each children in order to get the number of lines included
in the event and the associated indices (two crystal indices for PET, one crystal index and one view index for SPECT, etc).

Definition at line 20 of file code/include/datafile/vEvent.hh.

Constructor & Destructor Documentation

◆ vEvent() [1/2]

vEvent::vEvent ( )

vEvent constructor. Initialize the member variables to their default values.

Definition at line 18 of file code/src/datafile/vEvent.cc.

◆ ~vEvent() [1/2]

vEvent::~vEvent ( )
virtual

vEvent destructor

Definition at line 35 of file code/src/datafile/vEvent.cc.

◆ vEvent() [2/2]

vEvent::vEvent ( )

vEvent constructor. Initialize the member variables to their default values.

◆ ~vEvent() [2/2]

virtual vEvent::~vEvent ( )
virtual

vEvent destructor

Member Function Documentation

◆ AllocateCustomFLTData()

int vEvent::AllocateCustomFLTData ( )

Instantiate the m_nbCustomFLTData array.

This function instantiate them_nbCustomFLTData arrays using the m_nbCustomINTData variable (assuming it has been initialized before)

Returns
0 is success, positive value otherwise

Definition at line 101 of file src/datafile/vEvent.cc.

◆ AllocateCustomINTData()

int vEvent::AllocateCustomINTData ( )

Instantiate the m_nbCustomINTData array.

This function instantiate them_nbCustomINTData arrays using the m_nbCustomINTData variable (assuming it has been initialized before)

Returns
0 is success, positive value otherwise

Definition at line 84 of file src/datafile/vEvent.cc.

◆ AllocateID() [1/2]

int vEvent::AllocateID ( )

◆ AllocateID() [2/2]

int vEvent::AllocateID ( )

Instantiate the mp_ID1 and mp_ID2 indices arrays.

This function instantiate the mp_ID1 and mp_ID2 indices arrays using the m_nbLines filled (assuming it has been initialized before),
and call the AllocateSpecificData() function implemented in child classes

Returns
0 is success, positive value otherwise

Definition at line 46 of file code/src/datafile/vEvent.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AllocateSpecificData() [1/2]

int vEvent::AllocateSpecificData ( )
pure virtual

Pure virtual function implemented in the child classes, dedicated to the allocation of specific data in the child classes.

Returns
0 is success, positive value otherwise

Implemented in iEventListPET, iEventListPET, iEventNorm, iEventNorm, iEventCT, iEventHistoPET, iEventPET, iEventSPECT, iEventCT, iEventHistoPET, iEventPET, iEventSPECT, iEventHistoCT, iEventHistoSPECT, iEventListCT, iEventListSPECT, iEventHistoCT, iEventHistoSPECT, iEventListCT, and iEventListSPECT.

Here is the caller graph for this function:

◆ AllocateSpecificData() [2/2]

virtual int vEvent::AllocateSpecificData ( )
pure virtual

◆ Describe() [1/2]

void vEvent::Describe ( )
pure virtual

This function can be used to get a description of the event printed out.

Implemented in iEventListPET, iEventListPET, iEventNorm, iEventNorm, iEventCT, iEventHistoCT, iEventHistoPET, iEventHistoSPECT, iEventListCT, iEventListSPECT, iEventPET, iEventSPECT, iEventCT, iEventHistoCT, iEventHistoPET, iEventHistoSPECT, iEventListCT, iEventListSPECT, iEventPET, and iEventSPECT.

Here is the caller graph for this function:

◆ Describe() [2/2]

virtual void vEvent::Describe ( )
pure virtual

◆ GetAdditiveCorrections() [1/2]

virtual FLTNB vEvent::GetAdditiveCorrections ( int  a_bin)
pure virtual

Implemented in iEventListPET, iEventListPET, iEventPET, iEventPET, iEventHistoPET, iEventHistoPET, iEventNorm, iEventNorm, iEventCT, iEventCT, iEventSPECT, and iEventSPECT.

Here is the caller graph for this function:

◆ GetAdditiveCorrections() [2/2]

virtual FLTNB vEvent::GetAdditiveCorrections ( int  a_bin)
pure virtual

◆ GetBlankValue() [1/2]

FLTNB vEvent::GetBlankValue ( )
inlinevirtual

This is a pure virtual function implemented in the child classes.

Returns
the blank measurement if relevant, 0. otherwise

Reimplemented in iEventCT, and iEventCT.

Definition at line 174 of file code/include/datafile/vEvent.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBlankValue() [2/2]

virtual FLTNB vEvent::GetBlankValue ( )
inlinevirtual

Reimplemented in iEventCT, and iEventCT.

Definition at line 189 of file include/datafile/vEvent.hh.

Here is the call graph for this function:

◆ GetCustomFLTData() [1/2]

virtual EVTFLTDATA* vEvent::GetCustomFLTData ( )
inlinevirtual

Definition at line 256 of file include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetCustomFLTData() [2/2]

EVTFLTDATA vEvent::GetCustomFLTData ( int  a_idx)
virtual

Definition at line 118 of file src/datafile/vEvent.cc.

◆ GetCustomINTData() [1/2]

virtual EVTINTDATA* vEvent::GetCustomINTData ( )
inlinevirtual

Definition at line 263 of file include/datafile/vEvent.hh.

Here is the call graph for this function:

◆ GetCustomINTData() [2/2]

EVTINTDATA vEvent::GetCustomINTData ( int  a_idx)
virtual

Definition at line 138 of file src/datafile/vEvent.cc.

◆ GetDataMode() [1/2]

int vEvent::GetDataMode ( )
inline
Returns
the mode of the event (PET, SPECT, Transmission)

Definition at line 109 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetDataMode() [2/2]

int vEvent::GetDataMode ( )
inline

Definition at line 124 of file include/datafile/vEvent.hh.

◆ GetDataType() [1/2]

int vEvent::GetDataType ( )
inline
Returns
the type of the event (PET, SPECT, Transmission)

Definition at line 103 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetDataType() [2/2]

int vEvent::GetDataType ( )
inline

Definition at line 118 of file include/datafile/vEvent.hh.

◆ GetEventID1() [1/2]

int * vEvent::GetEventID1 ( )
inline
Returns
the pointer containing the indices of the 1st ID of the event

Definition at line 91 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetEventID1() [2/2]

uint32_t* vEvent::GetEventID1 ( )
inline

Definition at line 106 of file include/datafile/vEvent.hh.

◆ GetEventID2() [1/2]

int * vEvent::GetEventID2 ( )
inline
Returns
the pointer containing the indices of the 2nd ID of the event

Definition at line 97 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetEventID2() [2/2]

uint32_t* vEvent::GetEventID2 ( )
inline

Definition at line 112 of file include/datafile/vEvent.hh.

◆ GetEventIndex()

int64_t vEvent::GetEventIndex ( )
inline

Get current index associated to the event.

Definition at line 219 of file include/datafile/vEvent.hh.

◆ GetEventValue() [1/2]

virtual FLTNB vEvent::GetEventValue ( int  a_bin)
pure virtual

◆ GetEventValue() [2/2]

virtual FLTNB vEvent::GetEventValue ( int  a_bin)
pure virtual

◆ GetID1() [1/2]

uint32_t vEvent::GetID1 ( int  a_line)
inline

Definition at line 78 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetID1() [2/2]

uint32_t vEvent::GetID1 ( int  a_line)
inline

Definition at line 93 of file include/datafile/vEvent.hh.

◆ GetID2() [1/2]

uint32_t vEvent::GetID2 ( int  a_line)
inline

Definition at line 85 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetID2() [2/2]

uint32_t vEvent::GetID2 ( int  a_line)
inline

Definition at line 100 of file include/datafile/vEvent.hh.

◆ GetMultiplicativeCorrections() [1/2]

FLTNB vEvent::GetMultiplicativeCorrections ( )
pure virtual

This is a pure virtual function implemented in the child classes.

Returns
the product of the multiplicative corrections terms for this event

Implemented in iEventPET, iEventPET, iEventCT, iEventCT, iEventSPECT, iEventSPECT, iEventNorm, and iEventNorm.

Here is the caller graph for this function:

◆ GetMultiplicativeCorrections() [2/2]

virtual FLTNB vEvent::GetMultiplicativeCorrections ( )
pure virtual

◆ GetNbCustomFLTData()

int vEvent::GetNbCustomFLTData ( )
inlinevirtual
Returns
the number of custom EVTFLTDATA data in the event

Definition at line 226 of file include/datafile/vEvent.hh.

◆ GetNbCustomINTData()

int vEvent::GetNbCustomINTData ( )
inlinevirtual
Returns
the number of custom EVTINTDATA data in the event

Definition at line 233 of file include/datafile/vEvent.hh.

◆ GetNbLines() [1/2]

uint16_t vEvent::GetNbLines ( )
inline
Returns
the number of lines in the Event

Definition at line 71 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetNbLines() [2/2]

uint16_t vEvent::GetNbLines ( )
inline

Definition at line 86 of file include/datafile/vEvent.hh.

◆ GetNbValueBins() [1/2]

INTNB vEvent::GetNbValueBins ( )
pure virtual

Get the number of event value bins.

Returns
the number of value bins

Implemented in iEventListPET, iEventListPET, iEventPET, iEventPET, iEventNorm, iEventNorm, iEventCT, iEventCT, iEventSPECT, iEventSPECT, iEventListSPECT, iEventListSPECT, iEventHistoPET, iEventHistoPET, iEventListCT, iEventListCT, iEventHistoCT, iEventHistoCT, iEventHistoSPECT, and iEventHistoSPECT.

Here is the caller graph for this function:

◆ GetNbValueBins() [2/2]

virtual INTNB vEvent::GetNbValueBins ( )
pure virtual

◆ GetTimeInMs() [1/2]

uint32_t vEvent::GetTimeInMs ( )
inline
Returns
the timestamp of the Event

Definition at line 65 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ GetTimeInMs() [2/2]

uint32_t vEvent::GetTimeInMs ( )
inline

Definition at line 80 of file include/datafile/vEvent.hh.

◆ MultiplyAdditiveCorrections() [1/2]

virtual void vEvent::MultiplyAdditiveCorrections ( FLTNB  a_factor)
pure virtual

Implemented in iEventListPET, iEventListPET, iEventNorm, iEventNorm, iEventCT, iEventCT, iEventSPECT, iEventSPECT, iEventHistoPET, and iEventHistoPET.

Here is the caller graph for this function:

◆ MultiplyAdditiveCorrections() [2/2]

virtual void vEvent::MultiplyAdditiveCorrections ( FLTNB  a_factor)
pure virtual

◆ SetCustomFLTData()

int vEvent::SetCustomFLTData ( int  a_idx,
EVTFLTDATA  a_value 
)
virtual

Definition at line 157 of file src/datafile/vEvent.cc.

Here is the caller graph for this function:

◆ SetCustomINTData()

int vEvent::SetCustomINTData ( int  a_idx,
EVTINTDATA  a_value 
)
virtual

Definition at line 179 of file src/datafile/vEvent.cc.

Here is the caller graph for this function:

◆ SetEventIndex()

void vEvent::SetEventIndex ( int  a_eventIndex)
inline

Set current index associated to the event.

Parameters
a_eventIndex

Definition at line 213 of file include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ SetEventValue() [1/2]

virtual void vEvent::SetEventValue ( int  a_bin,
FLTNBDATA  a_value 
)
pure virtual

◆ SetEventValue() [2/2]

virtual void vEvent::SetEventValue ( int  a_bin,
FLTNBDATA  a_value 
)
pure virtual

◆ SetID1() [1/2]

void vEvent::SetID1 ( int  a_line,
uint32_t  a_value 
)
inline

Definition at line 139 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ SetID1() [2/2]

void vEvent::SetID1 ( int  a_line,
uint32_t  a_value 
)
inline

Definition at line 154 of file include/datafile/vEvent.hh.

◆ SetID2() [1/2]

void vEvent::SetID2 ( int  a_line,
uint32_t  a_value 
)
inline

Definition at line 147 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ SetID2() [2/2]

void vEvent::SetID2 ( int  a_line,
uint32_t  a_value 
)
inline

Definition at line 162 of file include/datafile/vEvent.hh.

◆ SetNbCustomFLTData()

int vEvent::SetNbCustomFLTData ( int  a_value)
inlinevirtual

initialize the number of custom INT data with a_value

Parameters
a_value

Definition at line 241 of file include/datafile/vEvent.hh.

◆ SetNbCustomINTData()

int vEvent::SetNbCustomINTData ( int  a_value)
inlinevirtual

initialize the number of custom INT data with a_value

Parameters
a_value

Definition at line 249 of file include/datafile/vEvent.hh.

◆ SetNbLines() [1/2]

void vEvent::SetNbLines ( uint16_t  a_value)
inline

Definition at line 131 of file code/include/datafile/vEvent.hh.

Here is the caller graph for this function:

◆ SetNbLines() [2/2]

void vEvent::SetNbLines ( uint16_t  a_value)
inline

Definition at line 146 of file include/datafile/vEvent.hh.

◆ SetTimeInMs() [1/2]

void vEvent::SetTimeInMs ( uint32_t  a_value)
inline

Definition at line 116 of file code/include/datafile/vEvent.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTimeInMs() [2/2]

void vEvent::SetTimeInMs ( uint32_t  a_value)
inline

Definition at line 131 of file include/datafile/vEvent.hh.

Here is the call graph for this function:

◆ SetVerbose() [1/2]

void vEvent::SetVerbose ( int  a_verbose)
inline

Definition at line 154 of file code/include/datafile/vEvent.hh.

Here is the call graph for this function:

◆ SetVerbose() [2/2]

void vEvent::SetVerbose ( int  a_verbose)
inline

Definition at line 169 of file include/datafile/vEvent.hh.

Here is the call graph for this function:

Member Data Documentation

◆ m_dataMode

int vEvent::m_dataMode
protected

This integer is used to specify the mode of the event as in the vDataFile; LIST or HISTO. Default value =Unknown

Definition at line 208 of file code/include/datafile/vEvent.hh.

◆ m_dataSpec

int vEvent::m_dataSpec
protected

Flag indicating the physical specificity of the data: SPEC_EMISSION or SPEC_TRANSMISSION

Definition at line 209 of file code/include/datafile/vEvent.hh.

◆ m_dataType

int vEvent::m_dataType
protected

This integer is used to specify the type of the event as in the vDataFile; PET, SPECT or CT. Default value =Unknown

Definition at line 207 of file code/include/datafile/vEvent.hh.

◆ m_eventIndex

int64_t vEvent::m_eventIndex
protected

Current index associated to the event

Definition at line 315 of file include/datafile/vEvent.hh.

◆ m_eventValue

FLTNB vEvent::m_eventValue
protected

Amount of data in the bin. Default value =0.0 (or 1. for list-mode event)

Definition at line 206 of file code/include/datafile/vEvent.hh.

◆ m_nbCustomFLTData

int vEvent::m_nbCustomFLTData
protected

Nb of customizable EVTFLTDATA variables in the event

Definition at line 318 of file include/datafile/vEvent.hh.

◆ m_nbCustomINTData

int vEvent::m_nbCustomINTData
protected

Nb of customizable EVTINTDATA variables in the event

Definition at line 319 of file include/datafile/vEvent.hh.

◆ m_nbLines

uint16_t vEvent::m_nbLines
protected

Number of lines in the event. Default value =0

Definition at line 203 of file code/include/datafile/vEvent.hh.

◆ m_timeInMs

uint32_t vEvent::m_timeInMs
protected

Timestamp of the event in ms. Default value =0

Definition at line 202 of file code/include/datafile/vEvent.hh.

◆ m_verbose

int vEvent::m_verbose
protected

Verbosity. Default value =-1

Definition at line 210 of file code/include/datafile/vEvent.hh.

◆ mp_customFLTData

EVTFLTDATA* vEvent::mp_customFLTData
protected

Customizable data EVTFLTDATA type

Definition at line 316 of file include/datafile/vEvent.hh.

◆ mp_customINTData

EVTINTDATA* vEvent::mp_customINTData
protected

Customizable data EVTINTDATA type

Definition at line 317 of file include/datafile/vEvent.hh.

◆ mp_ID1

uint32_t * vEvent::mp_ID1
protected

Pointer containing the indice(s) of the 1st ID of the Event. Default value =NULL

Definition at line 204 of file code/include/datafile/vEvent.hh.

◆ mp_ID2

uint32_t * vEvent::mp_ID2
protected

Pointer containing the indice(s) of the 2nd ID of the Event. Default value =0

Definition at line 205 of file code/include/datafile/vEvent.hh.


The documentation for this class was generated from the following files: