DD4hep  1.28.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Public Attributes | List of all members
dd4hep::cond::ConditionUpdateContext Class Referencefinal

ConditionUpdateContext class used by the derived conditions calculation mechanism. More...

#include <ConditionDerived.h>

Public Member Functions

 ConditionUpdateContext (ConditionResolver *r, const ConditionDependency *d, IOV *iov, ConditionUpdateUserContext *parameter)
 Initializing constructor. More...
 
void accessFailure (const ConditionKey &key_value) const
 Throw exception on conditions access failure. More...
 
DetectordetectorDescription () const
 Access to the detector description instance. More...
 
DetElement world () const
 Access to the top level detector element. More...
 
const IOVrequiredValidity () const
 Required IOV value for update cycle. More...
 
ConditionsMapconditionsMap () const
 Accessor for the current conditons mapping. More...
 
const ConditionKeykey (size_t which) const
 Access to dependency keys. More...
 
template<typename Q >
Q * param () const
 Access user parameter. More...
 
std::vector< Conditionconditions (DetElement det) const
 Access to all conditions of a detector element. More...
 
std::vector< Conditionconditions (Condition::detkey_type det_key) const
 Access to all conditions of a detector element key. More...
 
std::vector< ConditiongetByItem (Condition::itemkey_type key) const
 Access conditions by the condition item key. More...
 
Condition condition (const ConditionKey &key_value) const
 Access to condition object by dependency key. More...
 
Condition condition (Condition::key_type key_value) const
 Access to condition object by dependency key. More...
 
Condition condition (Condition::key_type key_value, bool throw_if_not) const
 Access to condition object by dependency key. More...
 
template<typename T >
T & get (const ConditionKey &key_value)
 Access of other conditions data from the resolver. More...
 
template<typename T >
const T & get (const ConditionKey &key_value) const
 Access of other conditions data from the resolver. More...
 
template<typename T >
T & get (Condition::key_type key_value)
 Access of other conditions data from the resolver. More...
 
template<typename T >
const T & get (Condition::key_type key_value) const
 Access of other conditions data from the resolver. More...
 
bool registerOne (const IOV &iov, Condition cond)
 Interface to handle multi-condition inserts by callbacks: One single insert. More...
 
size_t registerMany (const IOV &iov, const std::vector< Condition > &values)
 Handle multi-condition inserts by callbacks: block insertions of conditions with identical IOV. More...
 
template<typename CONT >
size_t registerUnmapped (const IOV &iov_val, CONT &values)
 Handle multi-condition inserts by callbacks with identical key. Handle unmapped containers. More...
 
template<typename CONT >
size_t registerMapping (const IOV &iov_val, CONT &values)
 Handle multi-condition inserts by callbacks with identical key. Handle mapped containers. More...
 

Public Attributes

ConditionResolverresolver
 Internal reference to the resolver to access other conditions (Be careful) More...
 
const ConditionDependencydependency
 The dependency to be handled within this context. More...
 
IOViov
 The reference to the combined IOV resulting from the cumputation. More...
 
ConditionUpdateUserContextparameter
 A refernce to the user parameter. More...
 

Detailed Description

ConditionUpdateContext class used by the derived conditions calculation mechanism.

This is the central object used by the functional callbacks to build derived conditions. All optionally necessary information can and must be accessed by this object.

Please node: 1) Be careful when resolving other conditions These calls are IN GENERAL ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong ! 2) Only accessing the conditions using the context ensure that the IOV of the resulting derived condition is correct. The conditions resolver does not affect the resulting IOV. 3) Though the access to the resolver under certain circumstances is useful, you should always be aware that to IOV intersection shall be wrong, since these accessed conditions are not taken into account.

Author
M.Frank
Version
1.0

Definition at line 136 of file ConditionDerived.h.

Constructor & Destructor Documentation

◆ ConditionUpdateContext()

dd4hep::cond::ConditionUpdateContext::ConditionUpdateContext ( ConditionResolver r,
const ConditionDependency d,
IOV iov,
ConditionUpdateUserContext parameter 
)
inline

Initializing constructor.

Definition at line 385 of file ConditionDerived.h.

Member Function Documentation

◆ accessFailure()

void ConditionUpdateContext::accessFailure ( const ConditionKey key_value) const

Throw exception on conditions access failure.

Definition at line 119 of file ConditionDerived.cpp.

◆ condition() [1/3]

Condition ConditionUpdateContext::condition ( Condition::key_type  key_value) const

Access to condition object by dependency key.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Update result IOV according by and'ing the new iov structure

Definition at line 69 of file ConditionDerived.cpp.

◆ condition() [2/3]

Condition ConditionUpdateContext::condition ( Condition::key_type  key_value,
bool  throw_if_not 
) const

Access to condition object by dependency key.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Update result IOV according by and'ing the new iov structure

Definition at line 80 of file ConditionDerived.cpp.

◆ condition() [3/3]

Condition ConditionUpdateContext::condition ( const ConditionKey key_value) const

Access to condition object by dependency key.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Update result IOV according by and'ing the new iov structure

Definition at line 51 of file ConditionDerived.cpp.

◆ conditions() [1/2]

