DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
An implementation of the ConditionsMap interface to fall back to nominal alignment. More...
#include <AlignmentsNominalMap.h>
Public Member Functions | |
AlignmentsNominalMap (DetElement wrld) | |
Standard constructor. More... | |
virtual | ~AlignmentsNominalMap ()=default |
Standard destructor. More... | |
virtual bool | insert (DetElement detector, Condition::itemkey_type key, Condition condition) override |
Insert a new entry to the map. The detector element key and the item key make a unique global alignments key. More... | |
virtual Condition | get (DetElement detector, Condition::itemkey_type key) const override |
Interface to access alignments by hash value. The detector element key and the item key make a unique global alignments key. More... | |
virtual void | scan (const Condition::Processor &processor) const override |
Interface to scan data content of the alignments mapping. More... | |
virtual std::vector< Condition > | get (DetElement detector, Condition::itemkey_type lower, Condition::itemkey_type upper) const override |
No AlignmentsMap overload: Access all alignments within a key range in the interval [lower,upper]. More... | |
virtual void | scan (DetElement detector, Condition::itemkey_type lower, Condition::itemkey_type upper, const Condition::Processor &processor) const override |
Interface to partially scan data content of the alignments mapping. More... | |
Public Member Functions inherited from dd4hep::ConditionsMap | |
virtual | ~ConditionsMap ()=default |
Standard destructor. More... | |
Public Attributes | |
DetElement | world |
Reference to the top detector element. More... | |
std::map< Condition::key_type, Condition > | data |
Potential cache of real conditions. More... | |
Additional Inherited Members | |
Public Types inherited from dd4hep::ConditionsMap | |
enum | { FIRST_ITEM = Condition::FIRST_ITEM_KEY, LAST_ITEM = Condition::LAST_ITEM_KEY } |
enum | { FIRST_KEY = Condition::FIRST_KEY, LAST_KEY = Condition::LAST_KEY } |
An implementation of the ConditionsMap interface to fall back to nominal alignment.
The AlignmentsNominalMap is not a conditions cache per se. This implementation behaves like a conditionsmap, but it shall not return real conditions to the user, but rather return the default alignment objects (which at the basis are conditions as well) to the user. These alignments are taken from the DetElement in question Alignment DetElement::nominal().
The basic idea is to enable users to write code "as if" there would be conditions present. This is important to ease in the lifetime of the experiment the step from the design phase (where obviously no conditions are taken into account) to a more mature phase, where alignment studies etc. actually are part of the "bread and butter work".
See dd4hep/ConditionsMap.h for further information.
Definition at line 44 of file AlignmentsNominalMap.h.
AlignmentsNominalMap::AlignmentsNominalMap | ( | DetElement | wrld | ) |
Standard constructor.
Definition at line 25 of file AlignmentNominalMap.cpp.
|
virtualdefault |
Standard destructor.
|
overridevirtual |
Interface to access alignments by hash value. The detector element key and the item key make a unique global alignments key.
Interface to access conditions by hash value.
Implements dd4hep::ConditionsMap.
Definition at line 37 of file AlignmentNominalMap.cpp.
|
inlineoverridevirtual |
No AlignmentsMap overload: Access all alignments within a key range in the interval [lower,upper].
Partial implementations for utilities accessing DetElement alignments
Note: This default implementation uses std::vector<Condition> get(DetElement detector, itemkey_type lower, itemkey_type upper) The performance depends on the concrete implementation of the scan method!
Reimplemented from dd4hep::ConditionsMap.
Definition at line 72 of file AlignmentsNominalMap.h.
|
overridevirtual |
Insert a new entry to the map. The detector element key and the item key make a unique global alignments key.
Insert a new entry to the map.
Implements dd4hep::ConditionsMap.
Definition at line 29 of file AlignmentNominalMap.cpp.
|
overridevirtual |
Interface to scan data content of the alignments mapping.
Interface to scan data content of the conditions mapping.
Helper to implement partial scans.
Constructor
Conditions callback for object processing
Implements dd4hep::ConditionsMap.
Definition at line 49 of file AlignmentNominalMap.cpp.
|
overridevirtual |
Interface to partially scan data content of the alignments mapping.
Interface to partially scan data content of the conditions mapping.
Note: This default implementation assumes unordered containers and hence is not the most efficient implementation! Internaly it uses "scan(Processor& processor)" the subselection hence is linearly depending of the number of elements.
Using ordered maps with "lower_bound(key)" this can be greatly improved. See the concrete implementations below.
Reimplemented from dd4hep::ConditionsMap.
Definition at line 82 of file AlignmentNominalMap.cpp.
std::map<Condition::key_type,Condition> dd4hep::AlignmentsNominalMap::data |
Potential cache of real conditions.
Definition at line 49 of file AlignmentsNominalMap.h.
DetElement dd4hep::AlignmentsNominalMap::world |
Reference to the top detector element.
Definition at line 47 of file AlignmentsNominalMap.h.