1414 * - vector<unique_ptr<GDigitizedData>>
1515 * \endcode
1616 *
17- * Event-level semantics:
18- * - each call to addDetectorTrueInfoData/addDetectorDigitizedData appends one hit entry
19- * to the detector’s vectors.
17+ * ## Event-level semantics
18+ * - each call to \ref GEventDataCollection::addDetectorTrueInfoData() or \ref GEventDataCollection::addDetectorDigitizedData()
19+ * appends one hit entry to the specified detector’s vectors.
20+ * - the detector entry is created on demand if it does not already exist.
2021 *
21- * Ownership:
22+ * ## Ownership
2223 * - The event collection owns all hit entries via \c std::unique_ptr.
23- * - The caller transfers ownership when adding data.
24+ * - The caller transfers ownership when adding data (via \c std::move).
25+ *
26+ * ## Intended usage
27+ * A typical event loop will:
28+ * - create one \ref GEventDataCollection per event
29+ * - for each hit produced by simulation/digitization, push truth/digitized records into the event container
30+ * - pass the finished event container downstream (output, run integration, analysis, etc.)
2431 */
2532
2633#include " gEventHeader.h"
@@ -36,10 +43,13 @@ namespace gevent_data {
3643/* *
3744 * \brief Aggregated options for event-level data collection.
3845 *
46+ * \details
3947 * Combines options from:
4048 * - event header
4149 * - true/digitized data
4250 * - touchable (for identity creation in examples)
51+ *
52+ * This provides a single "options bundle" for event-level examples/applications.
4353 */
4454inline auto defineOptions () -> GOptions {
4555 auto goptions = GOptions (GEVENTDATA_LOGGER);
@@ -51,12 +61,28 @@ inline auto defineOptions() -> GOptions {
5161}
5262} // namespace gevent_data
5363
64+ /* *
65+ * \brief Event container that owns per-detector hit data for one event.
66+ *
67+ * \details
68+ * The container is built around a map from sensitive detector name to \ref GDataCollection.
69+ * Each detector collection stores per-hit truth and digitized objects.
70+ *
71+ * The header (\ref GEventHeader) stores identifying metadata such as:
72+ * - local event number
73+ * - thread ID label
74+ * - timestamp string
75+ */
5476class GEventDataCollection : public GBase <GEventDataCollection>
5577{
5678public:
5779 /* *
5880 * \brief Construct an event data collection with an owned header.
5981 *
82+ * \details
83+ * Ownership:
84+ * - \p header is moved into this object and is owned exclusively.
85+ *
6086 * \param gopts Shared options object used to configure logging and behavior.
6187 * \param header Owned event header.
6288 */
@@ -67,7 +93,9 @@ class GEventDataCollection : public GBase<GEventDataCollection>
6793 /* *
6894 * \brief Append one true-hit entry to the specified detector.
6995 *
70- * If the detector name is new, the internal per-detector \ref GDataCollection is created.
96+ * \details
97+ * - If \p sdName is new, a per-detector \ref GDataCollection is created automatically.
98+ * - Ownership of \p data is transferred to this event container.
7199 *
72100 * \param sdName Sensitive detector name (map key).
73101 * \param data True-hit object; ownership is transferred to this collection.
@@ -77,6 +105,10 @@ class GEventDataCollection : public GBase<GEventDataCollection>
77105 /* *
78106 * \brief Append one digitized-hit entry to the specified detector.
79107 *
108+ * \details
109+ * - If \p sdName is new, a per-detector \ref GDataCollection is created automatically.
110+ * - Ownership of \p data is transferred to this event container.
111+ *
80112 * \param sdName Sensitive detector name (map key).
81113 * \param data Digitized-hit object; ownership is transferred to this collection.
82114 */
@@ -91,6 +123,7 @@ class GEventDataCollection : public GBase<GEventDataCollection>
91123 /* *
92124 * \brief Access the per-detector map for this event.
93125 *
126+ * \details
94127 * Key: sensitive detector name.
95128 * Value: per-detector \ref GDataCollection containing per-hit entries.
96129 *
@@ -109,11 +142,14 @@ class GEventDataCollection : public GBase<GEventDataCollection>
109142 /* *
110143 * \brief Test/example factory: create an event collection with one dummy hit for "ctof".
111144 *
112- * This method supports examples/tests. It:
145+ * \details
146+ * This method exists to support examples/tests. It:
113147 * - creates a new \ref GEventHeader
114148 * - constructs an event data collection
115149 * - inserts one \ref GDigitizedData and one \ref GTrueInfoData entry under detector "ctof"
116150 *
151+ * This provides a minimal "event contains something" baseline for examples.
152+ *
117153 * \param gopts Shared options.
118154 * \return Shared pointer to the created event data collection.
119155 */
0 commit comments