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

Conditions slice object. Defines which conditions should be loaded by the ConditionsManager. More...

#include <ConditionsSlice.h>

Inheritance diagram for dd4hep::cond::ConditionsSlice:
dd4hep::ConditionsMap

Classes

class  Inserter
 Helper to simplify the registration of new condtitions from arbitrary containers. More...
 

Public Types

enum  ManageFlag { REGISTER_MANAGER = 1<<0, REGISTER_POOL = 1<<1, REGISTER_FULL = REGISTER_MANAGER|REGISTER_POOL }
 
enum  LoadFlags { REF_POOLS = 1<<1 }
 
typedef Condition::key_type key_type
 
typedef std::vector< std::shared_ptr< ConditionsPool > > ContainedPools
 
- 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 }
 

Public Member Functions

 ConditionsSlice ()=delete
 Default constructor. More...
 
 ConditionsSlice (ConditionsManager m)
 Initializing constructor. More...
 
 ConditionsSlice (ConditionsManager m, const std::shared_ptr< ConditionsContent > &c)
 Initializing constructor. More...
 
 ConditionsSlice (const ConditionsSlice &copy)
 Copy constructor (Special, partial copy only. Hence no assignment!) More...
 
virtual ~ConditionsSlice ()
 Default destructor. More...
 
size_t size () const
 Total size of all conditions contained in the slice. More...
 
void refPools ()
 Set flag to reference the used pools during prepare. More...
 
void derefPools ()
 Set flag to not reference the used pools during prepare (and drop possibly pending) More...
 
const ConditionsContent::Conditionsconditions () const
 Access the map of conditions from the desired content. More...
 
const ConditionsContent::Dependenciesderived () const
 Access the map of computational conditions from the desired content. More...
 
ConditionsContent::ConditionsmissingConditions ()
 Access the map of missing conditions (only valid after preparation) More...
 
ConditionsContent::DependenciesmissingDerivations ()
 Access the map of missing computational conditions (only valid after preparation) More...
 
const IOViov () const
 Access the combined IOV of the slice from the pool. More...
 
void reset ()
 Clear the conditions content and the user pool. More...
 
template<typename T >
void manage (const T &conds, ManageFlag flg)
 Insert a set of conditions to the slice AND register them to the conditions manager. More...
 
virtual bool manage (Condition condition, ManageFlag flg)
 Insert a set of conditions to the slice AND register them to the conditions manager. More...
 
std::vector< Conditionget (DetElement detector) const
 Access all conditions from a given detector element. More...
 
virtual bool insert (DetElement detector, Condition::itemkey_type key, Condition condition) override
 ConditionsMap overload: Add a condition directly to the slice. More...
 
virtual Condition get (DetElement detector, Condition::itemkey_type key) const override
 ConditionsMap overload: Access a condition. More...
 
virtual std::vector< Conditionget (DetElement detector, Condition::itemkey_type lower, Condition::itemkey_type upper) const override
 No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper]. More...
 
virtual void scan (const Condition::Processor &processor) const override
 ConditionsMap overload: Interface to scan data content of the conditions mapping. More...
 
virtual void scan (DetElement detector, Condition::itemkey_type lower, Condition::itemkey_type upper, const Condition::Processor &processor) const override
 ConditionsMap overload: Interface to partially scan data content of the conditions mapping. More...
 
- Public Member Functions inherited from dd4hep::ConditionsMap
virtual ~ConditionsMap ()=default
 Standard destructor. More...
 

Public Attributes

ConditionsManager manager
 Reference to the conditions manager. More...
 
std::unique_ptr< UserPoolpool
 Reference to the user pool managing all conditions of this slice. More...
 
std::shared_ptr< ConditionsContentcontent
 Container of conditions required by this slice. More...
 
ConditionsManager::Result status
 Store the result of the prepare step. More...
 
ContainedPools used_pools
 If requested refence the used pools with a shared pointer to inhibit cleanup. More...
 
unsigned long flags = 0
 Flag to steer conditions management. More...
 

Protected Member Functions

ConditionsSliceoperator= (const ConditionsSlice &copy)=delete
 Default assignment operator. More...
 
virtual bool manage (ConditionsPool *pool, Condition condition, ManageFlag flg)
 Local optimization: Insert a set of conditions to the slice AND register them to the conditions manager. More...
 

Static Protected Member Functions

static Condition select_cond (Condition c)
 
template<typename T >
static Condition select_cond (const std::pair< T, Condition > &c)
 

Protected Attributes

ConditionsContent::Conditions m_missingConditions
 If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not loaded. More...
 
ConditionsContent::Dependencies m_missingDerivations
 If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not computed. More...
 

Detailed Description

Conditions slice object. Defines which conditions should be loaded by the ConditionsManager.

