gdata
Loading...
Searching...
No Matches
Event data collection example

Event-level construction and inspection of per-detector hit data. More...

int main (int argc, char *argv[])
 Entry point for the event example.
 

Detailed Description

This example emulates a simplified event loop where each event produces hit data for one or more sensitive detectors and stores them into a GEventDataCollection.

The GEventDataCollection owns per-hit objects. For each hit, two complementary views may be produced and stored:

For each event, data are organized as:

sdName -> GDataCollection
- vector<unique_ptr<GTrueInfoData>> one entry per stored truth hit
- vector<unique_ptr<GDigitizedData>> one entry per stored digitized hit
Per-sensitive-detector container that owns truth and digitized data objects.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

The program:

  • constructs the option bundle for event-level data containers
  • creates a logger
  • generates a small set of example events in parallel
  • validates each event structure
  • prints a readable dump of each event

The event count is intentionally small so the output remains easy to inspect manually.

Parameters
argcArgument count forwarded to GOptions.
argvArgument vector forwarded to GOptions.
Returns
EXIT_SUCCESS on normal completion.

Definition at line 343 of file event_example.cc.