BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnTrigInfoDst.cxx
Go to the documentation of this file.
1
/********************************************************************************
2
* BmnTrigInfoDst.cxx *
3
*******************************************************************************/
4
#include "
BmnTrigInfoDst.h
"
5
6
#include "BmnFDPoint.h"
7
#include "BmnTrigDigit.h"
8
#include "BmnTrigWaveDigit.h"
9
#include "FairLogger.h"
10
11
void
BmnTrigInfoDst::CreateBranches
(
Bool_t
isExp)
12
{
13
if
(
fBC1Digits
||
fBC2Digits
||
fFDDigits
||
fBDDigits
) {
14
LOG(error) <<
"BmnTrigInfoDst: branches have been already created. It is a programming error"
;
15
return
;
16
}
17
18
isExpData
= isExp;
19
if
(
isExpData
) {
20
fBC0Digits
=
new
TClonesArray
(
"BmnTrigWaveDigit"
);
21
fBC1Digits
=
new
TClonesArray
(
"BmnTrigWaveDigit"
);
22
fBC2Digits
=
new
TClonesArray
(
"BmnTrigWaveDigit"
);
23
fFDDigits
=
new
TClonesArray
(
"BmnTrigWaveDigit"
);
24
}
else
25
fFDDigits
=
new
TClonesArray
(
"BmnFDPoint"
);
26
fBDDigits
=
new
TClonesArray
(
"BmnTrigDigit"
);
27
}
28
29
// Default constructor
30
BmnTrigInfoDst::BmnTrigInfoDst
()
31
:
TNamed
(
"BmnTrigInfoDst"
,
"DST"
)
32
,
isExpData
(true)
33
,
fVCAmp
(0.)
34
,
fBC0Amp
(0.)
35
,
fBC1Amp
(0.)
36
,
fBC1Integral
(0.)
37
,
fBC2Amp
(0.)
38
,
fBDMult
(0)
39
,
fSiMDMult
(0)
40
,
fFDAmp
(0.)
41
,
fInputsAR
(0)
42
,
fInputsBR
(0)
43
,
fBC0Digits
(nullptr)
44
,
fBC1Digits
(nullptr)
45
,
fBC2Digits
(nullptr)
46
,
fBDDigits
(nullptr)
47
,
fFDDigits
(nullptr)
48
{}
49
50
// Constructor with flag whether experimental data are used
51
BmnTrigInfoDst::BmnTrigInfoDst
(
Bool_t
isExp)
52
:
TNamed
(
"BmnTrigInfoDst"
,
"DST"
)
53
,
fVCAmp
(0.)
54
,
fBC0Amp
(0.)
55
,
fBC1Amp
(0.)
56
,
fBC1Integral
(0.)
57
,
fBC2Amp
(0.)
58
,
fBDMult
(0)
59
,
fSiMDMult
(0)
60
,
fFDAmp
(0.)
61
,
fInputsAR
(0)
62
,
fInputsBR
(0)
63
,
fBC0Digits
(nullptr)
64
,
fBC1Digits
(nullptr)
65
,
fBC2Digits
(nullptr)
66
,
fBDDigits
(nullptr)
67
,
fFDDigits
(nullptr)
68
{
69
isExpData
= isExp;
70
CreateBranches
(
isExpData
);
71
}
72
73
// Copy constructor
74
BmnTrigInfoDst::BmnTrigInfoDst
(
const
BmnTrigInfoDst
& other)
75
:
TNamed
(
"BmnTrigInfoDst"
,
"DST"
)
76
,
isExpData
(other.
isExpData
)
77
,
fVCAmp
(other.
fVCAmp
)
78
,
fBC0Amp
(other.
fBC0Amp
)
79
,
fBC1Amp
(other.
fBC1Amp
)
80
,
fBC1Integral
(other.
fBC1Integral
)
81
,
fBC2Amp
(other.
fBC2Amp
)
82
,
fBDMult
(other.
fBDMult
)
83
,
fSiMDMult
(other.
fSiMDMult
)
84
,
fFDAmp
(other.
fFDAmp
)
85
,
fInputsAR
(other.
fInputsAR
)
86
,
fInputsBR
(other.
fInputsBR
)
87
{
88
if
(other.
fBC0Digits
)
89
fBC0Digits
=
new
TClonesArray
(*other.
fBC0Digits
);
90
else
91
fBC0Digits
=
nullptr
;
92
if (other.
fBC1Digits
)
93
fBC1Digits
=
new
TClonesArray
(*other.
fBC1Digits
);
94
else
95
fBC1Digits
=
nullptr
;
96
if (other.
fBC2Digits
)
97
fBC2Digits
=
new
TClonesArray
(*other.
fBC2Digits
);
98
else
99
fBC2Digits
=
nullptr
;
100
if (other.
fBDDigits
)
101
fBDDigits
=
new
TClonesArray
(*other.
fBDDigits
);
102
else
103
fBDDigits
=
nullptr
;
104
if (other.
fFDDigits
)
105
fFDDigits
=
new
TClonesArray
(*other.
fFDDigits
);
106
else
107
fFDDigits
=
nullptr
;
108
}
109
110
// Copy assignment operator
111
BmnTrigInfoDst
&
BmnTrigInfoDst::operator=
(
const
BmnTrigInfoDst
& other)
112
{
113
if
(&other !=
this
) {
114
isExpData
= other.
isExpData
;
115
fBC0Amp
= other.
fBC0Amp
;
116
fVCAmp
= other.
fVCAmp
;
117
fBC1Amp
= other.
fBC1Amp
;
118
fBC1Integral
= other.
fBC1Integral
;
119
fBC2Amp
= other.
fBC2Amp
;
120
fBDMult
= other.
fBDMult
;
121
fSiMDMult
= other.
fSiMDMult
;
122
fFDAmp
= other.
fFDAmp
;
123
fInputsAR
= other.
fInputsAR
;
124
fInputsBR
= other.
fInputsBR
;
125
126
TCAFree
();
127
if
(other.
fBC0Digits
)
128
fBC0Digits
=
new
TClonesArray
(*other.
fBC0Digits
);
129
else
130
fBC0Digits
=
nullptr
;
131
if
(other.
fBC1Digits
)
132
fBC1Digits
=
new
TClonesArray
(*other.
fBC1Digits
);
133
else
134
fBC1Digits
=
nullptr
;
135
if
(other.
fBC2Digits
)
136
fBC2Digits
=
new
TClonesArray
(*other.
fBC2Digits
);
137
else
138
fBC2Digits
=
nullptr
;
139
if
(other.
fBDDigits
)
140
fBDDigits
=
new
TClonesArray
(*other.
fBDDigits
);
141
else
142
fBDDigits
=
nullptr
;
143
if
(other.
fFDDigits
)
144
fFDDigits
=
new
TClonesArray
(*other.
fFDDigits
);
145
else
146
fFDDigits
=
nullptr
;
147
}
148
return
*
this
;
149
}
150
151
// Move constructor
152
BmnTrigInfoDst::BmnTrigInfoDst
(
BmnTrigInfoDst
&& other)
153
:
TNamed
(
"BmnTrigInfoDst"
,
"DST"
)
154
,
isExpData
(other.
isExpData
)
155
,
fVCAmp
(other.
fVCAmp
)
156
,
fBC0Amp
(other.
fBC0Amp
)
157
,
fBC1Amp
(other.
fBC1Amp
)
158
,
fBC1Integral
(other.
fBC1Integral
)
159
,
fBC2Amp
(other.
fBC2Amp
)
160
,
fBDMult
(other.
fBDMult
)
161
,
fSiMDMult
(other.
fSiMDMult
)
162
,
fFDAmp
(other.
fFDAmp
)
163
,
fInputsAR
(other.
fInputsAR
)
164
,
fInputsBR
(other.
fInputsBR
)
165
{
166
fBC0Digits
= std::exchange(other.fBC0Digits,
nullptr
);
167
fBC1Digits
= std::exchange(other.fBC1Digits,
nullptr
);
168
fBC2Digits
= std::exchange(other.fBC2Digits,
nullptr
);
169
fBDDigits
= std::exchange(other.fBDDigits,
nullptr
);
170
fFDDigits
= std::exchange(other.fFDDigits,
nullptr
);
171
}
172
173
// Move assignment operator
174
BmnTrigInfoDst
&
BmnTrigInfoDst::operator=
(
BmnTrigInfoDst
&& other)
175
{
176
isExpData
= other.isExpData;
177
fBC0Amp
= other.fBC0Amp;
178
fVCAmp
= other.fVCAmp;
179
fBC1Amp
= other.fBC1Amp;
180
fBC1Integral
= other.fBC1Integral;
181
fBC2Amp
= other.fBC2Amp;
182
fBDMult
= other.fBDMult;
183
fSiMDMult
= other.fSiMDMult;
184
fFDAmp
= other.fFDAmp;
185
fInputsAR
= other.fInputsAR;
186
fInputsBR
= other.fInputsBR;
187
188
TCAFree
();
189
fBC0Digits
= std::exchange(other.fBC0Digits,
nullptr
);
190
fBC1Digits
= std::exchange(other.fBC1Digits,
nullptr
);
191
fBC2Digits
= std::exchange(other.fBC2Digits,
nullptr
);
192
fBDDigits
= std::exchange(other.fBDDigits,
nullptr
);
193
fFDDigits
= std::exchange(other.fFDDigits,
nullptr
);
194
195
return
*
this
;
196
}
197
198
void
BmnTrigInfoDst::Reset
()
199
{
200
fVCAmp
=
fBC1Amp
=
fBC1Integral
=
fBC2Amp
=
fFDAmp
= 0.;
201
fBDMult
=
fSiMDMult
= 0;
202
if
(
fBC0Digits
)
203
fBC0Digits
->Delete();
204
if
(
fBC1Digits
)
205
fBC1Digits
->Delete();
206
if
(
fBC2Digits
)
207
fBC2Digits
->Delete();
208
if
(
fFDDigits
)
209
fFDDigits
->Delete();
210
if
(
fBDDigits
)
211
fBDDigits
->Delete();
212
}
213
214
void
BmnTrigInfoDst::TCAFree
()
215
{
216
if
(
fBC0Digits
) {
217
fBC0Digits
->Delete();
218
delete
fBC0Digits
;
219
}
220
if
(
fBC1Digits
) {
221
fBC1Digits
->Delete();
222
delete
fBC1Digits
;
223
}
224
if
(
fBC2Digits
) {
225
fBC2Digits
->Delete();
226
delete
fBC2Digits
;
227
}
228
if
(
fFDDigits
) {
229
fFDDigits
->Delete();
230
delete
fFDDigits
;
231
}
232
if
(
fBDDigits
) {
233
fBDDigits
->Delete();
234
delete
fBDDigits
;
235
}
236
}
237
238
BmnTrigInfoDst::~BmnTrigInfoDst
()
239
{
240
TCAFree
();
241
}
Bool_t
bool Bool_t
BmnTrigInfoDst::fBC1Integral
Float_t fBC1Integral
Definition
BmnTrigInfoDst.h:90
BmnTrigInfoDst::TCAFree
void TCAFree()
Definition
BmnTrigInfoDst.cxx:214
BmnTrigInfoDst::fBC1Digits
TClonesArray * fBC1Digits
Definition
BmnTrigInfoDst.h:103
BmnTrigInfoDst::fBC1Amp
Float_t fBC1Amp
Definition
BmnTrigInfoDst.h:89
BmnTrigInfoDst::fBC0Amp
Float_t fBC0Amp
Definition
BmnTrigInfoDst.h:88
BmnTrigInfoDst::fBC2Digits
TClonesArray * fBC2Digits
Definition
BmnTrigInfoDst.h:104
BmnTrigInfoDst::Reset
void Reset()
Definition
BmnTrigInfoDst.cxx:198
BmnTrigInfoDst::fBDMult
UInt_t fBDMult
Definition
BmnTrigInfoDst.h:92
BmnTrigInfoDst::~BmnTrigInfoDst
~BmnTrigInfoDst()
Destructor.
Definition
BmnTrigInfoDst.cxx:238
BmnTrigInfoDst::fSiMDMult
UInt_t fSiMDMult
Definition
BmnTrigInfoDst.h:93
BmnTrigInfoDst::fBC2Amp
Float_t fBC2Amp
Definition
BmnTrigInfoDst.h:91
BmnTrigInfoDst::isExpData
Bool_t isExpData
Definition
BmnTrigInfoDst.h:85
BmnTrigInfoDst::fBC0Digits
TClonesArray * fBC0Digits
Definition
BmnTrigInfoDst.h:102
BmnTrigInfoDst::fFDDigits
TClonesArray * fFDDigits
Definition
BmnTrigInfoDst.h:106
BmnTrigInfoDst::fInputsBR
UInt_t fInputsBR
Definition
BmnTrigInfoDst.h:96
BmnTrigInfoDst::fFDAmp
Float_t fFDAmp
Definition
BmnTrigInfoDst.h:94
BmnTrigInfoDst::fBDDigits
TClonesArray * fBDDigits
Definition
BmnTrigInfoDst.h:105
BmnTrigInfoDst::CreateBranches
void CreateBranches(Bool_t isExp)
Definition
BmnTrigInfoDst.cxx:11
BmnTrigInfoDst::fVCAmp
Float_t fVCAmp
Definition
BmnTrigInfoDst.h:87
BmnTrigInfoDst::BmnTrigInfoDst
BmnTrigInfoDst()
Default constructor.
Definition
BmnTrigInfoDst.cxx:30
BmnTrigInfoDst::operator=
BmnTrigInfoDst & operator=(const BmnTrigInfoDst &other)
Copy assignment operator.
Definition
BmnTrigInfoDst.cxx:111
BmnTrigInfoDst::fInputsAR
UInt_t fInputsAR
Definition
BmnTrigInfoDst.h:95
TNamed::TNamed
TNamed()
TObject::TClonesArray
friend friend class TClonesArray
BmnTrigInfoDst.h
reconstruction
dst
BmnTrigInfoDst.cxx
Generated on
for BmnRoot by
1.17.0