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

Shared constants and error codes for the GData library. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

constexpr int TIMEATELECTRONICSNOTDEFINED = -123456
 Sentinel value returned when TIMEATELECTRONICS is requested but not present.
 
Error / exit codes

Numeric error codes used by GData components for consistent reporting.

These codes are intended to be stable across releases so that scripts, wrappers, and downstream applications can classify failures without parsing log strings.

constexpr int ERR_GSDETECTORNOTFOUND = 601
 Requested sensitive detector is missing from a collection/map.
 
constexpr int ERR_VARIABLENOTFOUND = 602
 Requested observable key is missing from an observables map.
 
constexpr int ERR_WRONGPAYLOAD = 603
 A payload vector has the wrong size/shape for the expected format.
 
Streaming / readout identifiers (SRO keys)

Conventional keys used to label electronics readout coordinates and timing.

"SRO" (streaming readout) keys are treated specially by some APIs.

For example, getIntObservablesMap() and getDblObservablesMap() accept a which argument that allows:

  • selecting only SRO keys (crate/slot/channel/time/charge)
  • selecting only non-SRO keys (physics-like digitized observables)

This enables output backends to store readout addressing separately from digitization results.

constexpr const char * CRATESTRINGID = "crate"
 Electronics crate index.
 
constexpr const char * SLOTSTRINGID = "slot"
 Slot index within a crate (module position).
 
constexpr const char * CHANNELSTRINGID = "channel"
 Channel index within a slot/module.
 
constexpr const char * CHARGEATELECTRONICS = "chargeAtElectronics"
 Charge (or ADC-integrated proxy) at electronics stage.
 
constexpr const char * TIMEATELECTRONICS = "timeAtElectronics"
 Time (or TDC proxy) at electronics stage.
 

Detailed Description

The GData library stores and transports observables using string keys (e.g. "adc", "tdc", "crate", "slot", ...). This header centralizes commonly used identifiers to:

  • prevent spelling drift across modules
  • allow deterministic filtering/export behavior
  • provide stable, documented keys for plugins and backends

It also defines numeric error codes used with GLogger::error "error()" so that higher-level tooling can interpret failure modes in a stable way.

Design intent:

  • These constants represent part of the "public schema contract" between producers and consumers.
  • Changing a key string can break downstream analysis/export unless migration is handled explicitly.

Definition in file gdataConventions.h.

Variable Documentation

◆ CHANNELSTRINGID

constexpr const char* CHANNELSTRINGID = "channel"
constexpr

Definition at line 54 of file gdataConventions.h.

◆ CHARGEATELECTRONICS

constexpr const char* CHARGEATELECTRONICS = "chargeAtElectronics"
constexpr

Definition at line 55 of file gdataConventions.h.

◆ CRATESTRINGID

constexpr const char* CRATESTRINGID = "crate"
constexpr

Definition at line 52 of file gdataConventions.h.

◆ ERR_GSDETECTORNOTFOUND

constexpr int ERR_GSDETECTORNOTFOUND = 601
constexpr

Definition at line 31 of file gdataConventions.h.

◆ ERR_VARIABLENOTFOUND

constexpr int ERR_VARIABLENOTFOUND = 602
constexpr

Definition at line 32 of file gdataConventions.h.

◆ ERR_WRONGPAYLOAD

constexpr int ERR_WRONGPAYLOAD = 603
constexpr

Definition at line 33 of file gdataConventions.h.

◆ SLOTSTRINGID

constexpr const char* SLOTSTRINGID = "slot"
constexpr

Definition at line 53 of file gdataConventions.h.

◆ TIMEATELECTRONICS

constexpr const char* TIMEATELECTRONICS = "timeAtElectronics"
constexpr

Definition at line 57 of file gdataConventions.h.

◆ TIMEATELECTRONICSNOTDEFINED

constexpr int TIMEATELECTRONICSNOTDEFINED = -123456
constexpr

This is intentionally an "unlikely" value to help catch missing-data bugs quickly. Used by getTimeAtElectronics().

Definition at line 67 of file gdataConventions.h.