gdata
Loading...
Searching...
No Matches
run_example.cc File Reference

Example demonstrating run-level integration of event data. More...

#include "run/gRunDataCollection.h"
#include "event/gEventDataCollection.h"
#include "glogger.h"
#include "gthreads.h"
#include <atomic>
#include <cstdlib>
#include <map>
#include <mutex>
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for run_example.cc:

Go to the source code of this file.

using PerDetectorDoubles = std::map<std::string, std::map<std::string, double>>
 Per-detector map of floating-point reference sums used by the example.
 
using PerDetectorInts = std::map<std::string, std::map<std::string, long long>>
 Per-detector map of integer-like reference sums used by the example.
 
int main (int argc, char *argv[])
 Entry point for the run-integration example.
 

Detailed Description

Summary:

  • generates multiple event containers
  • integrates them into one run summary
  • compares accumulated values against independently computed reference sums

Link to the example overview:

Definition in file run_example.cc.

Typedef Documentation

◆ PerDetectorDoubles

using PerDetectorDoubles = std::map<std::string, std::map<std::string, double>>

Outer key:

  • detector name

Inner key:

  • observable name

Value:

  • accumulated floating-point sum

Definition at line 118 of file run_example.cc.

◆ PerDetectorInts

using PerDetectorInts = std::map<std::string, std::map<std::string, long long>>

Integer observables are accumulated into long long values so the example can compare totals without depending on narrower integer types.

Definition at line 127 of file run_example.cc.

Function Documentation

◆ main()

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

The program:

  • builds the aggregated run-level option bundle
  • generates a small set of events
  • computes direct reference sums from those events
  • integrates the same events into a run container
  • validates the integrated result against the references
Parameters
argcArgument count forwarded to GOptions.
argvArgument vector forwarded to GOptions.
Returns
EXIT_SUCCESS on normal completion.

Definition at line 400 of file run_example.cc.