Object contains set of required conditions keys to be loaded to the user pool. It alkso contains the load information for the required conditions (conditions addresses). The address objects depend on the actual loader mechanism and must be specified the user. The information is then chained through the calls and made availible to the loader object.

On return it contains the individual condition load information.

Referenced by: ConditonsUserPool, ConditionsManager

Author
M.Frank
Version
1.0

Definition at line 53 of file ConditionsSlice.h.

Member Typedef Documentation

◆ ContainedPools

typedef std::vector<std::shared_ptr<ConditionsPool> > dd4hep::cond::ConditionsSlice::ContainedPools

Definition at line 56 of file ConditionsSlice.h.

◆ key_type

Definition at line 55 of file ConditionsSlice.h.

Member Enumeration Documentation

◆ LoadFlags

Enumerator
REF_POOLS 

Definition at line 63 of file ConditionsSlice.h.

◆ ManageFlag

Enumerator
REGISTER_MANAGER 
REGISTER_POOL 
REGISTER_FULL 

Definition at line 58 of file ConditionsSlice.h.

Constructor & Destructor Documentation

◆ ConditionsSlice() [1/4]

dd4hep::cond::ConditionsSlice::ConditionsSlice ( )
delete

Default constructor.

◆ ConditionsSlice() [2/4]

ConditionsSlice::ConditionsSlice ( ConditionsManager  m)

Initializing constructor.

Definition at line 23 of file ConditionsSlice.cpp.

◆ ConditionsSlice() [3/4]

ConditionsSlice::ConditionsSlice ( ConditionsManager  m,
const std::shared_ptr< ConditionsContent > &  c 
)

Initializing constructor.

Definition at line 29 of file ConditionsSlice.cpp.

◆ ConditionsSlice() [4/4]

ConditionsSlice::ConditionsSlice ( const ConditionsSlice copy)

Copy constructor (Special, partial copy only. Hence no assignment!)

Definition at line 37 of file ConditionsSlice.cpp.

◆ ~ConditionsSlice()

ConditionsSlice::~ConditionsSlice ( )
virtual

Default destructor.

Definition at line 44 of file ConditionsSlice.cpp.

Member Function Documentation

◆ conditions()

const ConditionsContent::Conditions& dd4hep::cond::ConditionsSlice::conditions ( ) const
inline

Access the map of conditions from the desired content.

Definition at line 153 of file ConditionsSlice.h.

◆ derefPools()

void ConditionsSlice::derefPools ( )

Set flag to not reference the used pools during prepare (and drop possibly pending)

Definition at line 50 of file ConditionsSlice.cpp.

◆ derived()

const ConditionsContent::Dependencies& dd4hep::cond::ConditionsSlice::derived ( ) const
inline

Access the map of computational conditions from the desired content.

Definition at line 155 of file ConditionsSlice.h.

◆ get() [1/3]

std::vector< dd4hep::Condition > ConditionsSlice::get ( DetElement  detector) const

Access all conditions from a given detector element.

Definition at line 108 of file ConditionsSlice.cpp.

◆ get() [2/3]

dd4hep::Condition ConditionsSlice::get ( DetElement  detector,
Condition::itemkey_type  key 
) const
overridevirtual

ConditionsMap overload: Access a condition.

Implements dd4hep::ConditionsMap.

Definition at line 142 of file ConditionsSlice.cpp.

◆ get() [3/3]

std::vector< dd4hep::Condition > ConditionsSlice::get ( DetElement  detector,
Condition::itemkey_type  lower,
Condition::itemkey_type  upper 
) const
overridevirtual

No ConditionsMap overload: Access all conditions within a key range in the interval [lower,upper].

Reimplemented from dd4hep::ConditionsMap.

Definition at line 113 of file ConditionsSlice.cpp.

◆ insert()

bool ConditionsSlice::insert ( DetElement  detector,
Condition::itemkey_type  key,
Condition  condition 
)
overridevirtual

ConditionsMap overload: Add a condition directly to the slice.

ConditionsMap interface implementation:

Implements dd4hep::ConditionsMap.

Definition at line 120 of file ConditionsSlice.cpp.

◆ iov()

const dd4hep::IOV & ConditionsSlice::iov ( ) const

Access the combined IOV of the slice from the pool.

Definition at line 56 of file ConditionsSlice.cpp.

◆ manage() [1/3]

bool ConditionsSlice::manage ( Condition  condition,
ManageFlag  flg 
)
virtual

Insert a set of conditions to the slice AND register them to the conditions manager.

Note: The conditions already require a valid hash key

Definition at line 102 of file ConditionsSlice.cpp.

◆ manage() [2/3]

