1#ifndef DETDESCR_DETECTORIDINTERPRETER_H
2#define DETDESCR_DETECTORIDINTERPRETER_H
9#include "DetDescr/DetectorID.h"
10#include "DetDescr/IDField.h"
112 unsigned int equality,
158 unsigned int comparison_;
160 return (comparison_ & mask_) < (
id.comparison_ &
id.mask_);
164 static std::map<IDSignature, const SubdetectorIDFields*> g_rosettaStone;
Class provides an "introspection" capability for the 32-bit packed IDs used for uniquely identifying ...
static void loadStandardInterpreters()
Load the standard field interpreters if not yet loaded.
FieldValue getFieldValue(int i) const
Decode and return a field's value from the raw ID.
std::vector< FieldValue > FieldValueList
A list of field values.
const IDField::IDFieldList & getFieldList() const
Get the list of field information.
void unpack()
Unpack the current raw value into a list.
void pack()
Pack the current list of field values into a raw value.
const SubdetectorIDFields * p_fieldInfo_
Pointer to the appropriate field info for this class.
DetectorID getId() const
Get the raw value of the detector ID.
void setRawValue(DetectorID rawValue)
Set the raw value of the detector ID.
FieldValueList fieldValues_
The unpacked list of field values.
int getFieldCount() const
Get the list of field information.
const IDField * getField(const std::string &fieldName) const
Get the information for a field by name.
void init()
Reinitialize the ID in case the field list changed.
DetectorID id_
The raw, packed value of the ID.
void setFieldValue(int i, FieldValue value)
Set a field value by index in the field value list.
unsigned FieldValue
Definition of the field value type.
static void registerInterpreter(SubdetectorIDType idtype, const IDField::IDFieldList &fieldList)
Register a new field interpreter for a given subdetector id.
Defines a 32-bit packed ID for uniquely identifying hits and detector components.
Provides information about a field within a DetectorID.
std::map< std::string, IDField * > IDFieldMap
Map of name to field.
std::vector< IDField * > IDFieldList
List of fields.