gtouchable
Loading...
Searching...
No Matches
GIdentifier Struct Reference

A single (name,value) identifier element used to build a touchable identity vector. More...

#include <gtouchable.h>

Public Member Functions

 GIdentifier (const std::string &n, int v)
 Constructs a GIdentifier.
 
bool operator== (const GIdentifier &gid) const
 Compares identifiers by value only.
 
std::string getName () const
 Returns the identifier name.
 
int getValue () const
 Returns the identifier value.
 

Friends

std::ostream & operator<< (std::ostream &stream, const GIdentifier &gidentifier)
 Stream output helper used in logs and diagnostics.
 

Detailed Description

A GTouchable identity is an ordered vector of these identifiers, typically created by parsing a user-facing identity string, e.g. "sector: 2, layer: 4, wire: 33".

Important:

  • Equality compares only the numeric value, because identity structures are assumed to match positionally (same detector sensitivity implies the same identifier schema/order).

Definition at line 77 of file gtouchable.h.

Constructor & Destructor Documentation

◆ GIdentifier()

GIdentifier::GIdentifier ( const std::string & n,
int v )
inline
Parameters
nIdentifier name (e.g. "sector").
vIdentifier value (e.g. 2).

Definition at line 86 of file gtouchable.h.

Member Function Documentation

◆ getName()

std::string GIdentifier::getName ( ) const
inline
Returns
The identifier name.

Definition at line 103 of file gtouchable.h.

◆ getValue()

int GIdentifier::getValue ( ) const
inline
Returns
The identifier value.

Definition at line 109 of file gtouchable.h.

◆ operator==()

bool GIdentifier::operator== ( const GIdentifier & gid) const
inline

This is used during GTouchable comparisons, where the identifier schema is expected to match.

Parameters
gidThe identifier to compare with.
Returns
True if the numeric values match.

Definition at line 97 of file gtouchable.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const GIdentifier & gidentifier )
friend

Definition at line 166 of file gtouchable.cc.


The documentation for this struct was generated from the following file: