ATLAS Offline Software
Loading...
Searching...
No Matches
TRTCond::MultChanContainer< DaughterContainer > Class Template Reference

Class for accessing NestedContainers via channels in a CondMultChanCollection. More...

#include <MultChanContainer.h>

Inheritance diagram for TRTCond::MultChanContainer< DaughterContainer >:
Collaboration diagram for TRTCond::MultChanContainer< DaughterContainer >:

Public Types

typedef std::pair< const DaughterContainer *, const typename DaughterContainer::value_type * > ContainerWithValue
 get a value with the corresponding container.
typedef unsigned int ChanNum
typedef std::vector< ChanNumChanVec
typedef std::vector< IOVRangeIOVVec
typedef ChanVec::const_iterator chan_const_iterator
typedef ChanVec::iterator chan_iterator
typedef ChanVec::size_type chan_size_type
typedef IOVVec::const_iterator iov_const_iterator
typedef IOVVec::iterator iov_iterator
typedef IOVVec::size_type iov_size_type
typedef BASE DataVector_BASE
typedef BASE DVL_BASE
typedef BASE::PtrVector PtrVector
 This is the type of the underlying std::vector (what stdcont returns).
typedef BASE::PtrVector BaseContainer
typedef DaughterContainer *& reference
typedef DaughterContainer *const & const_reference
typedef BASE::size_type size_type
typedef BASE::difference_type difference_type
typedef DaughterContainer * value_type
typedef BASE::allocator_type allocator_type
typedef DaughterContainer ** pointer
typedef DaughterContainer *const * const_pointer
typedef const DaughterContainer * const_value_type
typedef DaughterContainer base_value_type
 The T value used as the template parameter.
typedef std::unique_ptr< base_value_typeunique_type
 Type of a unique_ptr that can be used to insert elements into this container.
typedef DataModel_detail::ElementProxy< DataVectorElementProxy
 This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership.
typedef DataModel_detail::const_iterator< DataVectorconst_iterator
 Standard const_iterator.
typedef DataModel_detail::iterator< DataVectoriterator
 Standard iterator.
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Standard const_reverse_iterator.
typedef std::reverse_iterator< iteratorreverse_iterator
 Standard reverse_iterator.
typedef DataVector base_data_vector
using Deleter

Public Member Functions

 MultChanContainer ()
 constructor.
 MultChanContainer (const MultChanContainer &rhs)
 copy/assignment.
MultChanContaineroperator= (const MultChanContainer &rhs)
StatusCode initialize ()
 Initialization done after creation or read back - derived classes may augment the functionality.
size_t channelId (const ExpandedIdentifier &x) const
 calculate the channel for a given TRT identifier
size_t layerwheelindex (size_t channelid) const
 calculate layer or wheel index from a channel id
size_t barrelecindex (size_t channelid) const
 calculate the barrel-ec index from a channel id.
DaughterContainer * findContainer (const ExpandedIdentifier &id)
 find a layercontainer from an identifier.
DaughterContainer * findContainer (size_t chanid)
const DaughterContainer * getContainer (size_t chanid) const
 get a layercontainer from a channel id.
void set (const ExpandedIdentifier &id, const typename DaughterContainer::value_type &t)
 set a value
const DaughterContainer::value_type & get (const ExpandedIdentifier &id) const
 get a value
const DaughterContainer::value_type & get (const ExpandedIdentifier &id, size_t &resolvelevel) const
 resolve the nesting level
ContainerWithValue getWithContainer (const ExpandedIdentifier &id) const
 for retrieving t0 values, we need also the container to 'unpack' the t0
void clear ()
 clear all layercontainers
size_t footprint () const
 return the memory allocated by the layercontainers.
void crunch ()
 crunch the layercontainers.
void print () const
 dump to standard output
size_t numObjects () const
 total number of valid calibration objects
void getall (typename DaughterContainer::FlatContainer &entries) const
 get a flat vector with all values.
chan_const_iterator chan_begin () const
 Access to Channel numbers via iterators.
chan_const_iterator chan_end () const
chan_size_type chan_size () const
 number of channels
iov_const_iterator iov_begin () const
 Access to IOVs via iterators.
iov_const_iterator iov_end () const
iov_size_type iov_size () const
 number of IOVs
IOVRange minRange () const
 Current minimal IOVRange.
bool hasUniqueIOV () const
 Check whether there is a unique IOV for all channels.
void add (ChanNum chanNum)
 Adding in channel numbers.
void addNewStop (const IOVTime &stop)
 Add new stop time to minRange - make sure that stop is <= to new stop.
void resetChannelNumbers ()
 Reset channel numbers - needed to allow sorting.
CondMultChanCollImplimplementation ()
 Get implementation.
Constructors, destructors, assignment.
void assign (InputIterator first, InputIterator last)
 Assign from iterators.
void assign (std::initializer_list< value_type > l)
Size and capacity.
size_type size () const noexcept
 Returns the number of elements in the collection.
void resize (size_type sz)
 Resizes the collection to the specified number of elements.
void reserve (size_type n)
 Attempt to preallocate enough memory for a specified number of elements.
Element access.

Change the vector capacity to match the current size.

Note: this does not affect auxiliary data.

const DaughterContainer * operator[] (size_type n) const
 Access an element, as an rvalue.
ElementProxy operator[] (size_type n)
 Access an element, as an lvalue.
const DaughterContainer * operator[] (size_type n) const
 Access an element, as an rvalue.
const DaughterContainer * get (size_type n) const
 Access an element, as an rvalue.
const DaughterContainer * get (size_type n) const
 Access an element, as an rvalue.
const DaughterContainer * at (size_type n) const
 Access an element, as an rvalue.
ElementProxy at (size_type n)
 Access an element, as an lvalue.
const DaughterContainer * at (size_type n) const
 Access an element, as an rvalue.
const DaughterContainer * front () const
 Access the first element in the collection as an rvalue.
ElementProxy front ()
 Access the first element in the collection as an lvalue.
const DaughterContainer * back () const
 Access the last element in the collection as an rvalue.
ElementProxy back ()
 Access the last element in the collection as an lvalue.
Iterator creation.
const_iterator begin () const noexcept
 Return a const_iterator pointing at the beginning of the collection.
iterator begin () noexcept
 Return an iterator pointing at the beginning of the collection.
const_iterator end () const noexcept
 Return a const_iterator pointing past the end of the collection.
iterator end () noexcept
 Return an iterator pointing past the end of the collection.
const_reverse_iterator rbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection.
reverse_iterator rbegin () noexcept
 Return a reverse_iterator pointing past the end of the collection.
const_reverse_iterator rend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection.
reverse_iterator rend () noexcept
 Return a reverse_iterator pointing at the beginning of the collection.
const_iterator cbegin () const noexcept
 Return a const_iterator pointing at the beginning of the collection.
const_iterator cend () const noexcept
 Return a const_iterator pointing past the end of the collection.
const_reverse_iterator crbegin () const noexcept
 Return a const_reverse_iterator pointing past the end of the collection.
const_reverse_iterator crend () const noexcept
 Return a const_reverse_iterator pointing at the beginning of the collection.
