ATLAS Offline Software
Loading...
Searching...
No Matches
TRTCond::StrawDxMultChanContainer Class Reference

Multichannel container for StrawDx objects. More...

#include <StrawDxMultChanContainer.h>

Inheritance diagram for TRTCond::StrawDxMultChanContainer:
Collaboration diagram for TRTCond::StrawDxMultChanContainer:

Public Types

typedef StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::FlatContainer FlatContainer
 typedefs
typedef std::pair< const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > *, const typename StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::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 StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > *& reference
typedef StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > *const & const_reference
typedef BASE::size_type size_type
typedef BASE::difference_type difference_type
typedef StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * value_type
typedef BASE::allocator_type allocator_type
typedef StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > ** pointer
typedef StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > *const * const_pointer
typedef const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * const_value_type
typedef StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEELbase_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

 StrawDxMultChanContainer ()
 constructor
virtual ~StrawDxMultChanContainer ()
 destructor
float getDx1 (const ExpandedIdentifier &id) const
 access to unpacked dx near electronics
float getDx2 (const ExpandedIdentifier &id) const
 access to unpacked dx far from electronics
float getDxErr (const ExpandedIdentifier &id) const
 access to unpacked dx error
void setDx (const ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
 set dx
void unpack (const ExpandedIdentifier &id, float &dx1, float &dx2, float &dxerr) const
 method to unpack a StrawDx object
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.
StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * findContainer (const ExpandedIdentifier &id)
 find a layercontainer from an identifier.
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * getContainer (size_t chanid) const
 get a layercontainer from a channel id.
void set (const ExpandedIdentifier &id, const typename StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::value_type &t)
 set a value
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::value_typeget (const ExpandedIdentifier &id) const
 get a value
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 StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::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.
Element access.

Change the vector capacity to match the current size.

Note: this does not affect auxiliary data.

const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * get (size_type n) const
 Access an element, as an rvalue.
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * get (size_type n) const
 Access an element, as an rvalue.
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * operator[] (size_type n) const
 Access an element, as an rvalue.
ElementProxy operator[] (size_type n)
 Access an element, as an lvalue.
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * operator[] (size_type n) const
 Access an element, as an rvalue.
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * at (size_type n) const
 Access an element, as an rvalue.
ElementProxy at (size_type n)
 Access an element, as an lvalue.
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * at (size_type n) const
 Access an element, as an rvalue.
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * 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 StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * back () const
 Access the last element in the collection as an rvalue.
ElementProxy back ()
 Access the last element in the collection as an lvalue.
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.
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.
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.
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 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, 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.
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 Member Functions

static const char * classname ()
 classname used to talk to iovservice

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 StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::value_typedummyVal () const
 dummy value to return when DaughterContainer is empty

Private Attributes

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

Static Private Attributes

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

Non-standard operations.

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 resize (size_type sz)
void pop_back ()
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.
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 (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.

Internal operations.

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.
static int baseOffset1 (const char *p, const DataVector &dv, const std::type_info &ti)
 Helper for baseOffset.
static const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * do_cast (const typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast.
static StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * do_cast_nc (typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast.
SG::IsMostDerivedFlag m_isMostDerived
 This flag is true if this DV instance is the most-derived one.
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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, DataVector_BASE >::self self
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.

Detailed Description

Multichannel container for StrawDx objects.

Definition at line 28 of file StrawDxMultChanContainer.h.

Member Typedef Documentation

◆ allocator_type

typedef BASE::allocator_type DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::allocator_type
inherited

Definition at line 817 of file DataVector.h.

◆ base_data_vector

typedef DataVector DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::base_data_vector
inherited

Definition at line 854 of file DataVector.h.

◆ base_value_type

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::BaseContainer
inherited

Definition at line 807 of file DataVector.h.

◆ chan_const_iterator

typedef ChanVec::const_iterator CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::chan_const_iterator
inherited

Definition at line 58 of file CondMultChanCollection.h.

◆ chan_iterator

typedef ChanVec::iterator CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::chan_iterator
inherited

Definition at line 59 of file CondMultChanCollection.h.

◆ chan_size_type

typedef ChanVec::size_type CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::chan_size_type
inherited

Definition at line 60 of file CondMultChanCollection.h.

◆ ChanNum

Definition at line 55 of file CondMultChanCollection.h.

◆ ChanVec

Definition at line 56 of file CondMultChanCollection.h.

◆ const_iterator

◆ const_pointer

Definition at line 819 of file DataVector.h.

◆ const_reference

Definition at line 813 of file DataVector.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::const_reverse_iterator
inherited

Standard const_reverse_iterator.

Definition at line 847 of file DataVector.h.

◆ const_value_type

Definition at line 821 of file DataVector.h.

◆ 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::DataVector_BASE
inherited

Definition at line 797 of file DataVector.h.

◆ Deleter

Definition at line 857 of file DataVector.h.

◆ difference_type

typedef BASE::difference_type DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::difference_type
inherited

Definition at line 815 of file DataVector.h.

◆ DVL_BASE

typedef BASE DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::DVL_BASE
inherited

Definition at line 798 of file DataVector.h.

◆ ElementProxy

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

Definition at line 833 of file DataVector.h.

◆ FlatContainer

◆ iov_const_iterator

typedef IOVVec::const_iterator CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::iov_const_iterator
inherited

Definition at line 61 of file CondMultChanCollection.h.

◆ iov_iterator

typedef IOVVec::iterator CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::iov_iterator
inherited

Definition at line 62 of file CondMultChanCollection.h.

◆ iov_size_type

typedef IOVVec::size_type CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::iov_size_type
inherited

Definition at line 63 of file CondMultChanCollection.h.

◆ IOVVec

Definition at line 57 of file CondMultChanCollection.h.

◆ iterator

Standard iterator.

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

Definition at line 842 of file DataVector.h.

◆ pointer

◆ PtrVector

typedef BASE::PtrVector DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::PtrVector
inherited

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

Definition at line 806 of file DataVector.h.

◆ reference

◆ reverse_iterator

typedef std::reverse_iterator<iterator> DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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

◆ size_type

typedef BASE::size_type DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::size_type
inherited

Definition at line 814 of file DataVector.h.

◆ unique_type

typedef std::unique_ptr<base_value_type> DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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

Constructor & Destructor Documentation

◆ StrawDxMultChanContainer()

TRTCond::StrawDxMultChanContainer::StrawDxMultChanContainer ( )
inline

constructor

Definition at line 35 of file StrawDxMultChanContainer.h.

35{}

◆ ~StrawDxMultChanContainer()

virtual TRTCond::StrawDxMultChanContainer::~StrawDxMultChanContainer ( )
inlinevirtual

destructor

Definition at line 38 of file StrawDxMultChanContainer.h.

38{}

Member Function Documentation

◆ add()

Adding in channel numbers.

Definition at line 89 of file CondMultChanCollection.h.

200{
202}
void add(ChanNum chanNum)
Adding in channel numbers.
Class for accessing NestedContainers via channels in a CondMultChanCollection.

◆ addNewStop()

void CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::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{
221}
void addNewStop(const IOVTime &stop)
Add new stop time to minRange - make sure that stop is <= to new stop.

◆ assign() [1/2]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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]

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]

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]

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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]

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]

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()

