3333// / `DECLARE_SOA_TIMESTAMPED_TABLE` with the relevant subset of columns from
3434// / the `o2::aod::ccdbGlo` namespace rather than joining `aod::GloCCDBObjects`.
3535// /
36- // / Note: MatLayerCylSet is intentionally omitted — it requires
37- // / `MatLayerCylSet::rectifyPtrFromFile()` after deserialisation, which the
38- // / CCDB column mechanism does not perform.
36+ // / The material LUT lives in `aod::GeomCCDBObjects` rather than here: it belongs to
37+ // / the geometry/material family, whose validity is essentially static, and keeping it
38+ // / out means joining `aod::GloCCDBObjects` does not drag in a multi-hundred-MB object
39+ // / nobody asked for. Join whichever tables you need — the duplicated `aod::Timestamps`
40+ // / is deduplicated:
41+ // / \code
42+ // / using BCsWithLUT = soa::Join<aod::BCsWithTimestamps, aod::GeomCCDBObjects>;
43+ // / // rectifyPtrFromFile() is applied by the column's finaliser, so the
44+ // / // object handed back is ready to use; the task only has to (re)install it.
45+ // / auto* lut = &bcs.begin().matLUT();
46+ // / if (lut != mLastLUT) {
47+ // / o2::base::Propagator::Instance()->setMatLUT(lut);
48+ // / mLastLUT = lut;
49+ // / }
50+ // / \endcode
3951
4052#ifndef COMMON_DATAMODEL_GLOCCDBOBJECTS_H_
4153#define COMMON_DATAMODEL_GLOCCDBOBJECTS_H_
4456#include < DataFormatsParameters/GRPECSObject.h>
4557#include < DataFormatsParameters/GRPLHCIFData.h>
4658#include < DataFormatsParameters/GRPMagField.h>
59+ #include < DetectorsBase/MatLayerCylSet.h>
4760#include < Framework/ASoA.h>
4861#include < Framework/AnalysisDataModel.h>
4962
@@ -55,11 +68,31 @@ DECLARE_SOA_CCDB_COLUMN(GRPMagField, grpMagField, o2::parameters::GRPMagField, "
5568DECLARE_SOA_CCDB_COLUMN (MeanVertex, meanVertex, o2::dataformats::MeanVertexObject, " GLO/Calib/MeanVertex" ); // !
5669DECLARE_SOA_CCDB_COLUMN (GRPECSObject, grpECS, o2::parameters::GRPECSObject, " GLO/Config/GRPECS" ); // !
5770DECLARE_SOA_CCDB_COLUMN (GRPLHCIFData, grpLHCIF, o2::parameters::GRPLHCIFData, " GLO/Config/GRPLHCIF" ); // !
71+
72+ // / The material LUT is a FlatObject: straight out of the ROOT streamer its internal
73+ // / pointers are unfixed and its voxel lookup is unbuilt, so it is finalised with
74+ // / MatLayerCylSet::rectifyPtrFromFile() before ever being handed to a task.
75+ DECLARE_SOA_CCDB_COLUMN_FULL (MatLUT, " fMatLUT" , matLUT, o2::base::MatLayerCylSet, " GLO/Param/MatLUT" , // !
76+ [](o2::base::MatLayerCylSet* lut) { return o2::base::MatLayerCylSet::rectifyPtrFromFile (lut); });
5877} // namespace ccdbGlo
5978
6079// / Full table — join with aod::BCsWithTimestamps to obtain all four objects.
6180DECLARE_SOA_TIMESTAMPED_TABLE (GloCCDBObjects, aod::Timestamps, o2::aod::timestamp::Timestamp, 1 , " GLOCCDBOBJ" , // !
6281 ccdbGlo::GRPMagField, ccdbGlo::MeanVertex, ccdbGlo::GRPECSObject, ccdbGlo::GRPLHCIFData);
82+
83+ // / Geometry and material description: objects which describe where the detector material
84+ // / is, and which share an essentially static interval of validity. Kept apart from the GRP
85+ // / family above, which changes per run (and, for GRPMagField, per timeframe).
86+ // / The aligned/ideal geometry and the per-detector alignment objects belong here too when
87+ // / they get columns; see GRPGeomRequest in O2 (GLO/Config/GeometryAligned, GLO/Config/Geometry,
88+ // / <DET>/Calib/Align) for the family.
89+ // / Join it alongside aod::GloCCDBObjects when a task needs both — the duplicated
90+ // / aod::Timestamps is deduplicated when the joined table's originals are merged.
91+ // / Uniform in the run number: the geometry/material description does not change within a
92+ // / run, so the fetcher queries once per distinct run rather than once per BC.
93+ DECLARE_SOA_UNIFORM_TABLE (GeomCCDBObjects, aod::Timestamps, o2::aod::timestamp::Timestamp,
94+ aod::BCs, o2::aod::bc::RunNumber, 1 , " GEOMCCDBOBJ" , // !
95+ ccdbGlo::MatLUT);
6396} // namespace o2::aod
6497
6598#endif // COMMON_DATAMODEL_GLOCCDBOBJECTS_H_
0 commit comments