std::vector< Condition > ConditionUpdateContext::conditions ( Condition::detkey_type  det_key) const

Access to all conditions of a detector element key.

Access to all conditions of a detector element. Careful: This limits the validity!

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Update result IOV according by and'ing the new iov structure

Definition at line 35 of file ConditionDerived.cpp.

◆ conditions() [2/2]

std::vector<Condition> dd4hep::cond::ConditionUpdateContext::conditions ( DetElement  det) const
inline

Access to all conditions of a detector element.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Definition at line 188 of file ConditionDerived.h.

◆ conditionsMap()

ConditionsMap& dd4hep::cond::ConditionUpdateContext::conditionsMap ( ) const
inline

Accessor for the current conditons mapping.

Definition at line 171 of file ConditionDerived.h.

◆ detectorDescription()

Detector& dd4hep::cond::ConditionUpdateContext::detectorDescription ( ) const
inline

Access to the detector description instance.

Definition at line 158 of file ConditionDerived.h.

◆ get() [1/4]

template<typename T >
T & dd4hep::cond::ConditionUpdateContext::get ( Condition::key_type  key_value)
inline

Access of other conditions data from the resolver.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Definition at line 423 of file ConditionDerived.h.

◆ get() [2/4]

template<typename T >
const T & dd4hep::cond::ConditionUpdateContext::get ( Condition::key_type  key_value) const
inline

Access of other conditions data from the resolver.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Definition at line 429 of file ConditionDerived.h.

◆ get() [3/4]

template<typename T >
T & dd4hep::cond::ConditionUpdateContext::get ( const ConditionKey key_value)
inline

Access of other conditions data from the resolver.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

return already bound data to wanted type

Definition at line 401 of file ConditionDerived.h.

◆ get() [4/4]

template<typename T >
const T & dd4hep::cond::ConditionUpdateContext::get ( const ConditionKey key_value) const
inline

Access of other conditions data from the resolver.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

return already bound data to wanted type

Definition at line 412 of file ConditionDerived.h.

◆ getByItem()

std::vector< Condition > ConditionUpdateContext::getByItem ( Condition::itemkey_type  key) const

Access conditions by the condition item key.

Careful: This limits the validity! ONLY VALID AT RESOLVE ! Otherwise the resulting IOV shall be wrong !

Update result IOV according by and'ing the new iov structure

Definition at line 43 of file ConditionDerived.cpp.

◆ key()

const ConditionKey & dd4hep::cond::ConditionUpdateContext::key ( size_t  which) const
inline

Access to dependency keys.

Definition at line 395 of file ConditionDerived.h.

◆ param()

template<typename Q >
Q* dd4hep::cond::ConditionUpdateContext::param ( ) const
inline

Access user parameter.

Definition at line 179 of file ConditionDerived.h.

◆ registerMany()

size_t ConditionUpdateContext::registerMany ( const IOV iov,
const std::vector< Condition > &  values 
)

Handle multi-condition inserts by callbacks: block insertions of conditions with identical IOV.

Definition at line 100 of file ConditionDerived.cpp.

◆ registerMapping()

template<typename CONT >
size_t dd4hep::cond::ConditionUpdateContext::registerMapping ( const IOV iov_val,
CONT &  values 
)
inline

Handle multi-condition inserts by callbacks with identical key. Handle mapped containers.

Definition at line 269 of file ConditionDerived.h.

◆ registerOne()

bool ConditionUpdateContext::registerOne ( const IOV iov,
Condition  cond 
)

Interface to handle multi-condition inserts by callbacks: One single insert.

Note: block insertions are nearly ALWAYS preferred!!!

Definition at line 95 of file ConditionDerived.cpp.

◆ registerUnmapped()

template<typename CONT >
size_t dd4hep::cond::ConditionUpdateContext::registerUnmapped ( const IOV iov_val,
CONT &  values 
)
inline

Handle multi-condition inserts by callbacks with identical key. Handle unmapped containers.

Definition at line 262 of file ConditionDerived.h.

◆ requiredValidity()

const IOV& dd4hep::cond::ConditionUpdateContext::requiredValidity ( ) const
inline

Required IOV value for update cycle.

Definition at line 166 of file ConditionDerived.h.

◆ world()

DetElement ConditionUpdateContext::world ( ) const

Access to the top level detector element.

Definition at line 30 of file ConditionDerived.cpp.

Member Data Documentation

◆ dependency

const ConditionDependency* dd4hep::cond::ConditionUpdateContext::dependency

The dependency to be handled within this context.

Definition at line 141 of file ConditionDerived.h.

◆ iov

IOV* dd4hep::cond::ConditionUpdateContext::iov

The reference to the combined IOV resulting from the cumputation.

Definition at line 143 of file ConditionDerived.h.

◆ parameter

ConditionUpdateUserContext* dd4hep::cond::ConditionUpdateContext::parameter

A refernce to the user parameter.

Definition at line 145 of file ConditionDerived.h.

◆ resolver

ConditionResolver* dd4hep::cond::ConditionUpdateContext::resolver

Internal reference to the resolver to access other conditions (Be careful)

Definition at line 139 of file ConditionDerived.h.


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