size_t TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::barrelecindex ( size_t channelid) const
inlineinherited

calculate the barrel-ec index from a channel id.

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

Definition at line 64 of file MultChanContainer.h.

171 {
172 return channelid!=m_defaultschannelid ? (channelid-1)%4 : 99 ;
173 }

◆ baseOffset()

int DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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]

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

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()

Access to Channel numbers via iterators.

Definition at line 69 of file CondMultChanCollection.h.

129{
130 return (m_impl.chan_begin());
131}
chan_const_iterator chan_begin() const
Access to Channel numbers via iterators.

◆ chan_end()

◆ chan_size()

number of channels

Definition at line 73 of file CondMultChanCollection.h.

146{
147 return (m_impl.chan_size());
148}
chan_size_type chan_size() const
number of channels

◆ channelId()

calculate the channel for a given TRT identifier

Definition at line 58 of file MultChanContainer.h.

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

◆ classname()

const char * TRTCond::StrawDxMultChanContainer::classname ( )
inlinestatic

classname used to talk to iovservice

Definition at line 83 of file StrawDxMultChanContainer.h.

83{ return "TRTCond::StrawDxMultChanContainer" ; }

◆ clear() [1/4]

clear all layercontainers

Definition at line 87 of file MultChanContainer.h.

◆ clear() [2/4]

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() [3/4]

