BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
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>
13using namespace std;
14
15// --- Default constructor
17 : FairHit()
18 , fCellId{0}
19 , fCellSignal{0.}
20{
21 SetDetectorID(kSCWALL);
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// --- Copy constructor
32 : FairHit(other)
33 , fCellId(other.fCellId)
35{}
36
37// --- Move constructor
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
46{
47 if (this != &other) {
48 FairHit::operator=(other); // Call the base class assignment operator
49 fCellId = other.fCellId;
51 }
52 return *this;
53}
54
55// --- Move assignment operator
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
66void BmnScWallCell::Print(Option_t* option) const {}
67
69{
70 fCellSignal = 0.;
71 fCellId = 0;
72 TVector3 zero;
73 SetPosition(zero);
74 SetPositionError(zero);
75 SetRefIndex(-1);
76}
const char Option_t
@ kSCWALL
BmnScWallCell & operator=(const BmnScWallCell &)
Assignment operator.
BmnScWallCell()
Default constructor.
virtual void Print(Option_t *option="") const
Definition json.hpp:4446
*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