CASToR
3.2
Tomographic Reconstruction (PET/SPECT/CT)
Main Page
Modules
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
_
b
c
d
e
f
g
i
l
m
o
p
r
s
t
w
Variables
Typedefs
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
s
t
u
v
w
code
src
datafile
code/src/datafile/vEvent.cc
Go to the documentation of this file.
1
9
#include "vEvent.hh"
10
#include "vDataFile.hh"
11
#include "sOutputManager.hh"
12
13
// =====================================================================
14
// ---------------------------------------------------------------------
15
// ---------------------------------------------------------------------
16
// =====================================================================
17
18
vEvent::vEvent
()
19
{
20
m_timeInMs
= 0;
21
m_nbLines
= 0;
22
mp_ID1
= NULL;
23
mp_ID2
= NULL;
24
m_dataType
=
TYPE_UNKNOWN
;
25
m_dataMode
=
MODE_UNKNOWN
;
26
m_verbose
= -1;
27
m_eventValue
= 0.;
28
}
29
30
// =====================================================================
31
// ---------------------------------------------------------------------
32
// ---------------------------------------------------------------------
33
// =====================================================================
34
35
vEvent::~vEvent
()
36
{
37
if
(
mp_ID1
!= NULL) free(
mp_ID1
);
38
if
(
mp_ID1
!= NULL) free(
mp_ID2
);
39
}
40
41
// =====================================================================
42
// ---------------------------------------------------------------------
43
// ---------------------------------------------------------------------
44
// =====================================================================
45
46
int
vEvent::AllocateID
()
47
{
48
// Verbose
49
DEBUG_VERBOSE
(
m_verbose
,
VERBOSE_DEBUG_LIGHT
)
50
if
(
m_verbose
>=
VERBOSE_DETAIL
)
Cout
(
"vEvent::AllocateID() -> Allocate buffers for indices"
<< endl);
51
// Check number of lines
52
if
(
m_nbLines
<1)
53
{
54
Cerr
(
"***** vEvent::AllocateID() -> Error, number of lines has not been initialized (<1) !"
<< endl);
55
return
1;
56
}
57
else
58
{
59
// Allocate buffer indices
60
mp_ID1
= (uint32_t*)malloc(
m_nbLines
*
sizeof
(uint32_t));
61
mp_ID2
= (uint32_t*)malloc(
m_nbLines
*
sizeof
(uint32_t));
62
}
63
// Call the pure virtual function implemented in child classes for the allocation of data specific to child classes
64
if
(
AllocateSpecificData
())
65
{
66
Cerr
(
"***** vEvent::AllocateID() -> Error when trying to allocated specific data for the Event !"
<< endl);
67
return
1;
68
}
69
// End
70
return
0;
71
}
72
73
// =====================================================================
74
// ---------------------------------------------------------------------
75
// ---------------------------------------------------------------------
76
// =====================================================================
TYPE_UNKNOWN
#define TYPE_UNKNOWN
Definition:
code/include/datafile/vDataFile.hh:49
vEvent::m_verbose
int m_verbose
Definition:
code/include/datafile/vEvent.hh:210
Cerr
#define Cerr(MESSAGE)
Definition:
code/include/management/sOutputManager.hh:90
vEvent::m_dataType
int m_dataType
Definition:
code/include/datafile/vEvent.hh:207
vEvent::mp_ID1
uint32_t * mp_ID1
Definition:
code/include/datafile/vEvent.hh:204
DEBUG_VERBOSE
#define DEBUG_VERBOSE(IGNORED1, IGNORED2)
Definition:
code/include/management/sOutputManager.hh:122
vEvent::m_eventValue
FLTNB m_eventValue
Definition:
code/include/datafile/vEvent.hh:206
vEvent::vEvent
vEvent()
vEvent constructor. Initialize the member variables to their default values.
Definition:
code/src/datafile/vEvent.cc:18
vEvent::AllocateID
int AllocateID()
Instantiate the mp_ID1 and mp_ID2 indices arrays.
Definition:
code/src/datafile/vEvent.cc:46
vEvent::m_dataMode
int m_dataMode
Definition:
code/include/datafile/vEvent.hh:208
vEvent::AllocateSpecificData
virtual int AllocateSpecificData()=0
Pure virtual function implemented in the child classes, dedicated to the allocation of specific data ...
VERBOSE_DETAIL
#define VERBOSE_DETAIL
Definition:
code/include/management/sOutputManager.hh:109
vEvent::mp_ID2
uint32_t * mp_ID2
Definition:
code/include/datafile/vEvent.hh:205
MODE_UNKNOWN
#define MODE_UNKNOWN
Definition:
code/include/datafile/vDataFile.hh:32
VERBOSE_DEBUG_LIGHT
#define VERBOSE_DEBUG_LIGHT
Definition:
code/include/management/sOutputManager.hh:110
vEvent::m_nbLines
uint16_t m_nbLines
Definition:
code/include/datafile/vEvent.hh:203
Cout
#define Cout(MESSAGE)
Definition:
code/include/management/sOutputManager.hh:78
vEvent::m_timeInMs
uint32_t m_timeInMs
Definition:
code/include/datafile/vEvent.hh:202
vEvent::~vEvent
virtual ~vEvent()
vEvent destructor
Definition:
code/src/datafile/vEvent.cc:35
Generated on Tue Oct 22 2024 21:49:44 for CASToR by
1.8.13