◆ clear() [4/4]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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.

◆ clearMostDerived()

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::clearMostDerived ( )
protectedinherited

Clear m_isMostDerived for this instance and for all bases.

Called from the constructor after setting m_isMostDerived.

◆ crbegin()

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()

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()

crunch the layercontainers.

Definition at line 93 of file MultChanContainer.h.

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

◆ do_cast()

const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

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 112 of file MultChanContainer.h.

124 {
126 return dummyVal;
127 }

◆ dv_typeid()

virtual const std::type_info & DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [1/2]

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() [2/2]

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() [1/2]

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.

◆ emplace_back() [2/2]

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::empty ( ) const
nodiscardnoexceptinherited

Returns true if the collection is empty.

◆ end() [1/2]

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]

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]

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]

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()

find a layercontainer from an identifier.

create it if it does not exist

Definition at line 67 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 }
StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * findContainer(const ExpandedIdentifier &id)

◆ footprint()

size_t TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::footprint ( ) const
inlineinherited

return the memory allocated by the layercontainers.

It does not add the footprint of the CondMultChanCollection itself.

Definition at line 90 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]

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]

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/3]

get a value

Definition at line 77 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 StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * front() const
const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > * getContainer(size_t chanid) const
const DaughterContainer::value_type & get(const ExpandedIdentifier &id) const
get a value

◆ get() [2/3]

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/3]

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).

◆ getall()

get a flat vector with all values.

used for storing constants in a txtfile.

Definition at line 102 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.
void getall(typename DaughterContainer::FlatContainer &entries) const
get a flat vector with all values.

◆ getContainer()

get a layercontainer from a channel id.

uses cache for fast access.

Definition at line 71 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)
220 }

◆ getDx1()

float TRTCond::StrawDxMultChanContainer::getDx1 ( const ExpandedIdentifier & id) const
inline

access to unpacked dx near electronics

Definition at line 41 of file StrawDxMultChanContainer.h.

41 {
42 ContainerWithValue valwithcontainer = getWithContainer( id ) ;
43 return StrawDxTrait::isvalid(*valwithcontainer.second) ? valwithcontainer.first->unpackDx1( *valwithcontainer.second ) : 0 ;
44 }
std::pair< const StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > *, const typename StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >::value_type * > ContainerWithValue
static bool isvalid(const StrawDx &x)

◆ getDx2()

float TRTCond::StrawDxMultChanContainer::getDx2 ( const ExpandedIdentifier & id) const
inline

access to unpacked dx far from electronics

Definition at line 46 of file StrawDxMultChanContainer.h.

46 {
47 ContainerWithValue valwithcontainer = getWithContainer( id ) ;
48 return StrawDxTrait::isvalid(*valwithcontainer.second) ? valwithcontainer.first->unpackDx2( *valwithcontainer.second ) : 0 ;
49 }

◆ getDxErr()

float TRTCond::StrawDxMultChanContainer::getDxErr ( const ExpandedIdentifier & id) const
inline

access to unpacked dx error

Definition at line 52 of file StrawDxMultChanContainer.h.

52 {
53 ContainerWithValue valwithcontainer = getWithContainer( id ) ;
54 return StrawDxTrait::isvalid(*valwithcontainer.second) ? valwithcontainer.first->unpackDxErr( *valwithcontainer.second ) : 0 ;
55 }

◆ getWithContainer()

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

Definition at line 84 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 }

◆ hasUniqueIOV()

bool CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::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}
bool hasUniqueIOV() const
Check whether there is a unique IOV for all channels.

◆ implementation()

Get implementation.

Definition at line 106 of file CondMultChanCollection.h.

247{
248 return &m_impl;
249}

◆ initialize()

StatusCode TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::initialize ( )
virtualinherited

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

Reimplemented from CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >.

Definition at line 54 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
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 }
void resize(size_type sz)
Resizes the collection to the specified number of elements.
void clear()
clear all layercontainers

◆ insert() [1/8]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [2/8]

iterator DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [3/8]

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.

◆ insert() [4/8]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [5/8]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [6/8]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [7/8]

iterator DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [8/8]

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

Access to IOVs via iterators.

Definition at line 76 of file CondMultChanCollection.h.

156{
157 return (m_impl.iov_begin());
158}
iov_const_iterator iov_begin() const
Access to IOVs via iterators.

◆ iov_end()

