Skip to content

Commit 1bc916a

Browse files
aalkinktf
authored andcommitted
DPL Analysis: allow 4byte origin in table metadata
1 parent 112335f commit 1bc916a

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

Framework/Core/include/Framework/ASoA.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ class TableMetadata
15751575
{
15761576
public:
15771577
static constexpr char const* tableLabel() { return INHERIT::mLabel; }
1578-
static constexpr char const (&origin())[4] { return INHERIT::mOrigin; }
1578+
static constexpr char const (&origin())[5] { return INHERIT::mOrigin; }
15791579
static constexpr char const (&description())[16] { return INHERIT::mDescription; }
15801580
static constexpr o2::header::DataHeader::SubSpecificationType version() { return INHERIT::mVersion; }
15811581
static std::string sourceSpec() { return fmt::format("{}/{}/{}/{}", INHERIT::mLabel, INHERIT::mOrigin, INHERIT::mDescription, INHERIT::mVersion); };
@@ -2366,7 +2366,7 @@ std::tuple<typename Cs::type...> getRowData(arrow::Table* table, T rowIterator,
23662366
using table_t = _Name_; \
23672367
static constexpr o2::header::DataHeader::SubSpecificationType mVersion = _Version_; \
23682368
static constexpr char const* mLabel = _Label_; \
2369-
static constexpr char const mOrigin[4] = _Origin_; \
2369+
static constexpr char const mOrigin[5] = _Origin_; \
23702370
static constexpr char const mDescription[16] = _Description_; \
23712371
}; \
23722372
\
@@ -2407,7 +2407,7 @@ std::tuple<typename Cs::type...> getRowData(arrow::Table* table, T rowIterator,
24072407
using sources = originals; \
24082408
static constexpr o2::header::DataHeader::SubSpecificationType mVersion = getVersion<_Table_>(); \
24092409
static constexpr char const* mLabel = #_Name_ "Extension"; \
2410-
static constexpr char const mOrigin[4] = _Origin_; \
2410+
static constexpr char const mOrigin[5] = _Origin_; \
24112411
static constexpr char const mDescription[16] = _Description_; \
24122412
}; \
24132413
\
@@ -2438,7 +2438,7 @@ std::tuple<typename Cs::type...> getRowData(arrow::Table* table, T rowIterator,
24382438
using sources = typename _Name_::sources_t; \
24392439
static constexpr o2::header::DataHeader::SubSpecificationType mVersion = 0; \
24402440
static constexpr char const* mLabel = #_Name_; \
2441-
static constexpr char const mOrigin[4] = _Origin_; \
2441+
static constexpr char const mOrigin[5] = _Origin_; \
24422442
static constexpr char const mDescription[16] = _Description_; \
24432443
static constexpr bool exclusive = _Exclusive_; \
24442444
}; \

Framework/Core/test/test_ASoA.cxx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@ DECLARE_SOA_DYNAMIC_COLUMN(Sum, sum, [](int x, int y) { return x + y; });
3333
DECLARE_SOA_EXPRESSION_COLUMN(ESum, esum, int, test::x + test::y);
3434
} // namespace test
3535

36-
DECLARE_SOA_TABLE(Points, "TST", "POINTS", test::X, test::Y);
37-
DECLARE_SOA_TABLE(Points3Ds, "TST", "PTS3D", o2::soa::Index<>, test::X, test::Y, test::Z);
36+
DECLARE_SOA_TABLE(Points, "TEST", "POINTS", test::X, test::Y);
37+
DECLARE_SOA_TABLE(Points3Ds, "TEST", "PTS3D", o2::soa::Index<>, test::X, test::Y, test::Z);
3838

39-
DECLARE_SOA_TABLE(Points3DsMk1, "TST", "PTS3D_1", o2::soa::Index<>, o2::soa::Marker<1>, test::X, test::Y, test::Z);
40-
DECLARE_SOA_TABLE(Points3DsMk2, "TST", "PTS3D_2", o2::soa::Index<>, o2::soa::Marker<2>, test::X, test::Y, test::Z);
41-
DECLARE_SOA_TABLE(Points3DsMk3, "TST", "PTS3D_3", o2::soa::Index<>, o2::soa::Marker<3>, test::X, test::Y, test::Z);
39+
DECLARE_SOA_TABLE(Points3DsMk1, "TEST", "PTS3D_1", o2::soa::Index<>, o2::soa::Marker<1>, test::X, test::Y, test::Z);
40+
DECLARE_SOA_TABLE(Points3DsMk2, "TEST", "PTS3D_2", o2::soa::Index<>, o2::soa::Marker<2>, test::X, test::Y, test::Z);
41+
DECLARE_SOA_TABLE(Points3DsMk3, "TEST", "PTS3D_3", o2::soa::Index<>, o2::soa::Marker<3>, test::X, test::Y, test::Z);
4242

4343
namespace test
4444
{
4545
DECLARE_SOA_COLUMN_FULL(SomeBool, someBool, bool, "someBool");
4646
DECLARE_SOA_COLUMN_FULL(Color, color, int32_t, "color");
4747
} // namespace test
4848

49-
DECLARE_SOA_TABLE(Infos, "TST", "INFOS", test::Color, test::SomeBool);
49+
DECLARE_SOA_TABLE(Infos, "TEST", "INFOS", test::Color, test::SomeBool);
5050

