BmnRoot
Loading...
Searching...
No Matches
BmnADCDigit.cxx
Go to the documentation of this file.
1#include "BmnADCDigit.h"
2
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
17BmnADCDigit::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
29BmnADCDigit::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
41BmnADCDigit::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
54BmnADCDigit::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
68{
69 if (fValueI)
70 delete[] fValueI;
71 if (fValueU)
72 delete[] fValueU;
73}
int i
Definition P4_F32vec4.h:22
Short_t * fValueI
Definition BmnADCDigit.h:17
Bool_t isEmbedded
Definition BmnADCDigit.h:19
virtual ~BmnADCDigit()
UInt_t fSerial
Definition BmnADCDigit.h:13
UShort_t * fValueU
Definition BmnADCDigit.h:16
UShort_t fChannel
Definition BmnADCDigit.h:14
UInt_t fNsmpl
Definition BmnADCDigit.h:15