DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members

Key definition to optimize ans simplyfy the access to conditions entities. More...

#include <Conditions.h>

Classes

struct  HashCompare
 Compare keys by the hash value. More...
 
union  KeyMaker
 Helper union to interprete conditions keys. More...
 

Public Member Functions

 ConditionKey ()=default
 Default constructor. More...
 
 ConditionKey (Condition::key_type key)
 Constructor from fully qualified key. More...
 
 ConditionKey (DetElement detector, const std::string &identifier)
 Constructor from string. More...
 
 ConditionKey (Condition::detkey_type det_key, const std::string &identifier)
 Constructor from detector element key and item sub-key. More...
 
 ConditionKey (DetElement detector, Condition::itemkey_type item_key)
 Constructor from detector element and item sub-key. More...
 
 ConditionKey (Condition::detkey_type det_key, Condition::itemkey_type item_key)
 Constructor from detector element key and item sub-key. More...
 
 ConditionKey (const ConditionKey &c)=default
 Copy constructor. More...
 
Condition::detkey_type detector_key () const
 Access the detector element part of the key. More...
 
Condition::itemkey_type item_key () const
 Access the detector element part of the key. More...
 
ConditionKeyoperator= (const ConditionKey &key)=default
 Assignment operator from object copy. More...
 
bool operator== (const ConditionKey &compare) const
 Equality operator using key object. More...
 
bool operator== (const Condition::key_type compare) const
 Equality operator using hash value. More...
 
bool operator< (const ConditionKey &compare) const
 Equality operator using the string representation. More...
 
bool operator< (const Condition::key_type compare) const
 Operator less (for map insertions) using hash value. More...
 
 operator Condition::key_type () const
 Automatic conversion to the hashed representation of the key object. More...
 
std::string toString () const
 Conversion to string. More...
 

Static Public Member Functions

static Condition::key_type hashCode (DetElement detector, const char *value)
 Hash code generation from input string. More...
 
static Condition::key_type hashCode (DetElement detector, const std::string &value)
 Hash code generation from input string. More...
 
static Condition::itemkey_type itemCode (const char *value)
 32 bit hashcode of the item More...
 
static Condition::itemkey_type itemCode (const std::string &value)
 32 bit hashcode of the item More...
 

Public Attributes

Condition::key_type hash = 0
 Hashed key representation. More...
 

Detailed Description

Key definition to optimize ans simplyfy the access to conditions entities.

Author
M.Frank
Version
1.0

Definition at line 280 of file Conditions.h.

Constructor & Destructor Documentation

◆ ConditionKey() [1/7]

dd4hep::ConditionKey::ConditionKey ( )
default

Default constructor.

◆ ConditionKey() [2/7]

dd4hep::ConditionKey::ConditionKey ( Condition::key_type  key)
inline

Constructor from fully qualified key.

Definition at line 338 of file Conditions.h.

◆ ConditionKey() [3/7]

ConditionKey::ConditionKey ( DetElement  detector,
const std::string &  identifier 
)

Constructor from string.

Definition at line 241 of file Conditions.cpp.

◆ ConditionKey() [4/7]

ConditionKey::ConditionKey ( Condition::detkey_type  det_key,
const std::string &  identifier 
)

Constructor from detector element key and item sub-key.

Definition at line 251 of file Conditions.cpp.

◆ ConditionKey() [5/7]

ConditionKey::ConditionKey ( DetElement  detector,
Condition::itemkey_type  item_key 
)

Constructor from detector element and item sub-key.

Constructor from detector element key and item sub-key.

Definition at line 263 of file Conditions.cpp.

◆ ConditionKey() [6/7]

dd4hep::ConditionKey::ConditionKey ( Condition::detkey_type  det_key,
Condition::itemkey_type  item_key 
)
inline

Constructor from detector element key and item sub-key.

Definition at line 387 of file Conditions.h.

◆ ConditionKey() [7/7]

dd4hep::ConditionKey::ConditionKey ( const ConditionKey c)
default

Copy constructor.

Member Function Documentation

◆ detector_key()

Condition::detkey_type dd4hep::ConditionKey::detector_key ( ) const
inline

Access the detector element part of the key.

Definition at line 351 of file Conditions.h.

◆ hashCode() [1/2]

Condition::key_type ConditionKey::hashCode ( DetElement  detector,
const char *  value 
)
static

Hash code generation from input string.

Definition at line 273 of file Conditions.cpp.

◆ hashCode() [2/2]

Condition::key_type ConditionKey::hashCode ( DetElement  detector,
const std::string &  value 
)
static

Hash code generation from input string.

Definition at line 280 of file Conditions.cpp.

◆ item_key()

Condition::itemkey_type dd4hep::ConditionKey::item_key ( ) const
inline

Access the detector element part of the key.

Definition at line 355 of file Conditions.h.

◆ itemCode() [1/2]

Condition::itemkey_type ConditionKey::itemCode ( const char *  value)
static

32 bit hashcode of the item

Definition at line 287 of file Conditions.cpp.

◆ itemCode() [2/2]

Condition::itemkey_type ConditionKey::itemCode ( const std::string &  value)
static

32 bit hashcode of the item

Definition at line 294 of file Conditions.cpp.

◆ operator Condition::key_type()

dd4hep::ConditionKey::operator Condition::key_type ( ) const
inline

Automatic conversion to the hashed representation of the key object.

Definition at line 381 of file Conditions.h.

◆ operator<() [1/2]

bool dd4hep::ConditionKey::operator< ( const Condition::key_type  compare) const
inline

Operator less (for map insertions) using hash value.

Definition at line 404 of file Conditions.h.

◆ operator<() [2/2]

bool dd4hep::ConditionKey::operator< ( const ConditionKey compare) const
inline

Equality operator using the string representation.

Operator less (for map insertions) using key object.

Operator less (for map insertions) using key object

Definition at line 400 of file Conditions.h.

◆ operator=()

ConditionKey& dd4hep::ConditionKey::operator= ( const ConditionKey key)
default

Assignment operator from object copy.

◆ operator==() [1/2]

bool dd4hep::ConditionKey::operator== ( const Condition::key_type  compare) const
inline

Equality operator using hash value.

Definition at line 396 of file Conditions.h.

◆ operator==() [2/2]

bool dd4hep::ConditionKey::operator== ( const ConditionKey compare) const
inline

Equality operator using key object.

Definition at line 392 of file Conditions.h.

◆ toString()

std::string ConditionKey::toString ( ) const

Conversion to string.

Definition at line 301 of file Conditions.cpp.

Member Data Documentation

◆ hash

Condition::key_type dd4hep::ConditionKey::hash = 0

Hashed key representation.

Definition at line 287 of file Conditions.h.


The documentation for this class was generated from the following files: