|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
13 #ifndef DD4HEP_IDDESCRIPTOR_H
14 #define DD4HEP_IDDESCRIPTOR_H
28 class IDDescriptorObject;
40 typedef std::vector<std::pair<std::string, const Field*> >
FieldMap;
41 typedef std::vector<std::pair<size_t, std::string> >
FieldIDs;
61 size_t fieldID(
const std::string& field_name)
const;
72 VolumeID get_mask(
const std::vector<std::pair<std::string, int> >& id_vector)
const;
85 void rebuild(
const std::string& description);
88 #endif // DD4HEP_IDDESCRIPTOR_H
void decodeFields(VolumeID vid, std::vector< std::pair< const BitFieldElement *, VolumeID > > &fields) const
Decode volume IDs and return filled descriptor with all fields.
size_t fieldID(const std::string &field_name) const
Get the field identifier of one field by name.
Concrete object implementation of the IDDescriptorObject Handle.
Helper class for BitFieldCoder that corresponds to one field value.
std::vector< std::pair< std::string, const Field * > > FieldMap
const BitFieldElement * field(const std::string &field_name) const
Get the field descriptor of one field by name.
Helper class for decoding and encoding a bit field of 64bits for convenient declaration.
unsigned maxBit() const
The total number of encoding bits for this descriptor.
Class implementing the ID encoding of the detector response.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
const char * name() const
Access the object name (or "" if not supported by the object)
IDDescriptor()=default
Default constructor.
static VolumeID encode(const Field *fld, VolumeID value)
Encode partial volume identifiers to a volumeID.
std::vector< std::pair< size_t, std::string > > FieldIDs
std::string str(VolumeID vid) const
Decode volume IDs and return string reprensentation for debugging purposes.
VolumeID get_mask(const std::vector< std::pair< std::string, int > > &id_vector) const
Compute the submask for a given set of volume IDs.
const FieldMap & fields() const
Access the fieldmap container.
dd4hep::DDSegmentation::VolumeID VolumeID
std::string fieldDescription() const
The string description of all fields from the BitField.
void rebuild(const std::string &description)
Re-build object in place.
Namespace for the AIDA detector description toolkit.
BitFieldCoder * decoder() const
Access the BitFieldCoder object.
VolumeID encode_reverse(const std::vector< std::pair< std::string, int > > &id_vector) const
Encode a set of volume identifiers to a volumeID with the system ID on the top bits.
std::string toString() const
Access string representation.
IDDescriptor(const Handle< Q > &e)
Constructor to be used when reading the already parsed object.
const FieldIDs & ids() const
Access the field-id container.