Insertion operations.
value_type push_back (value_type pElem)
 Add an element to the end of the collection.
value_type push_back (std::unique_ptr< base_value_type > pElem)
 Add an element to the end of the collection.
size_type push_new (size_type n, F alloc)
 Create and add a number of new elements to the end of the container.
size_type push_new (size_type n, F alloc)
 Create and add a number of new elements to the end of the container.
value_type emplace_back (value_type pElem)
 Add an element to the end of the collection.
iterator insert (iterator position, value_type pElem)
 Add a new element to the collection.
iterator insert (iterator position, std::unique_ptr< base_value_type > pElem)
 Add a new element to the collection.
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection.
void insert (iterator position, InputIterator first, InputIterator last)
 Add a group of new elements to the collection.
void insert (iterator position, std::initializer_list< value_type > l)
 Add a group of new elements to the collection.
iterator emplace (iterator position, value_type pElem)
 Add a new element to the collection.
void insertMove (iterator position, DataVector &other)
 Insert the contents of another DataVector, with auxiliary data copied via move semantics.
Erasure operations.
iterator erase (iterator position)
 Remove element at a given position.
iterator erase (iterator first, iterator last)
 Remove a range of elements.
void pop_back ()
 Remove the last element from the collection.

Static Public Attributes

static const bool has_virtual
 This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class.
static constexpr bool must_own
 If true, then this type must own its contents.

Private Member Functions

const DaughterContainer::value_type & dummyVal () const
 dummy value to return when DaughterContainer is empty

Private Attributes

std::vector< const DaughterContainer * > m_channelmap
 cached table for fast access from channel to layercontainer
CondMultChanCollImpl m_impl

Static Private Attributes

static const size_t m_defaultschannelid = 0
 now need various forwarding calls for CondMultChanCollection functionality

Internal operations.

SG::IsMostDerivedFlag m_isMostDerived
 This flag is true if this DV instance is the most-derived one.
void resortAux (iterator beg, iterator end)
 Reset indices / reorder aux data after elements have been permuted.
void testInsert (const char *op)
 Test if we can insert; raise an exception if not.
void testInsertOol (const char *op)
 Test if we can insert; raise an exception if not.
void assignElement (typename BaseContainer::iterator pos, value_type newElem)
 Handle element assignment.
void assignElement (typename BaseContainer::iterator pos, std::unique_ptr< base_value_type > newElem)
 Handle element assignment.
void assignBaseElement (typename BaseContainer::iterator pos, typename BaseContainer::value_type newElem)
 Handle element assignment from a base pointer.
void shift (size_t pos, ptrdiff_t offs)
 Shift the auxiliary elements of the container.
virtual const std::type_info & dv_typeid () const override
 Find the most-derived DataVector class in the hierarchy.
typedef ROOT::Meta::Selection::DataVector< DaughterContainer, DataVector_BASE >::self self
static int baseOffset1 (const char *p, const DataVector &dv, const std::type_info &ti)
 Helper for baseOffset.
