BmnRoot
Loading...
Searching...
No Matches
BmnBaseHit.cxx
Go to the documentation of this file.
1
7#include "BmnBaseHit.h"
8#include "BmnMatch.h"
9
11 : BmnBaseHit(kHIT, 0., 0., -1, -1, -1., -1.)
12{
13}
14
15BmnBaseHit::BmnBaseHit(HitType _type, Double_t _z, Double_t _dz,
16 Int_t _refId, Int_t _address,
17 Double_t _time, Double_t _timeError)
18 : TObject(),
19 fType(_type),
20 fZ(_z),
21 fDz(_dz),
22 fRefId(_refId),
23 fAddress(_address),
24 fTime(_time),
25 fTimeError(_timeError),
26 fMatch(NULL)
27{
28}
29
30// Only shallow copy needed
32 : TObject(rhs),
33 fType(rhs.fType),
34 fZ(rhs.fZ),
35 fDz(rhs.fDz),
36 fRefId(rhs.fRefId),
37 fAddress(rhs.fAddress),
38 fTime(rhs.fTime),
39 fTimeError(rhs.fTimeError),
40 fMatch(NULL)
41{
42}
43
44// Only shallow copy needed
46{
47
48 if (this != &rhs) {
49 TObject::operator=(rhs);
50 fType = rhs.fType;
51 fZ = rhs.fZ;
52 fDz = rhs.fDz;
53 fRefId = rhs.fRefId;
54 fAddress = rhs.fAddress;
55 fTime = rhs.fTime;
56 fTimeError = rhs.fTimeError;
57 fMatch = NULL;
58 }
59 return *this;
60}
61
63{
64 if ( fMatch ) delete fMatch;
65}
66
68 if ( fMatch ) delete fMatch;
69 fMatch = match;
70}
HitType
Definition BmnBaseHit.h:15
@ kHIT
Definition BmnBaseHit.h:16
BmnBaseHit()
Default constructor.
void SetMatch(BmnMatch *match)
virtual ~BmnBaseHit()
Destructor.
BmnBaseHit & operator=(const BmnBaseHit &)