ATLAS Offline Software
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
xAOD::CaloTowerContainer_v1 Class Reference

Basic container storing all information need for xAOD::CaloTower_v1 objects. More...

#include <CaloTowerContainer_v1.h>

Inheritance diagram for xAOD::CaloTowerContainer_v1:
Collaboration diagram for xAOD::CaloTowerContainer_v1:

Public Types

typedef BASE DataVector_BASE
 
typedef BASE DVL_BASE
 
typedef BASE::PtrVector PtrVector
 This is the type of the underlying std::vector (what stdcont returns). More...
 
typedef BASE::PtrVector BaseContainer
 
typedef T *& reference
 
typedef T *constconst_reference
 
typedef BASE::size_type size_type
 
typedef BASE::difference_type difference_type
 
typedef T * value_type
 
typedef BASE::allocator_type allocator_type
 
typedef T ** pointer
 
typedef T *constconst_pointer
 
typedef const T * const_value_type
 
typedef T base_value_type
 The T value used as the template parameter. More...
 
typedef std::unique_ptr< base_value_typeunique_type
 Type of a unique_ptr that can be used to insert elements into this container. More...
 
typedef DataModel_detail::ElementProxy< DataVectorElementProxy
 This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership. More...
 
typedef DataModel_detail::const_iterator< DataVectorconst_iterator
 Standard const_iterator. More...
 
typedef DataModel_detail::iterator< DataVectoriterator
 Standard iterator. More...
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Standard const_reverse_iterator. More...
 
typedef std::reverse_iterator< iteratorreverse_iterator
 Standard reverse_iterator. More...
 
typedef DataVector base_data_vector
 
using Deleter = typename BASE::Deleter
 
typedef DataVector< T, BASE > self
 A helper typedef. More...
 