5151
namespace test
5252
{
@@ -57,16 +57,16 @@ DECLARE_SOA_INDEX_COLUMN_FULL(PointB, pointB, int, Points, "_B");
5757
DECLARE_SOA_COLUMN_FULL(Thickness, thickness, int, "thickness");
5858
} // namespace test
5959

60-
DECLARE_SOA_TABLE(Segments, "TST", "SEGMENTS", test::N, test::PointAId, test::PointBId, test::InfoId);
61-
DECLARE_SOA_TABLE(SegmentsExtras, "TST", "SEGMENTSEX", test::Thickness);
60+
DECLARE_SOA_TABLE(Segments, "TEST", "SEGMENTS", test::N, test::PointAId, test::PointBId, test::InfoId);
61+
DECLARE_SOA_TABLE(SegmentsExtras, "TEST", "SEGMENTSEX", test::Thickness);
6262

6363
namespace test
6464
{
6565
DECLARE_SOA_COLUMN(L1, l1, std::vector<float>);
6666
DECLARE_SOA_COLUMN(L2, l2, std::vector<int>);
6767
} // namespace test
6868

69-
DECLARE_SOA_TABLE(Lists, "TST", "LISTS", o2::soa::Index<>, test::L1, test::L2);
69+
DECLARE_SOA_TABLE(Lists, "TEST", "LISTS", o2::soa::Index<>, test::L1, test::L2);
7070
} // namespace o2::aod
7171

7272
TEST_CASE("TestMarkers")
@@ -712,16 +712,16 @@ TEST_CASE("TestEmptyTables")
712712

713713
namespace o2::aod
714714
{
715-
DECLARE_SOA_TABLE(Origints, "TST", "ORIG", o2::soa::Index<>, test::X, test::SomeBool);
715+
DECLARE_SOA_TABLE(Origints, "TEST", "ORIG", o2::soa::Index<>, test::X, test::SomeBool);
716716
namespace test
717717
{
718718
DECLARE_SOA_INDEX_COLUMN(Origint, origint);
719719
DECLARE_SOA_INDEX_COLUMN_FULL(AltOrigint, altOrigint, int, Origints, "_alt");
720720
DECLARE_SOA_ARRAY_INDEX_COLUMN(Origint, origints);
721721
} // namespace test
722-
DECLARE_SOA_TABLE(References, "TST", "REFS", o2::soa::Index<>, test::OrigintId);
723-
DECLARE_SOA_TABLE(OtherReferences, "TST", "OREFS", o2::soa::Index<>, test::AltOrigintId);
724-
DECLARE_SOA_TABLE(ManyReferences, "TST", "MREFS", o2::soa::Index<>, test::OrigintIds);
722+
DECLARE_SOA_TABLE(References, "TEST", "REFS", o2::soa::Index<>, test::OrigintId);
723+
DECLARE_SOA_TABLE(OtherReferences, "TEST", "OREFS", o2::soa::Index<>, test::AltOrigintId);
724+
DECLARE_SOA_TABLE(ManyReferences, "TEST", "MREFS", o2::soa::Index<>, test::OrigintIds);
725725
} // namespace o2::aod
726726
TEST_CASE("TestIndexToFiltered")
727727
{
@@ -786,9 +786,9 @@ DECLARE_SOA_SELF_SLICE_INDEX_COLUMN(PointSeq, pointSeq);
786786
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(PointSet, pointSet);
787787
} // namespace test
788788

789-
DECLARE_SOA_TABLE(PointsRef, "TST", "PTSREF", test::Points3DIdSlice, test::Points3DIds);
790-
DECLARE_SOA_TABLE(PointsRefF, "TST", "PTSREFF", test::SinglePointId, test::Points3DIdSlice, test::Points3DIds);
791-
DECLARE_SOA_TABLE(PointsSelfIndex, "TST", "PTSSLF", o2::soa::Index<>, test::X, test::Y, test::Z, test::OtherPointId,
789+
DECLARE_SOA_TABLE(PointsRef, "TEST", "PTSREF", test::Points3DIdSlice, test::Points3DIds);
790+
DECLARE_SOA_TABLE(PointsRefF, "TEST", "PTSREFF", test::SinglePointId, test::Points3DIdSlice, test::Points3DIds);
791+
DECLARE_SOA_TABLE(PointsSelfIndex, "TEST", "PTSSLF", o2::soa::Index<>, test::X, test::Y, test::Z, test::OtherPointId,
792792
test::PointSeqIdSlice, test::PointSetIds);
793793
} // namespace o2::aod
794794

@@ -1099,7 +1099,7 @@ DECLARE_SOA_COLUMN(SmallIntArray, smallIntArray, int8_t[32]);
10991099
DECLARE_SOA_BITMAP_COLUMN(BoolArray, boolArray, 32);
11001100
} // namespace test
11011101

1102-
DECLARE_SOA_TABLE(BILists, "TST", "BILISTS", o2::soa::Index<>, test::SmallIntArray, test::BoolArray);
1102+
DECLARE_SOA_TABLE(BILists, "TEST", "BILISTS", o2::soa::Index<>, test::SmallIntArray, test::BoolArray);
11031103
} // namespace o2::aod
11041104

11051105
TEST_CASE("TestArrayColumns")

0 commit comments

Comments
 (0)