◆ iov_size()

number of IOVs

number of iovs

Definition at line 80 of file CondMultChanCollection.h.

173{
174 return (m_impl.iov_size());
175}
iov_size_type iov_size() const
number of IOVs

◆ iter_swap()

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

size_t TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::layerwheelindex ( size_t channelid) const
inlineinherited

calculate layer or wheel index from a channel id

Definition at line 61 of file MultChanContainer.h.

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

◆ max_size()

size_type DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::max_size ( ) const
noexceptinherited

Returns the size() of the largest possible collection.

◆ minRange()

Current minimal IOVRange.

Definition at line 83 of file CondMultChanCollection.h.

182{
183 return (m_impl.minRange());
184}
IOVRange minRange() const
Current minimal IOVRange.

◆ numObjects()

total number of valid calibration objects

Definition at line 99 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[]() [1/3]

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]

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]

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()

Return the ownership policy setting for this container.

◆ pop_back() [1/2]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::pop_back ( )
inherited

◆ print()

dump to standard output

Definition at line 96 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/4]

value_type DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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/4]

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_back() [3/4]

value_type DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [4/4]

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]

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]

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]

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]

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]

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]

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()

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

Parameters
nNumber of elements required.

◆ resetChannelNumbers()

void CondMultChanCollection< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::resetChannelNumbers ( )
inlineinherited

Reset channel numbers - needed to allow sorting.

Definition at line 103 of file CondMultChanCollection.h.

238{
240}
void resetChannelNumbers()
Reset channel numbers - needed to allow sorting.

◆ resize() [1/2]

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]

◆ resortAux()

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

set a value

Definition at line 74 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 }

◆ setDx()

void TRTCond::StrawDxMultChanContainer::setDx ( const ExpandedIdentifier & id,
float dx1,
float dx2,
float dxerr )
inline

set dx

Definition at line 58 of file StrawDxMultChanContainer.h.

58 {
60 findContainer(id)->setDx(dx1,dx2,dxerr) ;
61 } else if( id.level()==ExpandedIdentifier::BARRELEC ) {
62 MsgStream log(Athena::getMessageSvc(),"StrawDxMultChanContainer");
63 log << MSG::WARNING << "Sorry: cannot store containers at BARREL_EC granularity" << endmsg ;
64 } else {
65 findContainer(id)->setDx( id, dx1, dx2, dxerr) ;
66 }
67 }
#define endmsg
void setDx(const ExpandedIdentifier &id, float dx1, float dx2, float dxerr)
set dx
IMessageSvc * getMessageSvc(bool quiet=false)

◆ setMostDerived()

virtual void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::shrink_to_fit ( )
inherited

◆ size()

size_type DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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]

Sort the container.

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

◆ sort() [2/2]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, BASE >::sort ( COMPARE comp)
inherited

Sort the container with a user-specified comparison operator.

Parameters
compFunctional to compare two values.

◆ stdcont()

const PtrVector & DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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()

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/9]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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/9]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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/9]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [4/9]

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/9]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [6/9]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [7/9]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [8/9]

void DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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() [9/9]

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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.

◆ unpack()

void TRTCond::StrawDxMultChanContainer::unpack ( const ExpandedIdentifier & id,
float & dx1,
float & dx2,
float & dxerr ) const
inline

method to unpack a StrawDx object

Definition at line 70 of file StrawDxMultChanContainer.h.

70 {
71 const StrawDxLayerContainer* container = getContainer(channelId(id)) ;
72 if(container==nullptr) {
73 MsgStream log(Athena::getMessageSvc(),"StrawDxMultChanContainer");
74 log << MSG::ERROR << "cannot find container channel " << channelId(id) << endmsg;
75 } else{
76 dx1 = container->getDx1(id);
77 dx2 = container->getDx2(id);
78 dxerr = container->getDxErr(id);
79 }
80 }
StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > StrawDxLayerContainer

Member Data Documentation

◆ has_virtual

const bool DataVector< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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

cached table for fast access from channel to layercontainer

Definition at line 110 of file MultChanContainer.h.

◆ m_defaultschannelid

const size_t TRTCond::MultChanContainer< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL > >::m_defaultschannelid
staticprivateinherited

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

◆ m_isMostDerived

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< StrawDxContainerTemplate< ExpandedIdentifier::LAYERWHEEL >, 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: