|
gdata
|
Event container that owns per-detector hit data for one event. More...
#include <gEventDataCollection.h>
Public Member Functions | |
| GEventDataCollection (const std::shared_ptr< GOptions > &gopts, std::unique_ptr< GEventHeader > header) | |
| Construct an event data collection with an owned header. | |
| void | addDetectorTrueInfoData (const std::string &sdName, std::unique_ptr< GTrueInfoData > data) |
| Append one true-hit entry to the specified detector. | |
| void | addDetectorDigitizedData (const std::string &sdName, std::unique_ptr< GDigitizedData > data) |
| Append one digitized-hit entry to the specified detector. | |
| auto | getHeader () const -> const std::unique_ptr< GEventHeader > & |
| Access the owned event header. | |
| auto | getDataCollectionMap () const -> const std::map< std::string, std::unique_ptr< GDataCollection > > & |
| Access the per-detector map for this event. | |
| auto | getEventNumber () const -> int |
| Convenience accessor for the event number. | |
Public Member Functions inherited from GBase< GEventDataCollection > | |
| GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="") | |
| GBase (const std::shared_ptr< GLogger > &logger) | |
| GBase (const GBase &)=default | |
| GBase (GBase &&) noexcept=default | |
| virtual | ~GBase () |
| GBase & | operator= (const GBase &)=default |
| GBase & | operator= (GBase &&) noexcept=default |
Static Public Member Functions | |
| static auto | create (const std::shared_ptr< GOptions > &gopts) -> std::shared_ptr< GEventDataCollection > |
| Test/example factory: create an event collection with one dummy hit for "ctof". | |
Additional Inherited Members | |
Protected Attributes inherited from GBase< GEventDataCollection > | |
| std::shared_ptr< GLogger > | log |
The container is built around a map from sensitive detector name to GDataCollection. Each detector collection stores per-hit truth and digitized objects.
The header (GEventHeader) stores identifying metadata such as:
Definition at line 83 of file gEventDataCollection.h.
|
inline |
Ownership:
header is moved into this object and is owned exclusively.| gopts | Shared options object used to configure logging and behavior. |
| header | Owned event header. |
Definition at line 96 of file gEventDataCollection.h.
| void GEventDataCollection::addDetectorDigitizedData | ( | const std::string & | sdName, |
| std::unique_ptr< GDigitizedData > | data ) |
sdName is new, a per-detector GDataCollection is created automatically.data is transferred to this event container.| sdName | Sensitive detector name (map key). |
| data | Digitized-hit object; ownership is transferred to this collection. |
Definition at line 34 of file gEventDataCollection.cc.
| void GEventDataCollection::addDetectorTrueInfoData | ( | const std::string & | sdName, |
| std::unique_ptr< GTrueInfoData > | data ) |
sdName is new, a per-detector GDataCollection is created automatically.data is transferred to this event container.| sdName | Sensitive detector name (map key). |
| data | True-hit object; ownership is transferred to this collection. |
Definition at line 23 of file gEventDataCollection.cc.
|
inlinestatic |
This method exists to support examples/tests. It:
This provides a minimal "event contains something" baseline for examples.
| gopts | Shared options. |
Definition at line 167 of file gEventDataCollection.h.
|
inline |
Key: sensitive detector name. Value: per-detector GDataCollection containing per-hit entries.
Definition at line 139 of file gEventDataCollection.h.
|
inline |
Equivalent to getG4LocalEvn() on the owned header.
Definition at line 151 of file gEventDataCollection.h.
|
inline |
Definition at line 128 of file gEventDataCollection.h.