BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnScWallCell.cxx
Go to the documentation of this file.
1
/** @file BmnScWallCell.cxx
2
** @author
3
** @date 09.09.2022
4
**
5
** Code of Class for Bmn ScWall module data container in event
6
**/
7
8
#include "
BmnScWallCell.h
"
9
10
#include "BmnDetectorList.h"
11
12
#include <iostream>
13
using namespace
std
;
14
15
// --- Default constructor
16
BmnScWallCell::BmnScWallCell
()
17
:
FairHit
()
18
,
fCellId
{0}
19
,
fCellSignal
{0.}
20
{
21
SetDetectorID(
kSCWALL
);
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
// --- Copy constructor
31
BmnScWallCell::BmnScWallCell
(
const
BmnScWallCell
& other)
32
:
FairHit
(other)
33
,
fCellId
(other.
fCellId
)
34
,
fCellSignal
(other.
fCellSignal
)
35
{}
36
37
// --- Move constructor
38
BmnScWallCell::BmnScWallCell
(
BmnScWallCell
&& other)
noexcept
39
:
FairHit
(std::move(other))
// Call the base class move constructor
40
,
fCellId
(std::exchange(other.fCellId, 0))
41
,
fCellSignal
(std::exchange(other.fCellSignal, 0.))
42
{}
43
44
// --- Assignment operator
45
BmnScWallCell
&
BmnScWallCell::operator=
(
const
BmnScWallCell
& other)
46
{
47
if
(
this
!= &other) {
48
FairHit::operator=(other);
// Call the base class assignment operator
49
fCellId
= other.
fCellId
;
50
fCellSignal
= other.
fCellSignal
;
51
}
52
return
*
this
;
53
}
54
55
// --- Move assignment operator
56
BmnScWallCell
&
BmnScWallCell::operator=
(
BmnScWallCell
&& other)
noexcept
57
{
58
if
(
this
!= &other) {
59
FairHit::operator=(std::move(other));
// Call the base class move assignment operator
60
fCellId
= std::exchange(other.fCellId, 0);
61
fCellSignal
= std::exchange(other.fCellSignal, 0.);
62
}
63
return
*
this
;
64
}
65
66
void
BmnScWallCell::Print
(
Option_t
* option)
const
{}
67
68
void
BmnScWallCell::reset
()
69
{
70
fCellSignal
= 0.;
71
fCellId
= 0;
72
TVector3
zero;
73
SetPosition(zero);
74
SetPositionError(zero);
75
SetRefIndex(-1);
76
}
Option_t
const char Option_t
kSCWALL
@ kSCWALL
Definition
BmnDetectorList.h:32
BmnScWallCell::operator=
BmnScWallCell & operator=(const BmnScWallCell &)
Assignment operator.
Definition
BmnScWallCell.cxx:45
BmnScWallCell::BmnScWallCell
BmnScWallCell()
Default constructor.
Definition
BmnScWallCell.cxx:16
BmnScWallCell::fCellId
int fCellId
Definition
BmnScWallCell.h:75
BmnScWallCell::fCellSignal
float fCellSignal
Definition
BmnScWallCell.h:76
BmnScWallCell::reset
void reset()
Definition
BmnScWallCell.cxx:68
BmnScWallCell::Print
virtual void Print(Option_t *option="") const
Definition
BmnScWallCell.cxx:66
FairHit
TVector3
BmnScWallCell.h
std
Definition
json.hpp:4446
std::noexcept
*brief exchanges the values of two JSON objects *sa nlohmann::NLOHMANN_BASIC_JSON_TPL &j2 noexcept(is_nothrow_move_constructible< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value &&is_nothrow_move_assignable< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value)
Definition
json.hpp:20347
detectors
scwall
BmnScWallCell.cxx
Generated on
for BmnRoot by
1.17.0