BmnRoot
Loading...
Searching...
No Matches
CbmBaseHit.cxx
Go to the documentation of this file.
1
6#include "CbmBaseHit.h"
7
8#include "FairMultiLinkedData.h"
9
10#include <memory>
11
13 TObject(),
14 fType(kHIT_o),
15 fZ(0.),
16 fDz(0.),
17 fRefId(-1),
18 fAddress(-1),
19 fLinks(NULL)
20{
21}
22
24 : TObject(rhs),
25 fType(rhs.fType),
26 fZ(rhs.fZ),
27 fDz(rhs.fDz),
28 fRefId(rhs.fRefId),
29 fAddress(rhs.fAddress),
30 fLinks(NULL)
31{
32 if (NULL != rhs.fLinks) {
33 fLinks = new FairMultiLinkedData(*(rhs.fLinks));
34 }
35}
36
38{
39
40 if (this != &rhs) {
41
42 TObject::operator=(rhs);
43 fType = rhs.fType;
44 fZ = rhs.fZ;
45 fDz = rhs.fDz;
46 fRefId = rhs.fRefId;
47 fAddress = rhs.fAddress;
48
49 if (NULL != rhs.fLinks) {
50 std::unique_ptr<FairMultiLinkedData> tmp(new FairMultiLinkedData(*rhs.fLinks));
51 delete fLinks;
52 fLinks = tmp.release();
53 } else {
54 fLinks = NULL;
55 }
56 }
57 return *this;
58}
59
60
@ kHIT_o
Definition CbmBaseHit.h:15
CbmBaseHit & operator=(const CbmBaseHit &)
CbmBaseHit()
Default constructor.
virtual ~CbmBaseHit()
Destructor.