gdata
Loading...
Searching...
No Matches
gEventHeader.h File Reference

Defines GEventHeader metadata for an event data collection. More...

#include "gbase.h"
#include <atomic>
#include <string>
Include dependency graph for gEventHeader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  GEventHeader
 Minimal event metadata header: event number, thread id, and timestamp. More...
 

Namespaces

namespace  geventheader
 

Functions

GOptions geventheader::defineOptions ()
 Defines GOptions for the event-header logger domain.
 

Variables

constexpr const char * GDATAEVENTHEADER_LOGGER = "event_header"
 

Detailed Description

The event header records:

  • a local event number (g4localEventNumber)
  • a thread identifier (threadID)
  • a timestamp string (timeStamp)

In production GEMC/Geant4, event number and thread ID would typically come from Geant4 (e.g. G4Event and G4Threading). In this library, create() provides a deterministic generator for examples and tests.

Timestamp behavior:

  • Time stamp is generated using local system time at construction.
Note
Threading The factory create() uses an atomic counter so that concurrent calls from multiple threads produce unique event numbers in examples/tests.

Definition in file gEventHeader.h.

Variable Documentation

◆ GDATAEVENTHEADER_LOGGER

constexpr const char* GDATAEVENTHEADER_LOGGER = "event_header"
constexpr

Definition at line 32 of file gEventHeader.h.