static const DaughterContainer * do_cast (const typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast.
static DaughterContainer * do_cast_nc (typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast.
void clearMostDerived ()
 Clear m_isMostDerived for this instance and for all bases.
virtual void setMostDerived () override
 Set m_isMostDerived for this instance and clear it for all bases.

Non-standard operations.

void resize (size_type sz)
void pop_back ()
void clear (SG::OwnershipPolicy ownPolicy)
 Erase all the elements in the collection, and reset the ownership mode.
void clear (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy trackIndices)
void clear (std::unique_ptr< Deleter > deleter)
 Erase all the elements in the collection, and change how elements are to be deleted.
void swapElement (size_type index, value_type newElem, reference oldElem)
 Swap one element out of the container.
void swapElement (iterator pos, value_type newElem, reference oldElem)
 Swap one element out of the container.
void swapElement (size_type index, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container.
void swapElement (iterator pos, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container.
void swapElement (size_type index, value_type newElem, reference oldElem)
 Swap one element out of the container.
virtual const DataModel_detail::DVLInfoBasedvlinfo_v () const override
 Return the DV/DL info struct for this class.
const SG::AuxVectorBaseauxbase () const
 Convert to AuxVectorBase.
size_type max_size () const noexcept
 Returns the size() of the largest possible collection.
size_type capacity () const noexcept
 Returns the total number of elements that the collection can hold before needing to allocate more memory.
bool empty () const noexcept
 Returns true if the collection is empty.
void shrink_to_fit ()
const PtrVectorstdcont () const
 Return the underlying std::vector of the container.
SG::OwnershipPolicy ownPolicy () const
 Return the ownership policy setting for this container.
static const DataModel_detail::DVLInfoBasedvlinfo ()
 Return the DV/DL info struct for this class.
static int baseOffset (const std::type_info &ti)
 Return the offset of a base DataVector class.

Swap and sort.

void swap (DataVector &rhs)
 Swap this collection with another.
void sort ()
 Sort the container.
void sort (COMPARE comp)
 Sort the container with a user-specified comparison operator.
static void iter_swap (iterator a, iterator b)
 Swap the referents of two DataVector iterators.

Detailed Description

template<class DaughterContainer>
class TRTCond::MultChanContainer< DaughterContainer >

Class for accessing NestedContainers via channels in a CondMultChanCollection.

Definition at line 44 of file MultChanContainer.h.

Member Typedef Documentation

◆ allocator_type

typedef BASE::allocator_type DataVector< DaughterContainer, BASE >::allocator_type
inherited

Definition at line 817 of file DataVector.h.

◆ base_data_vector

typedef DataVector DataVector< DaughterContainer, BASE >::base_data_vector
inherited

Definition at line 854 of file DataVector.h.

◆ base_value_type

typedef DaughterContainer DataVector< DaughterContainer, BASE >::base_value_type
inherited

The T value used as the template parameter.

Note that this is different from value_type (that's T*).

Definition at line 825 of file DataVector.h.

◆ BaseContainer

typedef BASE::PtrVector DataVector< DaughterContainer, BASE >::BaseContainer
inherited

Definition at line 807 of file DataVector.h.

◆ chan_const_iterator

typedef ChanVec::const_iterator CondMultChanCollection< DaughterContainer >::chan_const_iterator
inherited

Definition at line 58 of file CondMultChanCollection.h.

◆ chan_iterator

typedef ChanVec::iterator CondMultChanCollection< DaughterContainer >::chan_iterator
inherited

Definition at line 59 of file CondMultChanCollection.h.

◆ chan_size_type

typedef ChanVec::size_type CondMultChanCollection< DaughterContainer >::chan_size_type
inherited

Definition at line 60 of file CondMultChanCollection.h.

◆ ChanNum

typedef unsigned int CondMultChanCollection< DaughterContainer >::ChanNum
inherited

Definition at line 55 of file CondMultChanCollection.h.

◆ ChanVec

typedef std::vector<ChanNum> CondMultChanCollection< DaughterContainer >::ChanVec
inherited

Definition at line 56 of file CondMultChanCollection.h.

◆ const_iterator

typedef DataModel_detail::const_iterator<DataVector> DataVector< DaughterContainer, BASE >::const_iterator
inherited

Standard const_iterator.

Definition at line 838 of file DataVector.h.

◆ const_pointer

typedef DaughterContainer* const* DataVector< DaughterContainer, BASE >::const_pointer
inherited

Definition at line 819 of file DataVector.h.

◆ const_reference

typedef DaughterContainer* const& DataVector< DaughterContainer, BASE >::const_reference
inherited

Definition at line 813 of file DataVector.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> DataVector< DaughterContainer, BASE >::const_reverse_iterator
inherited

Standard const_reverse_iterator.

Definition at line 847 of file DataVector.h.

◆ const_value_type

typedef const DaughterContainer* DataVector< DaughterContainer, BASE >::const_value_type
inherited

Definition at line 821 of file DataVector.h.

◆ ContainerWithValue

template<class DaughterContainer>
typedef std::pair< const DaughterContainer*, const typename DaughterContainer::value_type*> TRTCond::MultChanContainer< DaughterContainer >::ContainerWithValue

get a value with the corresponding container.

the container is needed to unpack the stored class.

Definition at line 83 of file MultChanContainer.h.

◆ DataVector_BASE

typedef BASE DataVector< DaughterContainer, BASE >::DataVector_BASE
inherited

Definition at line 797 of file DataVector.h.

◆ Deleter

using DataVector< DaughterContainer, BASE >::Deleter
inherited

Definition at line 857 of file DataVector.h.

◆ difference_type

typedef BASE::difference_type DataVector< DaughterContainer, BASE >::difference_type
inherited

Definition at line 815 of file DataVector.h.

◆ DVL_BASE

typedef BASE DataVector< DaughterContainer, BASE >::DVL_BASE
inherited

Definition at line 798 of file DataVector.h.

◆ ElementProxy

typedef DataModel_detail::ElementProxy<DataVector> DataVector< DaughterContainer, BASE >::ElementProxy
inherited

This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership.

Definition at line 833 of file DataVector.h.

◆ iov_const_iterator

typedef IOVVec::const_iterator CondMultChanCollection< DaughterContainer >::iov_const_iterator
inherited

Definition at line 61 of file CondMultChanCollection.h.

◆ iov_iterator

typedef IOVVec::iterator CondMultChanCollection< DaughterContainer >::iov_iterator
inherited

Definition at line 62 of file CondMultChanCollection.h.

◆ iov_size_type

typedef IOVVec::size_type CondMultChanCollection< DaughterContainer >::iov_size_type
inherited

Definition at line 63 of file CondMultChanCollection.h.

◆ IOVVec

typedef std::vector<IOVRange> CondMultChanCollection< DaughterContainer >::IOVVec
inherited

Definition at line 57 of file CondMultChanCollection.h.

◆ iterator

typedef DataModel_detail::iterator<DataVector> DataVector< DaughterContainer, BASE >::iterator
inherited

Standard iterator.

Note that lvalue references here will yield an ElementProxy, not a reference.

Definition at line 842 of file DataVector.h.

◆ pointer

typedef DaughterContainer** DataVector< DaughterContainer, BASE >::pointer
inherited

Definition at line 818 of file DataVector.h.

◆ PtrVector

typedef BASE::PtrVector DataVector< DaughterContainer, BASE >::PtrVector
inherited

This is the type of the underlying std::vector (what stdcont returns).

Definition at line 806 of file DataVector.h.

◆ reference

typedef DaughterContainer*& DataVector< DaughterContainer, BASE >::reference
inherited

Definition at line 812 of file DataVector.h.

◆ reverse_iterator

typedef std::reverse_iterator<iterator> DataVector< DaughterContainer, BASE >::reverse_iterator
inherited

Standard reverse_iterator.

Note that lvalue references here will yield an ElementProxy, not a reference.

Definition at line 852 of file DataVector.h.

◆ self

typedef ROOT::Meta::Selection::DataVector<DaughterContainer,DataVector_BASE>::self DataVector< DaughterContainer, BASE >::self
privateinherited

Definition at line 2063 of file DataVector.h.

◆ size_type

typedef BASE::size_type DataVector< DaughterContainer, BASE >::size_type
inherited

Definition at line 814 of file DataVector.h.

◆ unique_type

typedef std::unique_ptr<base_value_type> DataVector< DaughterContainer, BASE >::unique_type
inherited

Type of a unique_ptr that can be used to insert elements into this container.

Definition at line 829 of file DataVector.h.

◆ value_type

typedef DaughterContainer* DataVector< DaughterContainer, BASE >::value_type
inherited

Definition at line 816 of file DataVector.h.

Constructor & Destructor Documentation

◆ MultChanContainer() [1/2]

template<class DaughterContainer>
TRTCond::MultChanContainer< DaughterContainer >::MultChanContainer ( )
inline

constructor.

cannot do anything because that would make CondMultChanCollection upset.

Definition at line 48 of file MultChanContainer.h.

48{}

◆ MultChanContainer() [2/2]

template<class DaughterContainer>
TRTCond::MultChanContainer< DaughterContainer >::MultChanContainer ( const MultChanContainer< DaughterContainer > & rhs)

copy/assignment.

not trivial.

Definition at line 130 of file MultChanContainer.h.

131 {
132 *this = rhs;
133 }
Class for accessing NestedContainers via channels in a CondMultChanCollection.

Member Function Documentation

◆ add()

void CondMultChanCollection< DaughterContainer >::add ( ChanNum chanNum)
inlineinherited

Adding in channel numbers.

Definition at line 89 of file CondMultChanCollection.h.

200{
201 m_impl.add(chanNum);
202}
A CondMultChanCollection is a template class which can hold a collection of T* objects which are inte...

◆ addNewStop()

void CondMultChanCollection< DaughterContainer >::addNewStop ( const IOVTime & stop)
inlineinherited

Add new stop time to minRange - make sure that stop is <= to new stop.

Definition at line 96 of file CondMultChanCollection.h.

219{
220 m_impl.addNewStop(stop);
221}

◆ assign() [1/2]

void DataVector< DaughterContainer, BASE >::assign ( InputIterator first,
InputIterator last )
inherited

Assign from iterators.

Parameters
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ assign() [2/2]

void DataVector< DaughterContainer, BASE >::assign ( std::initializer_list< value_type > l)
inherited
Parameters
lAn initializer list.

Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ assignBaseElement()

void DataVector< DaughterContainer, BASE >::assignBaseElement ( typename BaseContainer::iterator pos,
typename BaseContainer::value_type newElem )
privateinherited

Handle element assignment from a base pointer.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ assignElement() [1/2]

void DataVector< DaughterContainer, BASE >::assignElement ( typename BaseContainer::iterator pos,
std::unique_ptr< base_value_type > newElem )
privateinherited

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The container must own its elements. Auxiliary data are copied if appropriate.

◆ assignElement() [2/2]

void DataVector< DaughterContainer, BASE >::assignElement ( typename BaseContainer::iterator pos,
value_type newElem )
privateinherited

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ at() [1/3]

ElementProxy DataVector< DaughterContainer, BASE >::at ( size_type n)
inherited

Access an element, as an lvalue.

Parameters
nArray index to access.
Returns
Proxy to the element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ at() [2/3]

const DaughterContainer * DataVector< DaughterContainer, BASE >::at ( size_type n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a const T* rather than a reference.

◆ at() [3/3]

const DaughterContainer * DataVector< DaughterContainer, typename DataVectorBase<DaughterContainer>::Base >::at ( size_type n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a const T* rather than a reference.

◆ auxbase()

const SG::AuxVectorBase & DataVector< DaughterContainer, BASE >::auxbase ( ) const
inherited

Convert to AuxVectorBase.

Needed to get AuxVectorBase from a ConstDataVector. Present in DataVector as well for consistency. We only really need it in the base class; however, root6 fails constructing a TMethodCall for this if there is virtual derivation. A workaround is to redeclare this in the derived classes too.

◆ back() [1/2]

ElementProxy DataVector< DaughterContainer, BASE >::back ( )
inherited

Access the last element in the collection as an lvalue.

Returns
Proxy to the last element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ back() [2/2]

const DaughterContainer * DataVector< DaughterContainer, BASE >::back ( ) const
inherited

Access the last element in the collection as an rvalue.

Returns
The last element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a const T* rather than a reference.

◆ barrelecindex()

template<class DaughterContainer>
size_t TRTCond::MultChanContainer< DaughterContainer >::barrelecindex ( size_t channelid) const
inline

calculate the barrel-ec index from a channel id.

(note that this returns 0-3, so not the barrel-ec-ID.)

Definition at line 170 of file MultChanContainer.h.

171 {
172 return channelid!=m_defaultschannelid ? (channelid-1)%4 : 99 ;
173 }
static const size_t m_defaultschannelid
now need various forwarding calls for CondMultChanCollection functionality

◆ baseOffset()

int DataVector< DaughterContainer, BASE >::baseOffset ( const std::type_info & ti)
staticinherited

Return the offset of a base DataVector class.

Parameters
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

This function is here due to limitations of root 6, which can't calculate these offsets correctly from the dictionary if virtual derivation is used.

◆ baseOffset1()

int DataVector< DaughterContainer, BASE >::baseOffset1 ( const char * p,
const DataVector & dv,
const std::type_info & ti )
staticinherited

Helper for baseOffset.

Parameters
pPointer to the start of the top-level object.
dvReference to the DataVector object.
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

◆ begin() [1/2]

const_iterator DataVector< DaughterContainer, BASE >::begin ( ) const
noexceptinherited

Return a const_iterator pointing at the beginning of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ begin() [2/2]

iterator DataVector< DaughterContainer, BASE >::begin ( )
noexceptinherited

Return an iterator pointing at the beginning of the collection.

Returns
An iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ capacity()

size_type DataVector< DaughterContainer, BASE >::capacity ( ) const
noexceptinherited

Returns the total number of elements that the collection can hold before needing to allocate more memory.

◆ cbegin()

const_iterator DataVector< DaughterContainer, BASE >::cbegin ( ) const
noexceptinherited

Return a const_iterator pointing at the beginning of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ cend()

const_iterator DataVector< DaughterContainer, BASE >::cend ( ) const
noexceptinherited

Return a const_iterator pointing past the end of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ chan_begin()

CondMultChanCollection< DaughterContainer >::chan_const_iterator CondMultChanCollection< DaughterContainer >::chan_begin ( ) const
inlineinherited

Access to Channel numbers via iterators.

Definition at line 69 of file CondMultChanCollection.h.

129{
130 return (m_impl.chan_begin());
131}

◆ chan_end()

CondMultChanCollection< DaughterContainer >::chan_const_iterator CondMultChanCollection< DaughterContainer >::chan_end ( ) const
inlineinherited

Definition at line 70 of file CondMultChanCollection.h.

137{
138 return (m_impl.chan_end());
139}

◆ chan_size()

CondMultChanCollection< DaughterContainer >::chan_size_type CondMultChanCollection< DaughterContainer >::chan_size ( ) const
inlineinherited

number of channels

Definition at line 73 of file CondMultChanCollection.h.

146{
147 return (m_impl.chan_size());
148}

◆ channelId()

template<class DaughterContainer>
size_t TRTCond::MultChanContainer< DaughterContainer >::channelId ( const ExpandedIdentifier & x) const
inline

calculate the channel for a given TRT identifier

Definition at line 152 of file MultChanContainer.h.

153 {
154 return x.level() >=ExpandedIdentifier::LAYERWHEEL ?
157 }

◆ clear() [1/4]

void DataVector< DaughterContainer, BASE >::clear ( SG::OwnershipPolicy ownPolicy)
inherited

Erase all the elements in the collection, and reset the ownership mode.

Parameters
ownPolicyThe new ownership policy of the container.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ clear() [2/4]

void DataVector< DaughterContainer, BASE >::clear ( SG::OwnershipPolicy ownPolicy,
SG::IndexTrackingPolicy trackIndices )
inherited

◆ clear() [3/4]

void DataVector< DaughterContainer, BASE >::clear ( std::unique_ptr< Deleter > deleter)
inherited

Erase all the elements in the collection, and change how elements are to be deleted.

Parameters
deleterObject to be used to delete object. Passing nullptr will change back to the default.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this. After the current elements are deleted, the Deleter object is changed.

◆ clear() [4/4]

template<class DaughterContainer>
void TRTCond::MultChanContainer< DaughterContainer >::clear ( )
inline

clear all layercontainers

Definition at line 307 of file MultChanContainer.h.

308 {
310 it != this->end(); ++it) (*it)->clear() ;
311 }
const_iterator end() const noexcept
const_iterator begin() const noexcept

◆ clearMostDerived()

void DataVector< DaughterContainer, BASE >::clearMostDerived ( )
protectedinherited

Clear m_isMostDerived for this instance and for all bases.

Called from the constructor after setting m_isMostDerived.

◆ crbegin()

const_reverse_iterator DataVector< DaughterContainer, BASE >::crbegin ( ) const
noexceptinherited

Return a const_reverse_iterator pointing past the end of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ crend()

const_reverse_iterator DataVector< DaughterContainer, BASE >::crend ( ) const
noexceptinherited

Return a const_reverse_iterator pointing at the beginning of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ crunch()

template<class DaughterContainer>
void TRTCond::MultChanContainer< DaughterContainer >::crunch ( )
inline

crunch the layercontainers.

Definition at line 324 of file MultChanContainer.h.

324 {
326 it != this->end(); ++it) (*it)->crunch() ;
327 }

◆ do_cast()

const DaughterContainer * DataVector< DaughterContainer, BASE >::do_cast ( const typename PtrVector::value_type p)
staticinherited

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a const T*.

The conversion will be done with static_cast if possible, with dynamic_cast otherwise.

◆ do_cast_nc()

DaughterContainer * DataVector< DaughterContainer, BASE >::do_cast_nc ( typename PtrVector::value_type p)
staticinherited

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a T*.

The conversion will be done with static_cast if possible, with dynamic_cast otherwise.

◆ dummyVal()

template<class DaughterContainer>
const DaughterContainer::value_type & TRTCond::MultChanContainer< DaughterContainer >::dummyVal ( ) const
inlineprivate

dummy value to return when DaughterContainer is empty

This is a somewhat crazy workaround to handle returning a default value for a templated class.

Definition at line 123 of file MultChanContainer.h.

124 {
126 return dummyVal;
127 }
const DaughterContainer::value_type & dummyVal() const
dummy value to return when DaughterContainer is empty

◆ dv_typeid()

virtual const std::type_info & DataVector< DaughterContainer, BASE >::dv_typeid ( ) const
overrideprivatevirtualinherited

Find the most-derived DataVector class in the hierarchy.

Returns
The type_info for the class for which this method gets run.

This is used to generate a nice error message when the most-derived check for insertions fails. Every DataVector defines this virtual method, so when it's called, the one corresponding to the most-derived DataVector gets run.

◆ dvlinfo()

const DataModel_detail::DVLInfoBase & DataVector< DaughterContainer, BASE >::dvlinfo ( )
staticinherited

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ dvlinfo_v()

virtual const DataModel_detail::DVLInfoBase & DataVector< DaughterContainer, BASE >::dvlinfo_v ( ) const
overridevirtualinherited

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ emplace()

iterator DataVector< DaughterContainer, BASE >::emplace ( iterator position,
value_type pElem )
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is just the same as insert. It's included just for interface compatibility with std::vector.

◆ emplace_back()

value_type DataVector< DaughterContainer, BASE >::emplace_back ( value_type pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is like the same as push_back, and it returns the pushed element. It's included just for interface compatibility with std::vector.

◆ empty()

bool DataVector< DaughterContainer, BASE >::empty ( ) const
nodiscardnoexceptinherited

Returns true if the collection is empty.

◆ end() [1/2]

const_iterator DataVector< DaughterContainer, BASE >::end ( ) const
noexceptinherited

Return a const_iterator pointing past the end of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ end() [2/2]

iterator DataVector< DaughterContainer, BASE >::end ( )
noexceptinherited

Return an iterator pointing past the end of the collection.

Returns
An iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ erase() [1/2]

iterator DataVector< DaughterContainer, BASE >::erase ( iterator first,
iterator last )
inherited

Remove a range of elements.

Parameters
firstIterator pointing to the first element to be removed.
lastIterator pointing one past the last element to be removed.
Returns
An iterator pointing to the element pointed to by last prior to erasing (or end()).

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ erase() [2/2]

iterator DataVector< DaughterContainer, BASE >::erase ( iterator position)
inherited

Remove element at a given position.

Parameters
positionIterator pointing to the element to be removed.
Returns
An iterator pointing to the next element (or end()).

If the container owns its elements, then the pointed-to element will be deleted.

◆ findContainer() [1/2]

template<class DaughterContainer>
DaughterContainer * TRTCond::MultChanContainer< DaughterContainer >::findContainer ( const ExpandedIdentifier & id)
inline

find a layercontainer from an identifier.

create it if it does not exist

Definition at line 177 of file MultChanContainer.h.

178 {
179 // on the first call, we insert a container for the default. the default is always the first container.
181 MsgStream log(Athena::getMessageSvc(),"TRTCond::MultChanContainer");
182 log << MSG::WARNING << "Sorry: cannot store containers at BARREL_EC granularity" << endmsg ;
183 }
184 return findContainer( channelId( id ) ) ;
185 }
DaughterContainer * findContainer(const ExpandedIdentifier &id)
find a layercontainer from an identifier.
size_t channelId(const ExpandedIdentifier &x) const
calculate the channel for a given TRT identifier

◆ findContainer() [2/2]

template<class DaughterContainer>
DaughterContainer * TRTCond::MultChanContainer< DaughterContainer >::findContainer ( size_t chanid)
inline

Definition at line 189 of file MultChanContainer.h.

190 {
191 // on the first call, we insert a container for the default. the default is always the first container.
192 if(this->size()==0) {
193 this->push_back( new DaughterContainer() ) ;
195 }
197 std::find( this->chan_begin(), this->chan_end(), chanid ) ;
198 auto chanindex = std::distance(this->chan_begin(),chanit) ;
199 if(chanit==this->chan_end()) {
200 // add a new container
201 this->push_back( new DaughterContainer() ) ;
202 this->add(chanid);
203 chanindex = this->size()-1 ; //std::distance(chan_begin(),chan_end())-1 ;
204 // make sure to clear the cache
205 m_channelmap.clear() ;
206 }
208 throw std::out_of_range("MultiChanContainer::findContainer chanindex out of range");
209 }
210 return this->operator[]( chanindex ) ;
211 }
const DaughterContainer * operator[](size_type n) const
value_type push_back(value_type pElem)
std::vector< const DaughterContainer * > m_channelmap
cached table for fast access from channel to layercontainer

◆ footprint()

template<class DaughterContainer>
size_t TRTCond::MultChanContainer< DaughterContainer >::footprint ( ) const
inline

return the memory allocated by the layercontainers.

It does not add the footprint of the CondMultChanCollection itself.

Definition at line 315 of file MultChanContainer.h.

315 {
316 size_t total=0; //= Trait::footprint(m_default) ;
318 it != this->end(); ++it) total += (*it)->footprint() ;
319 return total ;
320 }
size_t footprint() const
return the memory allocated by the layercontainers.

◆ front() [1/2]

ElementProxy DataVector< DaughterContainer, BASE >::front ( )
inherited

Access the first element in the collection as an lvalue.

Returns
Proxy to the first element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ front() [2/2]

const DaughterContainer * DataVector< DaughterContainer, BASE >::front ( ) const
inherited

Access the first element in the collection as an rvalue.

Returns
The first element in the collection.

No checking is done to ensure that the container is not empty. Note that we return a const T* rather than a reference.

◆ get() [1/4]

const DaughterContainer * DataVector< DaughterContainer, BASE >::get ( size_type n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

This is a synonym for operator[] const, to be used when calling from root (where we can't readily call just the const version of a method).

◆ get() [2/4]

const DaughterContainer * DataVector< DaughterContainer, typename DataVectorBase<DaughterContainer>::Base >::get ( size_type n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

This is a synonym for operator[] const, to be used when calling from root (where we can't readily call just the const version of a method).

◆ get() [3/4]

template<class DaughterContainer>
const DaughterContainer::value_type & TRTCond::MultChanContainer< DaughterContainer >::get ( const ExpandedIdentifier & id) const
inline

get a value

Definition at line 238 of file MultChanContainer.h.

239 {
242 if( container ) {
243 const typename DaughterContainer::value_type& rc = container->get( id ) ;
245 }
246 }
247 // Throw error if the container is empty.
248 if ( this->size() == 0 ) {
249 size_t len;
250 int s;
251 char* tmp = abi::__cxa_demangle(typeid(this).name(),0,&len,&s);
252 std::string error = std::string(tmp) + std::string(" is empty!!");
253 throw std::runtime_error( error );
254 }
255 return this->front()->get() ;
256 //return operator[]( 0 )->set( t ) ;// m_default ;
257 }
const DaughterContainer * front() const
const DaughterContainer * getContainer(size_t chanid) const
get a layercontainer from a channel id.
const DaughterContainer::value_type & get(const ExpandedIdentifier &id) const
get a value

◆ get() [4/4]

template<class DaughterContainer>
const DaughterContainer::value_type & TRTCond::MultChanContainer< DaughterContainer >::get ( const ExpandedIdentifier & id,
size_t & resolvelevel ) const
inline

resolve the nesting level

Definition at line 261 of file MultChanContainer.h.

262 {
265 if( container ) {
266 const typename DaughterContainer::value_type& rc = container->get( id , resolvelevel) ;
268 }
269 }
270 // Throw error if the container is empty.
271 if ( this->size() == 0 ) {
272 size_t len;
273 int s;
274 char* tmp = abi::__cxa_demangle(typeid(this).name(),0,&len,&s);
275 std::string error = std::string(tmp) + std::string(" is empty!!");
276 throw std::runtime_error( error );
277 return dummyVal();
278 }
279 return this->front()->get(id,resolvelevel) ;
280 }

◆ getall()

template<class DaughterContainer>
void TRTCond::MultChanContainer< DaughterContainer >::getall ( typename DaughterContainer::FlatContainer & entries) const
inline

get a flat vector with all values.

used for storing constants in a txtfile.

Definition at line 340 of file MultChanContainer.h.

340 {
343 for( ; dauit != this->end(); ++dauit, ++chanit) {
344 // get the entries in this subcontainer
346 (*dauit)->getall(newentries) ;
347 // update the identifiers
348 if( dauit == this->begin() ) {
349 // deal with the default value
352 } else {
356 }
357 }
359 }
360 }
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
size_t barrelecindex(size_t channelid) const
calculate the barrel-ec index from a channel id.
size_t layerwheelindex(size_t channelid) const
calculate layer or wheel index from a channel id
void getall(typename DaughterContainer::FlatContainer &entries) const
get a flat vector with all values.

◆ getContainer()

template<class DaughterContainer>
const DaughterContainer * TRTCond::MultChanContainer< DaughterContainer >::getContainer ( size_t chanid) const
inline

get a layercontainer from a channel id.

uses cache for fast access.

Definition at line 215 of file MultChanContainer.h.

216 {
217 //in the const-version to get the container we rely on the m_channelmap per-filled by initialize
218 //(to be thread-seafe)
219 return chanid < m_channelmap.size() ? m_channelmap[chanid] : nullptr ;
220 }

◆ getWithContainer()

template<class DaughterContainer>
MultChanContainer< DaughterContainer >::ContainerWithValue TRTCond::MultChanContainer< DaughterContainer >::getWithContainer ( const ExpandedIdentifier & id) const
inline

for retrieving t0 values, we need also the container to 'unpack' the t0

Definition at line 285 of file MultChanContainer.h.

286 {
289 if( container ) {
290 const typename DaughterContainer::value_type& value = container->get( id ) ;
292 }
293 }
294 // Throw error if the container is empty.
295 if ( this->size() == 0 ) {
296 size_t len;
297 int s;
298 char* tmp = abi::__cxa_demangle(typeid(this).name(),0,&len,&s);
299 std::string error = std::string(tmp) + std::string(" is empty!!");
300 throw std::runtime_error( error );
301 }
302 return ContainerWithValue(this->front(),&(this->front()->get())) ;
303 }
std::pair< const DaughterContainer *, const typename DaughterContainer::value_type * > ContainerWithValue
get a value with the corresponding container.

◆ hasUniqueIOV()

bool CondMultChanCollection< DaughterContainer >::hasUniqueIOV ( ) const
inlineinherited

Check whether there is a unique IOV for all channels.

Definition at line 86 of file CondMultChanCollection.h.

191{
192 return (m_impl.hasUniqueIOV());
193}

◆ implementation()

CondMultChanCollImpl * CondMultChanCollection< DaughterContainer >::implementation ( )
inlineinherited

Get implementation.

Definition at line 106 of file CondMultChanCollection.h.

247{
248 return &m_impl;
249}

◆ initialize()

template<class DaughterContainer>
StatusCode TRTCond::MultChanContainer< DaughterContainer >::initialize ( )
virtual

Initialization done after creation or read back - derived classes may augment the functionality.

Reimplemented from CondMultChanCollection< DaughterContainer >.

Definition at line 376 of file MultChanContainer.h.

376 {
377
378 // sanity check to test we have added a default value
379 if( this->size()>0 && *(this->chan_begin()) != m_defaultschannelid ) {
380 MsgStream log(Athena::getMessageSvc(),"TRTCond::MultChanContainer");
381 log << MSG::ERROR << " first channel id is not defaults channel id!" << endmsg ;
382 }
383
384 // first get the max channel id
385 auto maxchan=std::max_element(this->chan_begin(),this->chan_end());
386 const size_t maxchanid= maxchan==this->chan_end() ? 0 : *maxchan;
387
388 // now allocate the map and fill it
389 m_channelmap.clear() ;
390 m_channelmap.resize( maxchanid + 1, nullptr ) ;
391 //typename CondMultChanCollection<DaughterContainer>::const_iterator dauit = this->begin() ;
392 auto dauit = this->begin() ;
393 for( auto chanit = this->chan_begin();chanit != this->chan_end(); ++chanit, ++dauit ) {
395 }
396 return StatusCode::SUCCESS;
397 }

◆ insert() [1/5]

void DataVector< DaughterContainer, BASE >::insert ( iterator position,
InputIterator first,
InputIterator last )
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

This overload is for the case where the iterator value type is convertible to T*.

◆ insert() [2/5]

void DataVector< DaughterContainer, BASE >::insert ( iterator position,
InputIterator first,
InputIterator last )
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

This overload is for the case where the iterator value type is convertible to unique_ptr<T>.

◆ insert() [3/5]

void DataVector< DaughterContainer, BASE >::insert ( iterator position,
std::initializer_list< value_type > l )
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
lAn initializer list.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [4/5]

iterator DataVector< DaughterContainer, BASE >::insert ( iterator position,
std::unique_ptr< base_value_type > pElem )
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [5/5]

iterator DataVector< DaughterContainer, BASE >::insert ( iterator position,
value_type pElem )
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insertMove()

void DataVector< DaughterContainer, BASE >::insertMove ( iterator position,
DataVector & other )
inherited

Insert the contents of another DataVector, with auxiliary data copied via move semantics.

Parameters
positionIterator before which the new elements will be added.
otherThe vector to add.

The ownership mode of this vector must be the same as other; otherwise, an exception will be thrown.

If both vectors are view vectors, then this is the same as insert (position, other.begin(), other.end()) .

Otherwise, the elements from other will be inserted into this vector. This vector will take ownership of the elements, and the ownership mode of other will be changed to VIEW_ELEMENTS. Auxiliary data for these elements will be transferred, using move semantics if possible. (Thus, the auxiliary store for other may be modified and must not be locked.) Finally, the auxiliary store pointer for other will be cleared (but the store itself will not be deleted since it's not owned by the vector).

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ iov_begin()

CondMultChanCollection< DaughterContainer >::iov_const_iterator CondMultChanCollection< DaughterContainer >::iov_begin ( ) const
inlineinherited

Access to IOVs via iterators.

Definition at line 76 of file CondMultChanCollection.h.

156{
157 return (m_impl.iov_begin());
158}

◆ iov_end()

CondMultChanCollection< DaughterContainer >::iov_const_iterator CondMultChanCollection< DaughterContainer >::iov_end ( ) const
inlineinherited

Definition at line 77 of file CondMultChanCollection.h.

164{
165 return (m_impl.iov_end());
166}

◆ iov_size()

CondMultChanCollection< DaughterContainer >::iov_size_type CondMultChanCollection< DaughterContainer >::iov_size ( ) const
inlineinherited

number of IOVs

number of iovs

Definition at line 80 of file CondMultChanCollection.h.

173{
174 return (m_impl.iov_size());
175}

◆ iter_swap()

void DataVector< DaughterContainer, BASE >::iter_swap ( iterator a,
iterator b )
staticinherited

Swap the referents of two DataVector iterators.

Parameters
aThe first iterator for the swap.
bThe second iterator for the swap.

◆ layerwheelindex()

template<class DaughterContainer>
size_t TRTCond::MultChanContainer< DaughterContainer >::layerwheelindex ( size_t channelid) const
inline

calculate layer or wheel index from a channel id

Definition at line 162 of file MultChanContainer.h.

163 {
164 return channelid!=m_defaultschannelid ? (channelid-1)/4 : 99 ;
165 }

◆ max_size()

size_type DataVector< DaughterContainer, BASE >::max_size ( ) const
noexceptinherited

Returns the size() of the largest possible collection.

◆ minRange()

IOVRange CondMultChanCollection< DaughterContainer >::minRange ( ) const
inlineinherited

Current minimal IOVRange.

Definition at line 83 of file CondMultChanCollection.h.

182{
183 return (m_impl.minRange());
184}

◆ numObjects()

template<class DaughterContainer>
size_t TRTCond::MultChanContainer< DaughterContainer >::numObjects ( ) const

total number of valid calibration objects

Definition at line 331 of file MultChanContainer.h.

331 {
332 size_t rc(0) ;
334 it != this->end(); ++it) rc += (*it)->numObjects() ;
335 return rc ;
336 }
static Double_t rc
size_t numObjects() const
total number of valid calibration objects

◆ operator=()

template<class DaughterContainer>
MultChanContainer< DaughterContainer > & TRTCond::MultChanContainer< DaughterContainer >::operator= ( const MultChanContainer< DaughterContainer > & rhs)

Definition at line 137 of file MultChanContainer.h.

◆ operator[]() [1/3]

ElementProxy DataVector< DaughterContainer, BASE >::operator[] ( size_type n)
inherited

Access an element, as an lvalue.

Parameters
nArray index to access.
Returns
Proxy to the element at n.

No bounds checking is done. Note that we return a proxy object rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ operator[]() [2/3]

const DaughterContainer * DataVector< DaughterContainer, BASE >::operator[] ( size_type n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

No bounds checking is done. Note that we return a const T* rather than a reference.

◆ operator[]() [3/3]

const DaughterContainer * DataVector< DaughterContainer, typename DataVectorBase<DaughterContainer>::Base >::operator[] ( size_type n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

No bounds checking is done. Note that we return a const T* rather than a reference.

◆ ownPolicy()

SG::OwnershipPolicy DataVector< DaughterContainer, BASE >::ownPolicy ( ) const
inherited

Return the ownership policy setting for this container.

◆ pop_back() [1/2]

void DataVector< DaughterContainer, BASE >::pop_back ( )
inherited

Remove the last element from the collection.

If the container owns its elements, then the removed element will be deleted.

◆ pop_back() [2/2]

void DataVector< DaughterContainer, BASE >::pop_back ( )
inherited

◆ print()

template<class DaughterContainer>
void TRTCond::MultChanContainer< DaughterContainer >::print ( ) const
inline

dump to standard output

Definition at line 364 of file MultChanContainer.h.

364 {
367 for( ; dauit != this->end(); ++dauit, ++chanit) {
368 std::cout << "Now printing channel " << *chanit << " layer/becindex: " << layerwheelindex(*chanit) << " " << barrelecindex(*chanit) << std::endl ;
369 (*dauit)->print() ;
370 }
371 }
void print() const
dump to standard output

◆ push_back() [1/2]

value_type DataVector< DaughterContainer, BASE >::push_back ( std::unique_ptr< base_value_type > pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the pushed pointer.

◆ push_back() [2/2]

value_type DataVector< DaughterContainer, BASE >::push_back ( value_type pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the pushed pointer.

◆ push_new() [1/2]

size_type DataVector< DaughterContainer, BASE >::push_new ( size_type n,
F alloc )
inherited

Create and add a number of new elements to the end of the container.

Parameters
nThe number of new elements to add.
allocFunctional to call to allocate a new element to push. Should be callable like T* = alloc(); For example:
dv.push_new (n, [](){ return new Foo; });
Definition FooBar.h:9
It may also be useful to allocate from a DataPool.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the original size of the vector.

◆ push_new() [2/2]

size_type DataVector< DaughterContainer, typename DataVectorBase<DaughterContainer>::Base >::push_new ( size_type n,
F alloc )
inherited

Create and add a number of new elements to the end of the container.

Parameters
nThe number of new elements to add.
allocFunctional to call to allocate a new element to push. Should be callable like T* = alloc(); For example:
dv.push_new (n, [](){ return new Foo; });
It may also be useful to allocate from a DataPool.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the original size of the vector.

◆ rbegin() [1/2]

const_reverse_iterator DataVector< DaughterContainer, BASE >::rbegin ( ) const
noexceptinherited

Return a const_reverse_iterator pointing past the end of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ rbegin() [2/2]

reverse_iterator DataVector< DaughterContainer, BASE >::rbegin ( )
noexceptinherited

Return a reverse_iterator pointing past the end of the collection.

Returns
A reverse_iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ rend() [1/2]

const_reverse_iterator DataVector< DaughterContainer, BASE >::rend ( ) const
noexceptinherited

Return a const_reverse_iterator pointing at the beginning of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ rend() [2/2]

reverse_iterator DataVector< DaughterContainer, BASE >::rend ( )
noexceptinherited

Return a reverse_iterator pointing at the beginning of the collection.

Returns
A reverse_iterator.

Note that dereferencing the iterator will yield a proxy rather than a reference; the proxy will handle deleting an owned element if it's assigned to.

◆ reserve()

void DataVector< DaughterContainer, BASE >::reserve ( size_type n)
inherited

Attempt to preallocate enough memory for a specified number of elements.

Parameters
nNumber of elements required.

◆ resetChannelNumbers()

void CondMultChanCollection< DaughterContainer >::resetChannelNumbers ( )
inlineinherited

Reset channel numbers - needed to allow sorting.

Definition at line 103 of file CondMultChanCollection.h.

238{
239 m_impl.resetChannelNumbers();
240}

◆ resize() [1/2]

void DataVector< DaughterContainer, BASE >::resize ( size_type sz)
inherited

Resizes the collection to the specified number of elements.

Parameters
szThe new size of the collection.

Note that this function differs from the standard in that it does not allow specifying the value of any inserted elements. They will always be 0.

If the container is shrunk, elements will be deleted as with erase().

◆ resize() [2/2]

void DataVector< DaughterContainer, BASE >::resize ( size_type sz)
inherited

◆ resortAux()

void DataVector< DaughterContainer, BASE >::resortAux ( iterator beg,
iterator end )
inherited

Reset indices / reorder aux data after elements have been permuted.

Parameters
begStart of the range of elements to process.
endEnd of the range of elements to process.

Call this after some operation that has permuted the elements in the container (such as sort). The index information in the elements will be used to permute all auxiliary data in the same way. Finally, all the indices will be reset in the correct order.

◆ set()

template<class DaughterContainer>
void TRTCond::MultChanContainer< DaughterContainer >::set ( const ExpandedIdentifier & id,
const typename DaughterContainer::value_type & t )
inline

set a value

Definition at line 223 of file MultChanContainer.h.

224 {
226 // set the default value. don't use the id, since it will only confuse the container
227 findContainer(id)->set( t ) ;
228 } else if( id.level()==ExpandedIdentifier::BARRELEC ) {
229 MsgStream log(Athena::getMessageSvc(),"TRTCond::MultChanContainer");
230 log << MSG::WARNING << "Sorry: cannot store containers at BARREL_EC granularity" << endmsg;
231 } else {
232 findContainer(id)->set( id, t ) ;
233 }
234 }

◆ setMostDerived()

virtual void DataVector< DaughterContainer, BASE >::setMostDerived ( )
overrideprotectedvirtualinherited

Set m_isMostDerived for this instance and clear it for all bases.

Called from testInsert if the test fails. The flag may not have been set if this container was made via copy construction, so set it appropriately now so we can test again.

◆ shift()

void DataVector< DaughterContainer, BASE >::shift ( size_t pos,
ptrdiff_t offs )
privateinherited

Shift the auxiliary elements of the container.

Parameters
posThe starting index for the shift.
offsThe (signed) amount of the shift.

The elements in the container should have already been shifted; this operation will then adjust the element indices and also shift the elements in the vectors for all aux data items. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

◆ shrink_to_fit()

void DataVector< DaughterContainer, BASE >::shrink_to_fit ( )
inherited

◆ size()

size_type DataVector< DaughterContainer, BASE >::size ( ) const
noexceptinherited

Returns the number of elements in the collection.

Could in principle be inherited from the base class, but redeclared in the derived class to avoid root6 bugs.

◆ sort() [1/2]

void DataVector< DaughterContainer, BASE >::sort ( )
inherited

Sort the container.

This just sorts by pointer value, so it's probably not very useful.

◆ sort() [2/2]

void DataVector< DaughterContainer, BASE >::sort ( COMPARE comp)
inherited

Sort the container with a user-specified comparison operator.

Parameters
compFunctional to compare two values.

◆ stdcont()

const PtrVector & DataVector< DaughterContainer, BASE >::stdcont ( ) const
inherited

Return the underlying std::vector of the container.

Returns
Reference to the std::vector actually holding the collection.

Note that DataVector<T>::stdcont does not necessarily return a std::vector<T*> if DataVector inheritance is being used.

◆ swap()

void DataVector< DaughterContainer, BASE >::swap ( DataVector & rhs)
inherited

Swap this collection with another.

Parameters
rhsThe collection with which to swap.

Ownership is swapped along with the collection content.

Note: this method may only be called using the most-derived DataVector in the hierarchy. The rhs must also be referenced using the most-derived DataVector.

◆ swapElement() [1/5]

void DataVector< DaughterContainer, BASE >::swapElement ( iterator pos,
std::unique_ptr< base_value_type > newElem,
std::unique_ptr< base_value_type > & oldElem )
inherited

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem.

The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataList in the hierarchy.

◆ swapElement() [2/5]

void DataVector< DaughterContainer, BASE >::swapElement ( iterator pos,
value_type newElem,
reference oldElem )
inherited

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataList in the hierarchy.

◆ swapElement() [3/5]

void DataVector< DaughterContainer, BASE >::swapElement ( size_type index,
std::unique_ptr< base_value_type > newElem,
std::unique_ptr< base_value_type > & oldElem )
inherited

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem.

The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElement() [4/5]

void DataVector< DaughterContainer, BASE >::swapElement ( size_type index,
value_type newElem,
reference oldElem )
inherited

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElement() [5/5]

void DataVector< DaughterContainer, typename DataVectorBase<DaughterContainer>::Base >::swapElement ( size_type index,
value_type newElem,
reference oldElem )
inherited

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ testInsert()

void DataVector< DaughterContainer, BASE >::testInsert ( const char * op)
inherited

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

In order to maintain type-safety, we can only allow insertions using the most-derived instance of DataVector. This checks this by testing the m_isMostDerived, which is set by the constructors to true only for the most-derived instance. If the test fails, we call to potentially out-of-line code to continue.

◆ testInsertOol()

void DataVector< DaughterContainer, BASE >::testInsertOol ( const char * op)
inherited

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

This continues the test of testInsert. There is one case where m_isMostDerived may not be set correctly. If this container was made via copy construction, then all the m_isMostDerived flags will be false. So we call setMostDerived to set the flags correctly and test again. If the test fails again, then we raise an exception.

Member Data Documentation

◆ has_virtual

const bool DataVector< DaughterContainer, BASE >::has_virtual
staticinherited

This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class.

Definition at line 802 of file DataVector.h.

◆ m_channelmap

template<class DaughterContainer>
std::vector<const DaughterContainer*> TRTCond::MultChanContainer< DaughterContainer >::m_channelmap
private

cached table for fast access from channel to layercontainer

Definition at line 110 of file MultChanContainer.h.

◆ m_defaultschannelid

template<class DaughterContainer>
const size_t TRTCond::MultChanContainer< DaughterContainer >::m_defaultschannelid = 0
staticprivate

now need various forwarding calls for CondMultChanCollection functionality

channel identifier for the container with the 'default' value

Definition at line 108 of file MultChanContainer.h.

◆ m_impl

CondMultChanCollImpl CondMultChanCollection< DaughterContainer >::m_impl
privateinherited

Definition at line 110 of file CondMultChanCollection.h.

◆ m_isMostDerived

SG::IsMostDerivedFlag DataVector< DaughterContainer, BASE >::m_isMostDerived
privateinherited

This flag is true if this DV instance is the most-derived one.

We set this to true in the top-level constructor; the constructor then calls clearMostDerived on the base classes.

Definition at line 2059 of file DataVector.h.

◆ must_own

bool DataVector< DaughterContainer, BASE >::must_own
staticconstexprinherited

If true, then this type must own its contents.

Definition at line 860 of file DataVector.h.


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