public interface IIdentifierHelper
IIdentifierDictionary
that specifies the fields for a 64-bit
IIdentifier
.
The {pack(IExpandedIdentifier)
method is used to turn an IExpandedIdentifier
of field values into a
compact, or packed, identifier.
The unpack(IIdentifier)
method does the reverse, taking a packed IIdentifier
and turning into a list
of field values.
The #getValue(IIdentifier compact, IIdentifierField desc )
method is used to unpack a single field value.
There are similar, overloaded methods for using an index in the dictionary or a field label to retrieve a single
field value.org.lcsim.detector.identifier
,
IIdentifier
,
IExpandedIdentifier
,
IIdentifierDictionary
Modifier and Type | Method and Description |
---|---|
IExpandedIdentifier |
createExpandedIdentifier() |
int |
getFieldIndex(String fieldName)
|
IIdentifierDictionary |
getIdentifierDictionary()
Get the
IIdentifierDictionary associated with this helper. |
int |
getValue(IIdentifier compact,
int field)
Get a single field value by index.
|
int |
getValue(IIdentifier compact,
String field)
Get a single field value by name.
|
boolean |
hasField(String fieldName)
Pushed up from
IIdentifierDictionary.hasField(String) . |
IIdentifier |
pack(IExpandedIdentifier id)
Pack an
IExpandedIdentifier into a compact IIdentifier . |
IExpandedIdentifier |
unpack(IIdentifier id)
Upack the
IIdentifier into an IExpandedIdentifier containing the field values in a list. |
IIdentifierDictionary getIdentifierDictionary()
IIdentifierDictionary
associated with this helper.IIdentifier pack(IExpandedIdentifier id)
IExpandedIdentifier
into a compact IIdentifier
.id
- The ExpandedIdentifier to be packed.IExpandedIdentifier unpack(IIdentifier id)
IIdentifier
into an IExpandedIdentifier
containing the field values in a list.id
- The Identifier.int getValue(IIdentifier compact, int field)
compact
- The compact Identifier.field
- The field index in the dictionary.int getValue(IIdentifier compact, String field)
compact
- The compact Identifier.field
- The field index in the dictionary.boolean hasField(String fieldName)
IIdentifierDictionary.hasField(String)
.fieldName
- The field name.fieldName
; False if not.int getFieldIndex(String fieldName)
fieldName
- FieldNotFoundException
IExpandedIdentifier createExpandedIdentifier()
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.