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>
12using namespace std;
13
14// --- Default constructor
16 : FairHit()
17 , fCellId{0}
18 , fCellSignal{0.}
19{
20 SetDetectorID(kSCWALL);
21}
22
23
24BmnScWallCell::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
34 : FairHit(other)
35 , fCellId(other.fCellId)
36 , fCellSignal(other.fCellSignal)
37{
38}
39
40
41// --- Move constructor
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
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
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
74void BmnScWallCell::Print(Option_t *option) const
75{
76}
77
79 fCellSignal = 0.;
80 fCellId = 0;
81 TVector3 zero;
82 SetPosition(zero);
83 SetPositionError(zero);
84 SetRefIndex(-1);
85}
@ kSCWALL
Class for Bmn ScWall module data container in event.
BmnScWallCell & operator=(const BmnScWallCell &)
BmnScWallCell()
Default constructor.
virtual void Print(Option_t *option="") const
STL namespace.