DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
dd4hep::align::AlignmentsCalib Class Reference

Calib alignment dependencies from conditions. More...

#include <AlignmentsCalib.h>

Classes

class  Entry
 Helper class to store information about alignment calibration items. More...
 

Public Types

typedef std::map< Condition::key_type, Entry * > UsedConditions
 Shortcut definitions. More...
 

Public Member Functions

 AlignmentsCalib ()=delete
 No default constructor. More...
 
 AlignmentsCalib (const AlignmentsCalib &copy)=delete
 No copy constructor. More...
 
 AlignmentsCalib (Detector &description, ConditionsMap &mapping)
 Initializing constructor. More...
 
virtual ~AlignmentsCalib () noexcept(false)
 Default destructor. More...
 
AlignmentsCaliboperator= (const AlignmentsCalib &copy)=delete
 No assignment operator. More...
 
AlignmentsCaliboperator= (AlignmentsCalib &&copy)=delete
 No move assignment operator. More...
 
Condition::key_type set (DetElement det, const Delta &delta)
 (1) Add a new entry to an existing DetElement structure. More...
 
Condition::key_type set (const std::string &path, const Delta &delta)
 (2) Add a new entry to an existing DetElement structure. More...
 
void clearDeltas ()
 Clear all delta data in the caches transaction stack. More...
 
void clear () noexcept(false)
 We clear the entire cached stack of used entries. More...
 
DetElement detector (const std::string &path) const
 Convenience only: Access detector element by path. More...
 
AlignmentsCalculator::Result commit ()
 Commit all pending transactions. Returns number of altered entries. More...
 

Public Attributes

Detectordescription
 Reference to the detector description object. More...
 
ConditionsMapslice
 Reference to the alignment manager object. More...
 
UsedConditions used
 Internal work stack of cached deltas. More...
 

Protected Member Functions

std::pair< Condition::key_type, Entry * > _set (DetElement det, const Delta &delta)
 Implementation: Add a new entry to the transaction stack. More...
 

Detailed Description

Calib alignment dependencies from conditions.

Author
M.Frank
Version
1.0
Date
31/01/2017

Definition at line 41 of file AlignmentsCalib.h.

Member Typedef Documentation

◆ UsedConditions

Shortcut definitions.

Definition at line 53 of file AlignmentsCalib.h.

Constructor & Destructor Documentation

◆ AlignmentsCalib() [1/3]

dd4hep::align::AlignmentsCalib::AlignmentsCalib ( )
delete

No default constructor.

◆ AlignmentsCalib() [2/3]

dd4hep::align::AlignmentsCalib::AlignmentsCalib ( const AlignmentsCalib copy)
delete

No copy constructor.

◆ AlignmentsCalib() [3/3]

AlignmentsCalib::AlignmentsCalib ( Detector description,
ConditionsMap mapping 
)

Initializing constructor.

Definition at line 46 of file AlignmentsCalib.cpp.

◆ ~AlignmentsCalib()

AlignmentsCalib::~AlignmentsCalib ( )
virtualnoexcept

Default destructor.

Definition at line 52 of file AlignmentsCalib.cpp.

Member Function Documentation

◆ _set()

std::pair< dd4hep::Condition::key_type, AlignmentsCalib::Entry * > AlignmentsCalib::_set ( DetElement  det,
const Delta delta 
)
protected

Implementation: Add a new entry to the transaction stack.

Now check again if we succeeded.

Definition at line 64 of file AlignmentsCalib.cpp.

◆ clear()

void AlignmentsCalib::clear ( )
noexcept

We clear the entire cached stack of used entries.

Clear all pending entries in the working cache.

Definition at line 125 of file AlignmentsCalib.cpp.

◆ clearDeltas()

void AlignmentsCalib::clearDeltas ( )

Clear all delta data in the caches transaction stack.

Definition at line 115 of file AlignmentsCalib.cpp.

◆ commit()

AlignmentsCalculator::Result AlignmentsCalib::commit ( )

Commit all pending transactions. Returns number of altered entries.

Propagate the Delta values to the source conditions

Update the source condition with the new delta value

Definition at line 134 of file AlignmentsCalib.cpp.

◆ detector()

dd4hep::DetElement AlignmentsCalib::detector ( const std::string &  path) const

Convenience only: Access detector element by path.

Definition at line 57 of file AlignmentsCalib.cpp.

◆ operator=() [1/2]

AlignmentsCalib& dd4hep::align::AlignmentsCalib::operator= ( AlignmentsCalib &&  copy)
delete

No move assignment operator.

◆ operator=() [2/2]

AlignmentsCalib& dd4hep::align::AlignmentsCalib::operator= ( const AlignmentsCalib copy)
delete

No assignment operator.

◆ set() [1/2]

dd4hep::Condition::key_type AlignmentsCalib::set ( const std::string &  path,
const Delta delta 
)

(2) Add a new entry to an existing DetElement structure.

Note: has no effect on the real alignment conditions as long as the callbacks are not executed, which is triggered by the "commit" call. The delta is only cached locally.

The alignment key is returned to the client. If NULL: Failure

Definition at line 110 of file AlignmentsCalib.cpp.

◆ set() [2/2]

dd4hep::Condition::key_type AlignmentsCalib::set ( DetElement  det,
const Delta delta 
)

(1) Add a new entry to an existing DetElement structure.

This call does several actions:

A check is performed if the alignment with this identifier already exists: if YES, continue with use(Alignment alignment). If NO, then: 1) a Condition object is added using the given 'name'. This condition is added to the ConditionsManager's repository and the ConditionsSlice. 'name' MUST denote a unique conditions identifier. 1.1) A conditions key with the id 'name' is added to the DetElement's conditions container.

Note: has no effect on the real alignment conditions as long as the callbacks are not executed, which is triggered by the "commit" call. The delta is only cached locally.

The resulting alignment key is returned to the client. If NULL: Failure

Definition at line 104 of file AlignmentsCalib.cpp.

Member Data Documentation

◆ description

Detector& dd4hep::align::AlignmentsCalib::description

Reference to the detector description object.

Definition at line 57 of file AlignmentsCalib.h.

◆ slice

ConditionsMap& dd4hep::align::AlignmentsCalib::slice

Reference to the alignment manager object.

Definition at line 59 of file AlignmentsCalib.h.

◆ used

UsedConditions dd4hep::align::AlignmentsCalib::used

Internal work stack of cached deltas.

Definition at line 61 of file AlignmentsCalib.h.


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