Public Member Functions

 CaloTowerContainer_v1 (SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Default constructor Constructs a tower container without structure (binning) or content. More...
 
 CaloTowerContainer_v1 (int nEtaBins, double etaMin, double etaMax, int nPhiBins, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 Loaded constructor. More...
 
 ~CaloTowerContainer_v1 ()
 Destructor. More...
 
Container management

Configure the tower grid with individual parameters

Note
Invoking the configureGrid method is mandatory to set up a valid tower grid, if the CaloTowerContainer_v1 is constructed with the default constructor.
Parameters
[in]nEtaBinsnumber of bins in pseudorapidity
[in]etaMinlower boundary of pseudorapidity range
[in]etaMaxupper boundary of pseudorapidity range
[in]nPhiBinsnumber of bins in azimuth
Note
The \( \phi \) boundaries are hardcoded to \( [-\pi,\pi] \)
This method will internally invoke CaloTowerContainer_v1::configureGrid() method.
bool configureGrid (int nEtaBins, double etaMin, double etaMax, int nPhiBins)
 
Tower grid description accessors
int nEtaBins () const
 
double etaMin () const
 

More...
 
double etaMax () const
 

More...
 
double deltaEta () const
 

More...
 
int nPhiBins () const
 

More...
 
double phiMin () const
 

More...
 
double phiMax () const
 

More...
 
double deltaPhi () const
 

More...
 
int nTowers () const
 

More...
 
Conversion to/from indices

Returns the nominal number of towers

int index (double eta, double phi) const
 
double eta (size_t index) const
 
double phi (size_t index) const
 
const CaloTower_v1tower (double eta, double phi) const
 

Public Attributes

ROOT_SELECTION_NS::MemberAttributes< kTransient > m_isMostDerived
 Automatically generate dictionary for contained vector. More...
 
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_deleter
 
ROOT_SELECTION_NS::MemberAttributes< kTransient > m_ownPolicy
 We do not want to save this. More...
 

Static Public Attributes

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

Private Member Functions

bool configureGrid ()
 

Private Attributes

Towerdescription
unsigned short m_nEtaBins
 
double m_etaMin
 

More...
 
double m_etaMax
 

More...
 
unsigned short m_nPhiBins
 

More...
 
double m_deltaEta
 

More...
 
double m_deltaPhi
 

More...
 
bool m_isConfigured = false
 

More...
 

Swap and sort.

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

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. More...
 
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. More...
 
void clear ()
 
void clear (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy trackIndices=SG::DEFAULT_TRACK_INDICES)
 
void swapElement (size_type index, value_type newElem, reference oldElem)
 Swap one element out of the container. More...
 
void swapElement (iterator pos, value_type newElem, reference oldElem)
 Swap one element out of the container. More...
 
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. More...
 
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. More...
 
virtual const DataModel_detail::DVLInfoBasedvlinfo_v () const
 Return the DV/DL info struct for this class. More...
 
const SG::AuxVectorBaseauxbase () const
 Convert to AuxVectorBase. More...
 
size_type max_size () const noexcept
 Returns the size() of the largest possible collection. More...
 
size_type capacity () const noexcept
 Returns the total number of elements that the collection can hold before needing to allocate more memory. More...
 
bool empty () const noexcept
 Returns true if the collection is empty. More...
 
void shrink_to_fit ()
 
const PtrVectorstdcont () const
 Return the underlying std::vector of the container. More...
 
SG::OwnershipPolicy ownPolicy () const
 Return the ownership policy setting for this container. More...
 
static const DataModel_detail::DVLInfoBasedvlinfo ()
 Return the DV/DL info struct for this class. More...
 
static int baseOffset (const std::type_info &ti)
 Return the offset of a base DataVector class. More...
 

Internal operations.

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

Detailed Description

Basic container storing all information need for xAOD::CaloTower_v1 objects.

This container does not only provide the store for CaloTower_v1 object, but also all meta-data needed to provide the tower grid and kinematics. The tower grid is defined in terms of pseudorapidity ( \( \eta \)) and azimuth ( \( \phi \)). In this it follows the CaloCell direction descriptors. As calorimeter towers represented by xAOD::CaloTower_v1 objects are by definition massless, any four-momentum representation extracted from a calorimeter tower (a bin in tower grid specified by this container) yields \( y = \eta \) for rapidity \( y \).

There is no need to rebuild this container event-by-event, because the direction of any given tower never changes, only its energy content; the direction is related to the tower's index in the container.

Usage default tower grid version (without the code recording in the event store):

// create an empty container
// allocate the auxiliary store
// associate the two containers
towCont->setStore(towAuxCont);
// configure with a typical hadronic tower grid (0.1 x 0.1) and fill in empty CaloTowers
towCont->configureGrid(100,-5.,5.,64);

Definition at line 20 of file CaloTowerContainer_v1.h.

Member Typedef Documentation

◆ allocator_type

template<class T , class BASE >
typedef BASE::allocator_type DataVector< T, BASE >::allocator_type
inherited

Definition at line 816 of file DataVector.h.

◆ base_data_vector

template<class T , class BASE >
typedef DataVector DataVector< T, BASE >::base_data_vector
inherited

Definition at line 853 of file DataVector.h.

◆ base_value_type

template<class T , class BASE >
typedef T DataVector< T, 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 824 of file DataVector.h.

◆ BaseContainer

template<class T , class BASE >
typedef BASE::PtrVector DataVector< T, BASE >::BaseContainer
inherited

Definition at line 806 of file DataVector.h.

◆ const_iterator

template<class T , class BASE >
typedef DataModel_detail::const_iterator<DataVector> DataVector< T, BASE >::const_iterator
inherited

Standard const_iterator.

Definition at line 837 of file DataVector.h.

◆ const_pointer

template<class T , class BASE >
typedef T* const* DataVector< T, BASE >::const_pointer
inherited

Definition at line 818 of file DataVector.h.

◆ const_reference

template<class T , class BASE >
typedef T* const& DataVector< T, BASE >::const_reference
inherited

Definition at line 812 of file DataVector.h.

◆ const_reverse_iterator

template<class T , class BASE >
typedef std::reverse_iterator<const_iterator> DataVector< T, BASE >::const_reverse_iterator
inherited

Standard const_reverse_iterator.

Definition at line 846 of file DataVector.h.

◆ const_value_type

template<class T , class BASE >
typedef const T* DataVector< T, BASE >::const_value_type
inherited

Definition at line 820 of file DataVector.h.

◆ DataVector_BASE

template<class T , class BASE >
typedef BASE DataVector< T, BASE >::DataVector_BASE
inherited

Definition at line 796 of file DataVector.h.

◆ Deleter

template<class T , class BASE >
using DataVector< T, BASE >::Deleter = typename BASE::Deleter
inherited

Definition at line 856 of file DataVector.h.

◆ difference_type

template<class T , class BASE >
typedef BASE::difference_type DataVector< T, BASE >::difference_type
inherited

Definition at line 814 of file DataVector.h.

◆ DVL_BASE

template<class T , class BASE >
typedef BASE DataVector< T, BASE >::DVL_BASE
inherited

Definition at line 797 of file DataVector.h.

◆ ElementProxy

template<class T , class BASE >
typedef DataModel_detail::ElementProxy<DataVector> DataVector< T, BASE >::ElementProxy
inherited

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

Definition at line 832 of file DataVector.h.

◆ iterator

template<class T , class BASE >
typedef DataModel_detail::iterator<DataVector> DataVector< T, BASE >::iterator
inherited

Standard iterator.

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

Definition at line 841 of file DataVector.h.

◆ pointer

template<class T , class BASE >
typedef T** DataVector< T, BASE >::pointer
inherited

Definition at line 817 of file DataVector.h.

◆ PtrVector

template<class T , class BASE >
typedef BASE::PtrVector DataVector< T, BASE >::PtrVector
inherited

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

Definition at line 805 of file DataVector.h.

◆ reference

template<class T , class BASE >
typedef T*& DataVector< T, BASE >::reference
inherited

Definition at line 811 of file DataVector.h.

◆ reverse_iterator

template<class T , class BASE >
typedef std::reverse_iterator<iterator> DataVector< T, BASE >::reverse_iterator
inherited

Standard reverse_iterator.

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

Definition at line 851 of file DataVector.h.

◆ self [1/2]

template<class T , class BASE >
typedef ROOT_SELECTION_NS::DataVector<T, DataVector_BASE>::self DataVector< T, BASE >::self
privateinherited

Definition at line 2042 of file DataVector.h.

◆ self [2/2]

template<class T , class BASE >
typedef DataVector< T, BASE > DataVector< T, BASE >::self
inherited

A helper typedef.

Definition at line 3428 of file DataVector.h.

◆ size_type

template<class T , class BASE >
typedef BASE::size_type DataVector< T, BASE >::size_type
inherited

Definition at line 813 of file DataVector.h.

◆ unique_type

template<class T , class BASE >
typedef std::unique_ptr<base_value_type> DataVector< T, BASE >::unique_type
inherited

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

Definition at line 828 of file DataVector.h.

◆ value_type

template<class T , class BASE >
typedef T* DataVector< T, BASE >::value_type
inherited

Definition at line 815 of file DataVector.h.

Constructor & Destructor Documentation

◆ CaloTowerContainer_v1() [1/2]

xAOD::CaloTowerContainer_v1::CaloTowerContainer_v1 ( SG::OwnershipPolicy  ownPolicy = SG::OWN_ELEMENTS,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES 
)

Default constructor Constructs a tower container without structure (binning) or content.

The configureGrid method has to be called after this container is instantiated and an auxiliary store is assigned.

Arguments correspond to the DataVector constructor:

Parameters
[in]ownPolicyownership policy tag (default owns its elements)
[in]trackIndicestracking indicies policy (default track indices)

Definition at line 23 of file CaloTowerContainer_v1.cxx.

24  : CaloTowerContainerBase_v1(ownPolicy,trackIndices)
25  , m_nEtaBins(0)
26  , m_etaMin(0)
27  , m_etaMax(0)
28  , m_nPhiBins(0)
29  , m_deltaEta(0.)
30  , m_deltaPhi(0.)
31  , m_isConfigured(false)
32 { }

◆ CaloTowerContainer_v1() [2/2]

xAOD::CaloTowerContainer_v1::CaloTowerContainer_v1 ( int  nEtaBins,
double  etaMin,
double  etaMax,
int  nPhiBins,
SG::OwnershipPolicy  ownPolicy = SG::OWN_ELEMENTS,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES 
)

Loaded constructor.

Constructs a configured CaloTowerContainer_v1 object with tower grid parameters

Note
Invoking the CaloTowerContainer_v1::configureGrid method will do nothing - the tower grid cannot be overwritten when using this constructor.
The \( \phi \) boundaries are hardcoded to \( [-\pi,\pi] \)
Parameters
[in]nEtaBinsnumber of \( \eta \) bins
[in]etaMinlower boundary of \( \eta \) range
[in]etaMaxupper boundary of \( \eta \) range
[in]nPhiBinsnumber of \( \phi \) bins (default 64)
[in]towDescrreference to non-modifiable CaloTowerDescriptor
[in]ownPolicyownership policy tag (default owns its elements)
[in]trackIndicestracking indicies policy (default track indices)

Definition at line 13 of file CaloTowerContainer_v1.cxx.

14  : CaloTowerContainerBase_v1(ownPolicy,trackIndices)
16  , m_etaMin(etaMin)
17  , m_etaMax(etaMax)
19  , m_deltaEta(0.)
20  , m_deltaPhi(0.)
21 { this->configureGrid(); }

◆ ~CaloTowerContainer_v1()

xAOD::CaloTowerContainer_v1::~CaloTowerContainer_v1 ( )

Destructor.

Definition at line 36 of file CaloTowerContainer_v1.cxx.

37 { }

Member Function Documentation

◆ assign() [1/2]

template<class T , class BASE >
template<class InputIterator >
void DataVector< T, 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]

template<class T , class BASE >
void DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, 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]

