30 const std::array<float, myVtx::kNCov> cov = {1e-4, -1e-9, 2e-4, -1e-9, 1e-9, 1e-4};
34 myTS ts(1234.567, 0.99);
36 std::cout << vtx << std::endl;
37 BOOST_CHECK_CLOSE(vtx.getX() + vtx.getY() + vtx.getZ(),
pos.X() +
pos.Y() +
pos.Z(), 1e-5);
39 BOOST_CHECK_CLOSE(vtx.getCov()[
i], cov[
i], 1e-5);
41 BOOST_CHECK_CLOSE(vtx.getChi2(), chi2, 1e-5);
46 TFile
flOut(
"tstVtx.root",
"recreate");
47 flOut.WriteObjectAny(&vtx, vtx.Class(),
"vtx");
50 std::cout <<
"reading back written vertex" << std::endl;
51 TFile
flIn(
"tstVtx.root");
52 auto vtr =
static_cast<myVtx*
>(gFile->GetObjectUnchecked(
"vtx"));
54 std::cout << *vtr << std::endl;
55 BOOST_CHECK(vtx.getNContributors() == vtr->getNContributors());