12TEST(_GTestCbmPsdPoint, CheckDefaultConstructor)
17 comparePsdPointDataMembers(test, -1, -1, TVector3(0., 0., 0.), TVector3(0., 0., 0.), 0., 0., 0., 0, 0);
21 comparePsdPointDataMembers(*test1, -1, -1, TVector3(0., 0., 0.), TVector3(0., 0., 0.), 0., 0., 0., 0, 0);
24TEST(_GTestCbmPsdPoint, CheckStandardConstructor)
28 TVector3
pos {-2.1, 6.1, 23.};
29 TVector3 mom {2.5, 4.5, 78.};
32 double eloss {0.4567};
45TEST(_GTestCbmPsdPoint, CheckCopyConstructor)
49 TVector3
pos {-2.1, 6.1, 23.};
50 TVector3 mom {2.5, 4.5, 78.};
53 double eloss {0.4567};
72TEST(_GTestCbmPsdPoint, CheckCopyAssignmentOperator)
76 TVector3
pos {-2.1, 6.1, 23.};
77 TVector3 mom {2.5, 4.5, 78.};
80 double eloss {0.4567};
100TEST(_GTestCbmPsdPoint, CheckMoveConstructor)
102 int32_t trackid {34};
104 TVector3
pos {-2.1, 6.1, 23.};
105 TVector3 mom {2.5, 4.5, 78.};
108 double eloss {0.4567};
110 int32_t moduleid {0};
128TEST(_GTestCbmPsdPoint, CheckAssignmentOperator)
130 int32_t trackid {34};
132 TVector3
pos {-2.1, 6.1, 23.};
133 TVector3 mom {2.5, 4.5, 78.};
136 double eloss {0.4567};
138 int32_t moduleid {0};
148 test2 = std::move(test);
157TEST(_GTestCbmPsdPoint, CheckSetModuleID)
159 int32_t trackid {34};
161 TVector3
pos {-2.1, 6.1, 23.};
162 TVector3 mom {2.5, 4.5, 78.};
165 double eloss {0.4567};
167 int32_t moduleid {0};
179TEST(_GTestCbmPsdPoint, CheckToString)
181 int32_t trackid {34};
183 TVector3
pos {-2.1, 6.1, 23.};
184 TVector3 mom {2.5, 4.5, 78.};
187 double eloss {0.4567};
189 int32_t moduleid {0};
195 EXPECT_STREQ(
"PSD point for track 34 in detector 45\n Position (-2.1, "
196 "6.1, 23) cm\n Momentum (2.5, 4.5, 78) GeV\n Time 34.56 "
197 "ns, Length 1.2 cm, Energy loss 456700 keV",
201TEST(_GTestCbmPsdPoint, CheckPrint)
203 int32_t trackid {34};
205 TVector3
pos {-2.1, 6.1, 23.};
206 TVector3 mom {2.5, 4.5, 78.};
209 double eloss {0.4567};
211 int32_t moduleid {0};
217 testing::internal::CaptureStdout();
219 std::string output = testing::internal::GetCapturedStdout();
221 EXPECT_STREQ(
"[INFO] PSD point for track 34 in detector 45\n Position "
222 "(-2.1, 6.1, 23) cm\n Momentum (2.5, 4.5, 78) GeV\n Time "
223 "34.56 ns, Length 1.2 cm, Energy loss 456700 keV\n",
void comparePsdPointDataMembers(CbmPsdPoint &test, int32_t trackID, int32_t detID, TVector3 pos, TVector3 mom, double tof, double length, double eLoss, int32_t moduleid, int32_t eventid)