template<class T , class BASE >
void DataVector< T, 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]

template<class T , class BASE >
void DataVector< T, 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/2]

template<class T , class BASE >
ElementProxy DataVector< T, 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/2]

template<class T , class BASE >
const T* DataVector< T, 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()

template<class T , class BASE >
const SG::AuxVectorBase& DataVector< T, 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]

template<class T , class BASE >
ElementProxy DataVector< T, 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]

template<class T , class BASE >
const T* DataVector< T, 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.

◆ baseOffset()

template<class T , class BASE >
static int DataVector< T, 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()

template<class T , class BASE >
static int DataVector< T, BASE >::baseOffset1 ( const char *  p,
const DataVector< T, BASE > &  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]

template<class T , class BASE >
const_iterator DataVector< T, 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]

template<class T , class BASE >
iterator DataVector< T, 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()

template<class T , class BASE >
size_type DataVector< T, BASE >::capacity ( ) const
noexceptinherited

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

◆ cbegin()

template<class T , class BASE >
const_iterator DataVector< T, 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()

template<class T , class BASE >
const_iterator DataVector< T, 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.

◆ clear() [1/6]

template<class T , class BASE >
void DataVector< T, BASE >::clear ( )
inherited

Erase all the elements in the collection.

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

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.

Parameters
ownPolicyThe new ownership policy of the container.
trackIndicesThe index tracking policy.

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

