Stores minimal metadata for one event.
More...
#include <gEventHeader.h>
|
| static std::unique_ptr< GEventHeader > | create (const std::shared_ptr< GOptions > &gopts, int tid=-1) |
| | Creates a header with a unique event number for tests and examples.
|
| |
The object provides a compact event label and provenance bundle containing:
- the local event number
- the thread identifier used for diagnostics
- a construction-time timestamp string
Ownership:
Definition at line 69 of file gEventHeader.h.
◆ GEventHeader()
| GEventHeader::GEventHeader |
( |
const std::shared_ptr< GOptions > & | gopts, |
|
|
int | n, |
|
|
int | tid ) |
|
inline |
The constructor also assigns a local-time timestamp string and emits an informational summary through the logger.
- Parameters
-
| gopts | Shared options used to configure logging and related behavior. |
| n | Local event number. |
| tid | Thread identifier associated with the event. |
Definition at line 83 of file gEventHeader.h.
◆ create()
| static std::unique_ptr< GEventHeader > GEventHeader::create |
( |
const std::shared_ptr< GOptions > & | gopts, |
|
|
int | tid = -1 ) |
|
inlinestatic |
If tid is negative, a synthetic thread identifier is derived from the event number. The generated event number comes from a static atomic counter so concurrent example code can obtain unique values.
- Parameters
-
| gopts | Shared options. |
| tid | Optional thread identifier override. |
- Returns
- Newly created event header.
Definition at line 105 of file gEventHeader.h.
◆ getG4LocalEvn()
| int GEventHeader::getG4LocalEvn |
( |
| ) |
const |
|
inline |
In typical Geant4-style usage, this value is run-local.
- Returns
- Local event number.
Definition at line 129 of file gEventHeader.h.
◆ getThreadID()
| int GEventHeader::getThreadID |
( |
| ) |
const |
|
inline |
◆ getTimeStamp()
| std::string GEventHeader::getTimeStamp |
( |
| ) |
const |
|
inline |
- Returns
- Timestamp assigned at construction.
Definition at line 119 of file gEventHeader.h.
The documentation for this class was generated from the following files: