|
gdata
|
Owns all detector-local data for one event. More...
#include <gEventDataCollection.h>
Public Member Functions | |
| GEventDataCollection (const std::shared_ptr< GOptions > &gopts, std::unique_ptr< GEventHeader > header) | |
| Constructs an event data collection with an owned header. | |
| void | addDetectorTrueInfoData (const std::string &sdName, std::unique_ptr< GTrueInfoData > data) |
| Appends one truth object to the specified detector entry. | |
| void | addDetectorDigitizedData (const std::string &sdName, std::unique_ptr< GDigitizedData > data) |
| Appends one digitized object to the specified detector entry. | |
| auto | getHeader () const -> const std::unique_ptr< GEventHeader > & |
| Returns read-only access to the owned event header. | |
| auto | getDataCollectionMap () const -> const std::map< std::string, std::unique_ptr< GDataCollection > > & |
| Returns read-only access to the detector map for this event. | |
| auto | getEventNumber () const -> int |
| Returns the event number stored in the owned header. | |
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 > |
| Creates a minimal example event containing one detector entry and one hit pair. | |
Additional Inherited Members | |
Protected Attributes inherited from GBase< GEventDataCollection > | |
| std::shared_ptr< GLogger > | log |
The object combines:
Each detector entry can contain:
The class does not enforce structural invariants such as matching truth and digitized counts. Applications that require such guarantees should validate them at a higher level.
Definition at line 87 of file gEventDataCollection.h.
|
inline |
Ownership of header is transferred to the collection.
| gopts | Shared options used to configure logging and related behavior. |
| header | Owned event header. |
Definition at line 99 of file gEventDataCollection.h.
| void GEventDataCollection::addDetectorDigitizedData | ( | const std::string & | sdName, |
| std::unique_ptr< GDigitizedData > | data ) |
If the detector key does not exist yet, a new GDataCollection is created automatically. Ownership of data is transferred to the target detector entry.
| sdName | Sensitive detector name used as the map key. |
| data | Digitized object to store. |
Definition at line 30 of file gEventDataCollection.cc.
| void GEventDataCollection::addDetectorTrueInfoData | ( | const std::string & | sdName, |
| std::unique_ptr< GTrueInfoData > | data ) |
If the detector key does not exist yet, a new GDataCollection is created automatically. Ownership of data is transferred to the target detector entry.
| sdName | Sensitive detector name used as the map key. |
| data | Truth object to store. |
Definition at line 19 of file gEventDataCollection.cc.
|
inlinestatic |
This helper is intended for examples and tests. It creates:
ctof ctof | gopts | Shared options. |
Definition at line 170 of file gEventDataCollection.h.
|
inline |
Keys are sensitive detector names and values are per-detector GDataCollection instances.
Definition at line 142 of file gEventDataCollection.h.
|
inline |
This is a convenience wrapper around the header accessor.
Definition at line 154 of file gEventDataCollection.h.
|
inline |
Definition at line 132 of file gEventDataCollection.h.