template<class T , class BASE >
void DataVector< T, BASE >::clear ( )
inherited

◆ clear() [3/6]

template<class T , class BASE >
void DataVector< T, 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() [4/6]

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

◆ clear() [5/6]

template<class T , class BASE >
void DataVector< T, BASE >::clear ( SG::OwnershipPolicy  ownPolicy,
SG::IndexTrackingPolicy  trackIndices = SG::DEFAULT_TRACK_INDICES 
)
inherited

◆ clear() [6/6]

template<class T , class BASE >
void DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, BASE >::clearMostDerived ( )
protectedinherited

Clear m_isMostDerived for this instance and for all bases.

Called from the constructor after setting m_isMostDerived.

◆ configureGrid() [1/2]

bool xAOD::CaloTowerContainer_v1::configureGrid ( )
private

Definition at line 51 of file CaloTowerContainer_v1.cxx.

52 {
53  if (m_nEtaBins > 0 && m_etaMin < m_etaMax && m_nPhiBins > 0) {
56  m_isConfigured=true;
57  }
58  else
59  m_isConfigured=false;
60  return m_isConfigured;
61 
62 }

◆ configureGrid() [2/2]

bool xAOD::CaloTowerContainer_v1::configureGrid ( int  nEtaBins,
double  etaMin,
double  etaMax,
int  nPhiBins 
)

Definition at line 39 of file CaloTowerContainer_v1.cxx.

40 {
41  // reject configuration update!
42  if ( m_isConfigured ) { return false; }
43  // store configuration
45  m_etaMin = etaMin;
46  m_etaMax = etaMax;
48  return this->configureGrid();
49 }

◆ crbegin()

template<class T , class BASE >
const_reverse_iterator DataVector< T, 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()

template<class T , class BASE >
const_reverse_iterator DataVector< T, 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.

◆ deltaEta()

double xAOD::CaloTowerContainer_v1::deltaEta ( ) const
inline

Returns upper boudnary of \( \eta \) range

Definition at line 151 of file CaloTowerContainer_v1.h.

151 { return m_deltaEta; }

◆ deltaPhi()

double xAOD::CaloTowerContainer_v1::deltaPhi ( ) const
inline

Returns upper boundary of \( \phi \) range

Definition at line 155 of file CaloTowerContainer_v1.h.

155 { return m_deltaPhi; }

◆ do_cast()

template<class T , class BASE >
static const T* DataVector< T, 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()

template<class T , class BASE >
static T* DataVector< T, 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.

◆ dv_typeid()

template<class T , class BASE >
virtual const std::type_info& DataVector< T, BASE >::dv_typeid ( ) const
privatevirtualinherited

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

template<class T , class BASE >
static const DataModel_detail::DVLInfoBase& DataVector< T, 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()

template<class T , class BASE >
virtual const DataModel_detail::DVLInfoBase& DataVector< T, BASE >::dvlinfo_v ( ) const
virtualinherited

Return the DV/DL info struct for this class.

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

◆ emplace()

template<class T , class BASE >
iterator DataVector< T, 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()

template<class T , class BASE >
value_type DataVector< T, 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()

template<class T , class BASE >
bool DataVector< T, BASE >::empty ( ) const
noexceptinherited

Returns true if the collection is empty.

◆ end() [1/2]

template<class T , class BASE >
const_iterator DataVector< T, 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]

template<class T , class BASE >
iterator DataVector< T, 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]

template<class T , class BASE >
iterator DataVector< T, 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]

template<class T , class BASE >
iterator DataVector< T, 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.

◆ eta()

double xAOD::CaloTowerContainer_v1::eta ( size_t  index) const

Definition at line 77 of file CaloTowerContainer_v1.cxx.

77  {
78 
79  assert((int)index < m_nPhiBins * m_nEtaBins);
80 
81  int ieta=index/m_nPhiBins;
82  return (0.5+ieta)*m_deltaEta+m_etaMin;
83 }

◆ etaMax()

double xAOD::CaloTowerContainer_v1::etaMax ( ) const
inline

Returns lower boundary of \( \eta \) range

Definition at line 150 of file CaloTowerContainer_v1.h.

150 { return m_etaMax; }

◆ etaMin()

double xAOD::CaloTowerContainer_v1::etaMin ( ) const
inline

Returns number of \( \eta \) bins

Definition at line 149 of file CaloTowerContainer_v1.h.

149 { return m_etaMin; }

◆ front() [1/2]

template<class T , class BASE >
ElementProxy DataVector< T, 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]

template<class T , class BASE >
const T* DataVector< T, 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()

template<class T , class BASE >
const T* DataVector< T, 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).

◆ index()

int xAOD::CaloTowerContainer_v1::index ( double  eta,
double  phi 
) const

Definition at line 65 of file CaloTowerContainer_v1.cxx.

65  {
66  if (eta<m_etaMin || eta>m_etaMax) {
68  }
70  // int iphi=(phi-m_phiMin)/m_deltaPhi;
71  int iphi=(phi+M_PI)/m_deltaPhi;
72  int ieta=(eta-m_etaMin)/m_deltaEta;
73  return ieta*m_nPhiBins+iphi;
74 }

◆ insert() [1/5]

template<class T , class BASE >
template<class InputIterator , DataVector_detail::enable_if_ptr_itr< InputIterator, T > = true>
void DataVector< T, 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]

template<class T , class BASE >
template<class InputIterator , DataVector_detail::enable_if_up_itr< InputIterator, T > = true>
void DataVector< T, 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]

template<class T , class BASE >
void DataVector< T, 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]

template<class T , class BASE >
iterator DataVector< T, 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]

template<class T , class BASE >
iterator DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, BASE >::insertMove ( iterator  position,
DataVector< T, BASE > &  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.

◆ iter_swap()

template<class T , class BASE >
static void DataVector< T, 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.

◆ max_size()

template<class T , class BASE >
size_type DataVector< T, BASE >::max_size ( ) const
noexceptinherited

Returns the size() of the largest possible collection.

◆ nEtaBins()

int xAOD::CaloTowerContainer_v1::nEtaBins ( ) const
inline

Definition at line 145 of file CaloTowerContainer_v1.h.

145 { return m_nEtaBins; }

◆ nPhiBins()

int xAOD::CaloTowerContainer_v1::nPhiBins ( ) const
inline

Returns grid size in \( \eta \)

Definition at line 146 of file CaloTowerContainer_v1.h.

146 { return m_nPhiBins; }

◆ nTowers()

int xAOD::CaloTowerContainer_v1::nTowers ( ) const
inline

Returns grid size in \( \phi \)

Definition at line 147 of file CaloTowerContainer_v1.h.

147 { return m_nEtaBins*m_nPhiBins;}

◆ operator[]() [1/2]

template<class T , class BASE >
ElementProxy DataVector< T, 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/2]

template<class T , class BASE >
const T* DataVector< T, 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()

template<class T , class BASE >
SG::OwnershipPolicy DataVector< T, BASE >::ownPolicy ( ) const
inherited

Return the ownership policy setting for this container.

◆ phi()

double xAOD::CaloTowerContainer_v1::phi ( size_t  index) const

Definition at line 86 of file CaloTowerContainer_v1.cxx.

86  {
87 
88  assert((int)index < m_nPhiBins * m_nEtaBins);
89 
90  int iphi=index % m_nPhiBins;
91  return (0.5 + iphi)*m_deltaPhi-M_PI;
92 }

◆ phiMax()

double xAOD::CaloTowerContainer_v1::phiMax ( ) const
inline

Returns lower boundary of \( \phi \) range

Definition at line 154 of file CaloTowerContainer_v1.h.

154 { return M_PI; }

◆ phiMin()

double xAOD::CaloTowerContainer_v1::phiMin ( ) const
inline

Returns number of \( \phi \) bins

Definition at line 153 of file CaloTowerContainer_v1.h.

153 { return -M_PI; }

◆ pop_back() [1/2]

template<class T , class BASE >
void DataVector< T, 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]

template<class T , class BASE >
void DataVector< T, BASE >::pop_back ( )
inherited

◆ push_back() [1/2]

template<class T , class BASE >
value_type DataVector< T, 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]

template<class T , class BASE >
value_type DataVector< T, 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.

◆ rbegin() [1/2]

template<class T , class BASE >
const_reverse_iterator DataVector< T, 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]

template<class T , class BASE >
reverse_iterator DataVector< T, 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]

template<class T , class BASE >
const_reverse_iterator DataVector< T, 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]

