EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmBaseHit.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CbmBaseHit.cxx
1 
6 #include "CbmBaseHit.h"
7 
8 #include "FairMultiLinkedData.h"
9 
10 #include <memory>
11 
13  TObject(),
14  fType(kHIT),
15  fAddress(-1),
16  fZ(0.),
17  fDz(0.),
18  fRefId(-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::auto_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 
62 {
63 }
64