CbmRoot
compareHit.h
Go to the documentation of this file.
1
#ifndef COMPAREHIT_H
2
#define COMPAREHIT_H 1
3
4
#include "
CbmHit.h
"
5
#include "
CbmMatch.h
"
6
7
#include "
compareMatch.h
"
8
9
void
compareHitDataMembers
(
CbmHit
& test,
10
HitType
type,
11
Double_t z,
12
Double_t dz,
13
Int_t refid,
14
Int_t address,
15
CbmMatch
* match,
16
Double_t time,
17
Double_t errortime) {
18
Int_t retValInt {-111};
19
Float_t retValFloat {-111.};
20
21
EXPECT_EQ(type, test.
GetType
());
22
23
retValFloat = test.
GetZ
();
24
EXPECT_FLOAT_EQ(z, retValFloat);
25
26
retValFloat = test.
GetDz
();
27
EXPECT_FLOAT_EQ(dz, retValFloat);
28
29
retValInt = test.
GetRefId
();
30
EXPECT_EQ(refid, retValInt);
31
32
retValInt = test.
GetAddress
();
33
EXPECT_EQ(address, retValInt);
34
35
if
(match !=
nullptr
) {
36
compareMatchDataMembers
(
37
*test.
GetMatch
(), match->
GetNofLinks
(), match->
GetTotalWeight
());
38
}
else
{
39
EXPECT_EQ(match, test.
GetMatch
());
40
}
41
42
retValFloat = test.
GetTime
();
43
EXPECT_FLOAT_EQ(time, retValFloat);
44
45
retValFloat = test.
GetTimeError
();
46
EXPECT_FLOAT_EQ(errortime, retValFloat);
47
}
48
49
#endif // COMPAREHIT_H
CbmHit::GetZ
Double_t GetZ() const
Definition:
CbmHit.h:70
CbmMatch
Definition:
CbmMatch.h:22
compareMatch.h
CbmMatch::GetNofLinks
Int_t GetNofLinks() const
Definition:
CbmMatch.h:38
compareHitDataMembers
void compareHitDataMembers(CbmHit &test, HitType type, Double_t z, Double_t dz, Int_t refid, Int_t address, CbmMatch *match, Double_t time, Double_t errortime)
Definition:
compareHit.h:9
CbmHit::GetRefId
Int_t GetRefId() const
Definition:
CbmHit.h:72
CbmMatch.h
CbmHit::GetTimeError
Double_t GetTimeError() const
Definition:
CbmHit.h:76
CbmHit::GetMatch
CbmMatch * GetMatch() const
Definition:
CbmHit.h:74
CbmMatch::GetTotalWeight
Double_t GetTotalWeight() const
Definition:
CbmMatch.h:39
CbmHit.h
HitType
HitType
Definition:
CbmHit.h:16
CbmHit::GetTime
Double_t GetTime() const
Definition:
CbmHit.h:75
CbmHit::GetAddress
Int_t GetAddress() const
Definition:
CbmHit.h:73
compareMatchDataMembers
void compareMatchDataMembers(CbmMatch &testMatch, Int_t noflinks, Double_t weight)
Definition:
compareMatch.h:7
CbmHit
Definition:
CbmHit.h:38
CbmHit::GetType
HitType GetType() const
Definition:
CbmHit.h:69
CbmHit::GetDz
Double_t GetDz() const
Definition:
CbmHit.h:71
core
data
test
compareHit.h
Generated on Wed Oct 28 2020 15:11:49 for CbmRoot by
1.8.18