template<class T , class BASE >
reverse_iterator DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, BASE >::reserve ( size_type  n)
inherited

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

Parameters
nNumber of elements required.

◆ resize() [1/2]

template<class T , class BASE >
void DataVector< T, 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]

template<class T , class BASE >
void DataVector< T, BASE >::resize ( size_type  sz)
inherited

◆ resortAux()

template<class T , class BASE >
void DataVector< T, 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.

◆ setMostDerived()

template<class T , class BASE >
virtual void DataVector< T, BASE >::setMostDerived ( )
protectedvirtualinherited

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

template<class T , class BASE >
void DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, BASE >::shrink_to_fit ( )
inherited

◆ size()

template<class T , class BASE >
size_type DataVector< T, 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]

template<class T , class BASE >
void DataVector< T, BASE >::sort ( )
inherited

Sort the container.

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

◆ sort() [2/2]

template<class T , class BASE >
template<class COMPARE >
void DataVector< T, BASE >::sort ( COMPARE  comp)
inherited

Sort the container with a user-specified comparison operator.

Parameters
compFunctional to compare two values.

◆ stdcont()

template<class T , class BASE >
const PtrVector & DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, BASE >::swap ( DataVector< T, BASE > &  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/4]

template<class T , class BASE >
void DataVector< T, 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/4]

template<class T , class BASE >
void DataVector< T, 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/4]

template<class T , class BASE >
void DataVector< T, 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/4]

template<class T , class BASE >
void DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, 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()

template<class T , class BASE >
void DataVector< T, 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.

◆ tower()

const xAOD::CaloTower_v1 * xAOD::CaloTowerContainer_v1::tower ( double  eta,
double  phi 
) const
inline

Definition at line 157 of file CaloTowerContainer_v1.h.

157  {
158  int idx=index(eta,phi);
159  if (idx>0 && idx<(int)this->size()) {
160  return (*this)[idx];
161  }
162 
163  return nullptr;
164 }

Member Data Documentation

◆ has_virtual

template<class T , class BASE >
const bool DataVector< T, BASE >::has_virtual = 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 801 of file DataVector.h.

◆ m_deleter

template<class T , class BASE >
ROOT_SELECTION_NS::MemberAttributes< kTransient > DataVector< T, BASE >::m_deleter
inherited

Definition at line 3436 of file DataVector.h.

◆ m_deltaEta

double xAOD::CaloTowerContainer_v1::m_deltaEta
private

Number of bins in azimuth

Definition at line 108 of file CaloTowerContainer_v1.h.

◆ m_deltaPhi

double xAOD::CaloTowerContainer_v1::m_deltaPhi
private

Bin width in pseudorapidity

Definition at line 109 of file CaloTowerContainer_v1.h.

◆ m_etaMax

double xAOD::CaloTowerContainer_v1::m_etaMax
private

Lower boundary pseudorapidity range

Definition at line 106 of file CaloTowerContainer_v1.h.

◆ m_etaMin

double xAOD::CaloTowerContainer_v1::m_etaMin
private

Number of pseudorapidity bins

Definition at line 105 of file CaloTowerContainer_v1.h.

◆ m_isConfigured

bool xAOD::CaloTowerContainer_v1::m_isConfigured = false
private

Bin width in azimuth

Definition at line 110 of file CaloTowerContainer_v1.h.

◆ m_isMostDerived [1/2]

template<class T , class BASE >
SG::IsMostDerivedFlag DataVector< T, 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 2038 of file DataVector.h.

◆ m_isMostDerived [2/2]

template<class T , class BASE >
ROOT_SELECTION_NS::MemberAttributes< kTransient > DataVector< T, BASE >::m_isMostDerived
inherited

Automatically generate dictionary for contained vector.

Declare the automatically created variable transient

Definition at line 3435 of file DataVector.h.

◆ m_nEtaBins

unsigned short xAOD::CaloTowerContainer_v1::m_nEtaBins
private

Definition at line 104 of file CaloTowerContainer_v1.h.

