@@ -41,6 +41,10 @@ DECLARE_SOA_EXPRESSION_COLUMN(ESum, esum, int32_t, test ::x + test::y);
4141DECLARE_SOA_TABLE (Points, " TST" , " POINTS" , test::X, test::Y);
4242DECLARE_SOA_TABLE (Points3Ds, " TST" , " PTS3D" , o2::soa::Index<>, test::X, test::Y, test::Z);
4343
44+ DECLARE_SOA_TABLE (Points3DsMk1, " TST" , " PTS3D_1" , o2::soa::Index<>, o2::soa::Marker<1 >, test::X, test::Y, test::Z);
45+ DECLARE_SOA_TABLE (Points3DsMk2, " TST" , " PTS3D_2" , o2::soa::Index<>, o2::soa::Marker<2 >, test::X, test::Y, test::Z);
46+ DECLARE_SOA_TABLE (Points3DsMk3, " TST" , " PTS3D_3" , o2::soa::Index<>, o2::soa::Marker<3 >, test::X, test::Y, test::Z);
47+
4448namespace test
4549{
4650DECLARE_SOA_COLUMN_FULL (SomeBool, someBool, bool , " someBool" );
@@ -69,6 +73,24 @@ DECLARE_SOA_COLUMN(L2, l2, std::vector<int>);
6973
7074DECLARE_SOA_TABLE (Lists, " TST" , " LISTS" , o2::soa::Index<>, test::L1, test::L2);
7175
76+ BOOST_AUTO_TEST_CASE (TestMarkers)
77+ {
78+ TableBuilder b1;
79+ auto pwriter = b1.cursor <Points3Ds>();
80+ for (auto i = 0 ; i < 20 ; ++i) {
81+ pwriter (0 , -1 * i, (int )(i / 2 ), 2 * i);
82+ }
83+ auto t1 = b1.finalize ();
84+
85+ auto pt = Points3Ds{t1};
86+ auto pt1 = Points3DsMk1{t1};
87+ auto pt2 = Points3DsMk2{t1};
88+ auto pt3 = Points3DsMk3{t1};
89+ BOOST_REQUIRE_EQUAL (pt1.begin ().mark (), (size_t )1 );
90+ BOOST_REQUIRE_EQUAL (pt2.begin ().mark (), (size_t )2 );
91+ BOOST_REQUIRE_EQUAL (pt3.begin ().mark (), (size_t )3 );
92+ }
93+
7294BOOST_AUTO_TEST_CASE (TestTableIteration)
7395{
7496 TableBuilder builder;
0 commit comments