BmnRoot
Loading...
Searching...
No Matches
BmnScWallCell.cxx
Go to the documentation of this file.
1
8
#include "
BmnScWallCell.h
"
9
#include "BmnDetectorList.h"
10
11
#include <iostream>
12
using namespace
std
;
13
14
// --- Default constructor
15
BmnScWallCell::BmnScWallCell
()
16
: FairHit()
17
, fCellId{0}
18
, fCellSignal{0.}
19
{
20
SetDetectorID(
kSCWALL
);
21
}
22
23
24
BmnScWallCell::BmnScWallCell
(
int
CellId,
float
CellSignal, TVector3 posHit, TVector3 posHitErr,
int
pointIndx)
25
: FairHit{
kSCWALL
, posHit, posHitErr, pointIndx}
26
, fCellId{CellId}
27
, fCellSignal{CellSignal}
28
{
29
}
30
31
32
// --- Copy constructor
33
BmnScWallCell::BmnScWallCell
(
const
BmnScWallCell
& other)
34
: FairHit(other)
35
, fCellId(other.fCellId)
36
, fCellSignal(other.fCellSignal)
37
{
38
}
39
40
41
// --- Move constructor
42
BmnScWallCell::BmnScWallCell
(
BmnScWallCell
&& other) noexcept
43
: FairHit(std::move(other))
// Call the base class move constructor
44
, fCellId(std::exchange(other.fCellId, 0))
45
, fCellSignal(std::exchange(other.fCellSignal, 0.))
46
{
47
}
48
49
50
// --- Assignment operator
51
BmnScWallCell
&
BmnScWallCell::operator=
(
const
BmnScWallCell
& other)
52
{
53
if
(
this
!= &other) {
54
FairHit::operator=(other);
// Call the base class assignment operator
55
fCellId = other.fCellId;
56
fCellSignal = other.fCellSignal;
57
}
58
return
*
this
;
59
}
60
61
62
// --- Move assignment operator
63
BmnScWallCell
&
BmnScWallCell::operator=
(
BmnScWallCell
&& other)
noexcept
64
{
65
if
(
this
!= &other) {
66
FairHit::operator=(std::move(other));
// Call the base class move assignment operator
67
fCellId = std::exchange(other.fCellId, 0);
68
fCellSignal = std::exchange(other.fCellSignal, 0.);
69
}
70
return
*
this
;
71
}
72
73
74
void
BmnScWallCell::Print
(Option_t *option)
const
75
{
76
}
77
78
void
BmnScWallCell::reset
() {
79
fCellSignal = 0.;
80
fCellId = 0;
81
TVector3 zero;
82
SetPosition(zero);
83
SetPositionError(zero);
84
SetRefIndex(-1);
85
}
kSCWALL
@ kSCWALL
Definition
BmnDetectorList.h:32
BmnScWallCell
Class for Bmn ScWall module data container in event.
Definition
BmnScWallCell.h:22
BmnScWallCell::operator=
BmnScWallCell & operator=(const BmnScWallCell &)
Definition
BmnScWallCell.cxx:51
BmnScWallCell::BmnScWallCell
BmnScWallCell()
Default constructor.
Definition
BmnScWallCell.cxx:15
BmnScWallCell::reset
void reset()
Definition
BmnScWallCell.cxx:78
BmnScWallCell::Print
virtual void Print(Option_t *option="") const
Definition
BmnScWallCell.cxx:74
BmnScWallCell.h
std
STL namespace.
detectors
scwall
BmnScWallCell.cxx
Generated on Fri May 15 2026 10:40:52 for BmnRoot by
1.9.8