◆ m_nPhiBins

unsigned short xAOD::CaloTowerContainer_v1::m_nPhiBins
private

Upper boundary pseudorapidity range

Definition at line 107 of file CaloTowerContainer_v1.h.

◆ m_ownPolicy

template<class T , class BASE >
ROOT_SELECTION_NS::MemberAttributes< kTransient > DataVector< T, BASE >::m_ownPolicy
inherited

We do not want to save this.

The P->T converter should decide the ownership mode.

Definition at line 3440 of file DataVector.h.

◆ must_own

template<class T , class BASE >
constexpr bool DataVector< T, BASE >::must_own = BASE::must_own
staticconstexprinherited

If true, then this type must own its contents.

Definition at line 859 of file DataVector.h.


The documentation for this class was generated from the following files:
xAOD::CaloTowerContainer_v1::m_deltaEta
double m_deltaEta
Definition: CaloTowerContainer_v1.h:108
xAOD::CaloTowerAuxContainer
CaloTowerAuxContainer_v1 CaloTowerAuxContainer
Definition: CaloTowerAuxContainer.h:14
xAOD::CaloTowerContainer_v1
Basic container storing all information need for xAOD::CaloTower_v1 objects.
Definition: CaloTowerContainer_v1.h:21
index
Definition: index.py:1
xAOD::CaloTowerAuxContainer_v1
Payload container for xAOD::CaloTowerContainer_v1.
Definition: CaloTowerAuxContainer_v1.h:17
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::CaloTowerContainer_v1::m_etaMax
double m_etaMax
Definition: CaloTowerContainer_v1.h:106
xAOD::CaloTowerContainer_v1::configureGrid
bool configureGrid()
Definition: CaloTowerContainer_v1.cxx:51
xAOD::CaloTowerContainer_v1::m_deltaPhi
double m_deltaPhi
Definition: CaloTowerContainer_v1.h:109
xAOD::CaloTowerContainer_v1::nEtaBins
int nEtaBins() const
Definition: CaloTowerContainer_v1.h:145
xAOD::CaloTowerContainer_v1::m_isConfigured
bool m_isConfigured
Definition: CaloTowerContainer_v1.h:110
xAOD::CaloTower_v1::INVALIDINDEX
@ INVALIDINDEX
Definition: CaloTower_v1.h:22
xAOD::CaloTowerContainer_v1::m_nPhiBins
unsigned short m_nPhiBins
Definition: CaloTowerContainer_v1.h:107
xAOD::CaloTowerContainer_v1::m_nEtaBins
unsigned short m_nEtaBins
Definition: CaloTowerContainer_v1.h:104
xAOD::CaloTowerContainer_v1::m_etaMin
double m_etaMin
Definition: CaloTowerContainer_v1.h:105
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:25
xAOD::CaloTowerContainer_v1::etaMin
double etaMin() const
Definition: CaloTowerContainer_v1.h:149
xAOD::CaloTowerContainerBase_v1
DataVector< CaloTower_v1 > CaloTowerContainerBase_v1
Definition: CaloTowerContainer_v1.h:18
xAOD::CaloTowerContainer_v1::phi
double phi(size_t index) const
Definition: CaloTowerContainer_v1.cxx:86
xAOD::CaloTowerContainer_v1::etaMax
double etaMax() const
Definition: CaloTowerContainer_v1.h:150
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
DataVector::ownPolicy
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
xAOD::CaloTowerContainer_v1::index
int index(double eta, double phi) const
Definition: CaloTowerContainer_v1.cxx:65
xAOD::CaloTowerContainer_v1::nPhiBins
int nPhiBins() const
Definition: CaloTowerContainer_v1.h:146
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::CaloTowerContainer_v1::eta
double eta(size_t index) const
Definition: CaloTowerContainer_v1.cxx:77
xAOD::CaloTowerContainer_v1::configureGrid
bool configureGrid(int nEtaBins, double etaMin, double etaMax, int nPhiBins)
Definition: CaloTowerContainer_v1.cxx:39