BmnRoot
Loading...
Searching...
No Matches
BmnADCDigit.cxx
Go to the documentation of this file.
1
#include "
BmnADCDigit.h
"
2
3
BmnADCDigit::BmnADCDigit
()
4
: isEmbedded(kFALSE)
5
{
6
fSerial
= 0;
7
fChannel
= 0;
8
fNsmpl
= 0;
9
fValueU
=
new
UShort_t[
fNsmpl
];
10
fValueI
=
new
Short_t[
fNsmpl
];
11
for
(UInt_t
i
= 0;
i
<
fNsmpl
; ++
i
) {
12
fValueI
[
i
] = 0;
13
fValueU
[
i
] = 0;
14
}
15
}
16
17
BmnADCDigit::BmnADCDigit
(UInt_t iSerial, UShort_t iChannel, UInt_t n, vector<UShort_t>& iValue)
18
: fValueI(nullptr)
19
, isEmbedded(kFALSE)
20
{
21
fSerial
= iSerial;
22
fChannel
= iChannel;
23
fNsmpl
= n;
24
fValueU
=
new
UShort_t[
fNsmpl
];
25
for
(UInt_t
i
= 0;
i
<
fNsmpl
; ++
i
)
26
fValueU
[
i
] = iValue[
i
];
27
}
28
29
BmnADCDigit::BmnADCDigit
(UInt_t iSerial, UShort_t iChannel, UInt_t n, vector<Short_t>& iValue)
30
: fValueU(nullptr)
31
, isEmbedded(kFALSE)
32
{
33
fSerial
= iSerial;
34
fChannel
= iChannel;
35
fNsmpl
= n;
36
fValueI
=
new
Short_t[
fNsmpl
];
37
for
(UInt_t
i
= 0;
i
<
fNsmpl
; ++
i
)
38
fValueI
[
i
] = iValue[
i
];
39
}
40
41
BmnADCDigit::BmnADCDigit
(UInt_t iSerial, UShort_t iChannel, UInt_t n, UShort_t* iValue)
42
: fValueI(nullptr)
43
, isEmbedded(kFALSE)
44
{
45
fSerial
= iSerial;
46
fChannel
= iChannel;
47
fNsmpl
= n;
48
fValueU
=
new
UShort_t[
fNsmpl
];
49
if
(iValue)
50
for
(UInt_t
i
= 0;
i
<
fNsmpl
; ++
i
)
51
fValueU
[
i
] = iValue[
i
];
52
}
53
54
BmnADCDigit::BmnADCDigit
(UInt_t iSerial, UShort_t iChannel, UInt_t n, Short_t* iValue, Bool_t flagEmb)
55
: fValueU(nullptr)
56
{
57
isEmbedded
= flagEmb;
58
fSerial
= iSerial;
59
fChannel
= iChannel;
60
fNsmpl
= n;
61
fValueI
=
new
Short_t[
fNsmpl
];
62
if
(iValue)
63
for
(UInt_t
i
= 0;
i
<
fNsmpl
; ++
i
)
64
fValueI
[
i
] = iValue[
i
];
65
}
66
67
BmnADCDigit::~BmnADCDigit
()
68
{
69
if
(
fValueI
)
70
delete
[]
fValueI
;
71
if
(
fValueU
)
72
delete
[]
fValueU
;
73
}
i
int i
Definition
P4_F32vec4.h:22
BmnADCDigit::BmnADCDigit
BmnADCDigit()
Definition
BmnADCDigit.cxx:3
BmnADCDigit::fValueI
Short_t * fValueI
Definition
BmnADCDigit.h:17
BmnADCDigit::isEmbedded
Bool_t isEmbedded
Definition
BmnADCDigit.h:19
BmnADCDigit::~BmnADCDigit
virtual ~BmnADCDigit()
Definition
BmnADCDigit.cxx:67
BmnADCDigit::fSerial
UInt_t fSerial
Definition
BmnADCDigit.h:13
BmnADCDigit::fValueU
UShort_t * fValueU
Definition
BmnADCDigit.h:16
BmnADCDigit::fChannel
UShort_t fChannel
Definition
BmnADCDigit.h:14
BmnADCDigit::fNsmpl
UInt_t fNsmpl
Definition
BmnADCDigit.h:15
BmnADCDigit.h
base
raw
BmnADCDigit.cxx
Generated on Fri May 15 2026 10:40:50 for BmnRoot by
1.9.8