bool ConditionsSlice::manage ( ConditionsPool pool,
Condition  condition,
ManageFlag  flg 
)
protectedvirtual

Local optimization: Insert a set of conditions to the slice AND register them to the conditions manager.

Note: The conditions already require a valid hash key

Definition at line 70 of file ConditionsSlice.cpp.

◆ manage() [3/3]

template<typename T >
void dd4hep::cond::ConditionsSlice::manage ( const T &  conds,
ManageFlag  flg 
)
inline

Insert a set of conditions to the slice AND register them to the conditions manager.

Note: The conditions already require a valid hash key

Definition at line 167 of file ConditionsSlice.h.

◆ missingConditions()

ConditionsContent::Conditions& dd4hep::cond::ConditionsSlice::missingConditions ( )
inline

Access the map of missing conditions (only valid after preparation)

Definition at line 157 of file ConditionsSlice.h.

◆ missingDerivations()

ConditionsContent::Dependencies& dd4hep::cond::ConditionsSlice::missingDerivations ( )
inline

Access the map of missing computational conditions (only valid after preparation)

Definition at line 159 of file ConditionsSlice.h.

◆ operator=()

ConditionsSlice& dd4hep::cond::ConditionsSlice::operator= ( const ConditionsSlice copy)
protecteddelete

Default assignment operator.

◆ refPools()

void dd4hep::cond::ConditionsSlice::refPools ( )
inline

Set flag to reference the used pools during prepare.

Definition at line 149 of file ConditionsSlice.h.

◆ reset()

void ConditionsSlice::reset ( )

Clear the conditions content and the user pool.

Clear the conditions access and the user pool.

Definition at line 64 of file ConditionsSlice.cpp.

◆ scan() [1/2]

void ConditionsSlice::scan ( const Condition::Processor processor) const
overridevirtual

ConditionsMap overload: Interface to scan data content of the conditions mapping.

Implements dd4hep::ConditionsMap.

Definition at line 147 of file ConditionsSlice.cpp.

◆ scan() [2/2]

void ConditionsSlice::scan ( DetElement  detector,
Condition::itemkey_type  lower,
Condition::itemkey_type  upper,
const Condition::Processor processor 
) const
overridevirtual

ConditionsMap overload: Interface to partially scan data content of the conditions mapping.

Reimplemented from dd4hep::ConditionsMap.

Definition at line 152 of file ConditionsSlice.cpp.

◆ select_cond() [1/2]

static Condition dd4hep::cond::ConditionsSlice::select_cond ( Condition  c)
inlinestaticprotected

Definition at line 131 of file ConditionsSlice.h.

◆ select_cond() [2/2]

template<typename T >
static Condition dd4hep::cond::ConditionsSlice::select_cond ( const std::pair< T, Condition > &  c)
inlinestaticprotected

Definition at line 133 of file ConditionsSlice.h.

◆ size()

size_t dd4hep::cond::ConditionsSlice::size ( ) const
inline

Total size of all conditions contained in the slice.

Definition at line 147 of file ConditionsSlice.h.

Member Data Documentation

◆ content

std::shared_ptr<ConditionsContent> dd4hep::cond::ConditionsSlice::content

Container of conditions required by this slice.

Definition at line 109 of file ConditionsSlice.h.

◆ flags

unsigned long dd4hep::cond::ConditionsSlice::flags = 0

Flag to steer conditions management.

Definition at line 116 of file ConditionsSlice.h.

◆ m_missingConditions

ConditionsContent::Conditions dd4hep::cond::ConditionsSlice::m_missingConditions
protected

If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not loaded.

Definition at line 120 of file ConditionsSlice.h.

◆ m_missingDerivations

ConditionsContent::Dependencies dd4hep::cond::ConditionsSlice::m_missingDerivations
protected

If flag conditonsManager["OutputUnloadedConditions"]=true: will contain conditions not computed.

Definition at line 122 of file ConditionsSlice.h.

◆ manager

ConditionsManager dd4hep::cond::ConditionsSlice::manager

Reference to the conditions manager.

Not used by the object, simple for convenience. Then all actors are lumped together, which are used by the client code.

Definition at line 105 of file ConditionsSlice.h.

◆ pool

std::unique_ptr<UserPool> dd4hep::cond::ConditionsSlice::pool

Reference to the user pool managing all conditions of this slice.

Definition at line 107 of file ConditionsSlice.h.

◆ status

ConditionsManager::Result dd4hep::cond::ConditionsSlice::status

Store the result of the prepare step.

Definition at line 112 of file ConditionsSlice.h.

◆ used_pools

ContainedPools dd4hep::cond::ConditionsSlice::used_pools

If requested refence the used pools with a shared pointer to inhibit cleanup.

Definition at line 114 of file ConditionsSlice.h.


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