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

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

Functions

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

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 (event-level semantics). 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 per hit)
- vector<unique_ptr<GDigitizedData>> (one per hit)
Per-sensitive-detector container that owns true and digitized hit data.

What this example demonstrates

Threading model

The example uses a simple work-distribution pattern:

Note
create() and the test factories create() and create() use internal thread-safe counters, so concurrent execution is supported for this example-style workload.

Usage

Build this example together with the GData library components and required GEMC utilities (logging, options, threads abstraction). Then run it to print a readable dump of each generated event container.

Author

© Maurizio Ungaro
e-mail: ungar.nosp@m.o@jl.nosp@m.ab.or.nosp@m.g

Function Documentation

◆ main()

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

Definition at line 311 of file event_example.cc.