ATLAS Offline Software
|
Storable container class for CaloTower. More...
#include <CaloTowerContainer.h>
Classes | |
class | iterator |
Iterator class for which the reference type is not an lvalue. More... | |
Public Types | |
typedef DataVector< CaloTower > | Base |
typedef size_t | index_t |
Tower map index type. More... | |
typedef std::reverse_iterator< iterator > | reverse_iterator |
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 CaloTower *& | reference |
typedef CaloTower *const & | const_reference |
typedef BASE::size_type | size_type |
typedef BASE::difference_type | difference_type |
typedef CaloTower * | value_type |
typedef BASE::allocator_type | allocator_type |
typedef CaloTower ** | pointer |
typedef CaloTower *const * | const_pointer |
typedef const CaloTower * | const_value_type |
typedef CaloTower | base_value_type |
The T value used as the template parameter. More... | |
typedef std::unique_ptr< base_value_type > | unique_type |
Type of a unique_ptr that can be used to insert elements into this container. More... | |
typedef DataModel_detail::ElementProxy< DataVector > | ElementProxy |
This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership. More... | |
typedef DataModel_detail::const_iterator< DataVector > | const_iterator |
Standard const_iterator . More... | |
typedef DataModel_detail::iterator< DataVector > | iterator |
Standard iterator . More... | |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Standard const_reverse_iterator . More... | |
typedef DataVector | base_data_vector |
using | Deleter = typename BASE::Deleter |
typedef DataVector< CaloTower, BASE > | self |
A helper typedef. More... | |
Public Member Functions | |
CaloTowerContainer () | |
Default constructor. More... | |
CaloTowerContainer (const CaloTowerSeg &tseg, bool noTowers=false) | |
Useable Constructor. More... | |
CaloTowerContainer (const CaloTowerContainer &other) | |
Copy constructor. More... | |
CaloTowerContainer & | operator= (const CaloTowerContainer &other) |
Assignment. More... | |
void | swap (CaloTowerContainer &other) |
Swap. More... | |
virtual | ~CaloTowerContainer () |
Destructor. More... | |
void | init () |
Initializes the CaloTowerContainer. More... | |
void | setCalo (const CaloCell_ID::SUBCALO &nCalo) |
Adds a calorimeter index to the tower. More... | |
size_t | getCalos (std::vector< CaloCell_ID::SUBCALO > &theCalos) const |
Retrieve the list of used calorimeters. More... | |
size_t | getNumberOfCalos () const |
Returns the number of included calorimeters. More... | |
double | etamin () const |
Return lower \( \eta \) value range boundary. More... | |
double | phimin () const |
Return lower \( \varphi \) value range boundary. More... | |
double | deta () const |
Return bin size \( \Delta \eta \). More... | |
double | dphi () const |
Return bin size \( \Delta \varphi \). More... | |
size_t | neta () const |
Return number of \( \eta \) bins. More... | |
size_t | nphi () const |
Return number of \( \varphi \) bins. More... | |
const CaloTowerSeg & | towerseg () const |
Return a copy of the attached CaloTowerSeg. More... | |
double | et (double theEta, double thePhi) const |
Return the tower transverse energy at a given grid position. More... | |
double | et (index_t etaIndex, index_t phiIndex) const |
Return the tower transverse energy at a given grid position. More... | |
double | et (int etaIndex, int phiIndex) const |
Return the tower transverse energy at a given grid position. More... | |
double | e (double theEta, double thePhi) const |
Return the tower energy at a given grid position. More... | |
double | e (index_t etaIndex, index_t phiIndex) const |
Return the tower energy at a given grid position. More... | |
double | e (int etaIndex, int phiIndex) const |
Return the tower energy at a given grid position. More... | |
double | energy (double theEta, double thePhi) const |
Return the tower energy at a given grid position. More... | |
double | energy (index_t etaIndex, index_t phiIndex) const |
Return the tower energy at a given grid position. More... | |
double | energy (int etaIndex, int phiIndex) const |
Return the tower energy at a given grid position. More... | |
index_t | getTowerIndex (const CaloTower *aTower) const |
Returns the combined index of a tower on the grid. More... | |
index_t | getTowerIndex (index_t etaIndex, index_t phiIndex) const |
Returns the combined index for given \( \eta \) and \( \varphi \) indices. More... | |
index_t | getTowerIndex (double theEta, double thePhi) const |
Returns the combined index for given \( \eta \) and \( \varphi \) values. More... | |
index_t | getTowerEtaIndex (const CaloTower *aTower) const |
Returns the \( \eta \) index for a given tower. More... | |
index_t | getTowerEtaIndex (double theEta) const |
Returns the \( \eta \) index for a given \( \eta \) value. More... | |
index_t | getTowerEtaIndex (index_t towerIndex) const |
Returns the \( \eta \) index for a given combined index. More... | |
index_t | getTowerPhiIndex (const CaloTower *aTower) const |
Returns the \( \varphi \) index for a given tower. More... | |
index_t | getTowerPhiIndex (double thePhi) const |
Returns the \( \varphi \) index for a given \( \varphi \) value. More... | |
index_t | getTowerPhiIndex (index_t towerIndex) const |
Returns the \( \varphi \) index for a given combined index. More... | |
bool | getTowerIndices (const CaloTower *aTower, index_t &indexEta, index_t &indexPhi) const |
Returns both \( \eta \) and \( \varphi \) indices for a given tower. More... | |
bool | getTowerIndices (double theEta, double thePhi, index_t &indexEta, index_t &indexPhi) const |
Returns both \( \eta \) and \( \varphi \) indices for given \( \eta \) and \( \varphi \) values. More... | |
CaloTower * | getTower (index_t eta, index_t phi) |
Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices. More... | |
const CaloTower * | getTower (index_t eta, index_t phi) const |
Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices. More... | |
CaloTower * | getTower (int eta, int phi) |
Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices. More... | |
const CaloTower * | getTower (int eta, int phi) const |
Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices. More... | |
CaloTower * | getTower (double eta, double phi) |
Returns a pointer to a tower with given \( ( \eta, \varphi ) \) values. More... | |
const CaloTower * | getTower (double eta, double phi) const |
Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) values. More... | |
CaloTower * | getTower (index_t theIndex) |
Returns a pointer to a tower with a given combined index. More... | |
const CaloTower * | getTower (index_t theIndex) const |
Returns a const pointer to a tower with a given combined index. More... | |
index_t | flagOutOfRange () const |
Returns the index out-of-range indicator. More... | |
bool | isOutOfRange (index_t anIndex) const |
Checks if an index is out of range. More... | |
CaloTower * | operator[] (size_type n) |
CaloTower * | at (size_type n) |
CaloTower * | front () |
CaloTower * | back () |
iterator | begin () |
iterator | end () |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
void | insert (iterator position, iterator first, iterator last) |
void | clear (SG::OwnershipPolicy p) |
void | push_back (value_type pElem) |
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 |
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 |
If true, then this type must own its contents. More... | |
Private Member Functions | |
template<class InputIterator > | |
void | assign (InputIterator first, InputIterator last) |
iterator | insert (iterator position, value_type pElem) |
template<class InputIterator > | |
void | insert (iterator position, InputIterator first, InputIterator last) |
iterator | erase (iterator position) |
iterator | erase (iterator first, iterator last) |
void | sort () |
template<class COMPARE > | |
void | sort (COMPARE comp) |
void | swapElement (size_type index, value_type newElem, reference oldElem) |
void | resize (size_type sz) |
void | reserve (size_type n) |
void | pop_back () |
void | clear () |
Private Attributes | |
CaloTowerSeg | m_towerSeg |
Tower grid \( ( \Delta \eta \times \Delta \varphi ) \) descriptor. More... | |
std::vector< unsigned int > | m_caloRegions |
Vector of calorimeter regions contributing to the tower signals. More... | |
Static Private Attributes | |
static const index_t | m_outOfRange = static_cast<index_t>(-1) |
Index overflow indicator. More... | |
Friends | |
class | CaloTowerContainerCnv_p1 |
Swap and sort. | |
void | swap (DataVector &rhs) |
Swap this collection with another. More... | |
static void | iter_swap (iterator a, iterator b) |
Swap the referents of two DataVector iterators. More... | |
Non-standard operations. | |
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 | 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::DVLInfoBase & | dvlinfo_v () const |
Return the DV/DL info struct for this class. More... | |
const SG::AuxVectorBase & | auxbase () 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 PtrVector & | stdcont () 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::DVLInfoBase & | dvlinfo () |
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< CaloTower, DataVector_BASE >::self | self |
static int | baseOffset1 (const char *p, const DataVector &dv, const std::type_info &ti) |
Helper for baseOffset . More... | |
static const CaloTower * | do_cast (const typename PtrVector::value_type p) |
Helper to shorten calls to DataModel_detail::DVLCast . More... | |
static CaloTower * | 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... | |
Storable container class for CaloTower.
The CaloTowerContainer holds an ordered list of pointers to CaloTower s, where the index of a given tower in the list is determined by its \( ( \eta, \varphi ) \) location on the tower grid. When persistified, only the tower grid as stored in a CaloTowerSeg object held by the CaloTowerContainer object, and the list of contributing calorimeters are saved to disk. The CaloTowerContainer is refilled on the fly using this information when retrieved from the persistent store into the transient store (requires original CaloCellContainer to be available also).
Definition at line 76 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Definition at line 816 of file DataVector.h.
typedef DataVector<CaloTower> CaloTowerContainer::Base |
Definition at line 79 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Definition at line 853 of file DataVector.h.
|
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.
|
inherited |
Definition at line 806 of file DataVector.h.
|
inherited |
Standard const_iterator
.
Definition at line 837 of file DataVector.h.
|
inherited |
Definition at line 818 of file DataVector.h.
|
inherited |
Definition at line 812 of file DataVector.h.
|
inherited |
Standard const_reverse_iterator
.
Definition at line 846 of file DataVector.h.
|
inherited |
Definition at line 820 of file DataVector.h.
|
inherited |
Definition at line 796 of file DataVector.h.
|
inherited |
Definition at line 856 of file DataVector.h.
|
inherited |
Definition at line 814 of file DataVector.h.
|
inherited |
Definition at line 797 of file DataVector.h.
|
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.
typedef size_t CaloTowerContainer::index_t |
Tower map index type.
Definition at line 82 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Standard iterator
.
Note that lvalue references here will yield an ElementProxy
, not a reference
.
Definition at line 841 of file DataVector.h.
|
inherited |
Definition at line 817 of file DataVector.h.
|
inherited |
This is the type of the underlying std::vector
(what stdcont
returns).
Definition at line 805 of file DataVector.h.
|
inherited |
Definition at line 811 of file DataVector.h.
typedef std::reverse_iterator<iterator> CaloTowerContainer::reverse_iterator |
Definition at line 485 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
privateinherited |
Definition at line 2042 of file DataVector.h.
|
inherited |
A helper typedef.
Definition at line 3428 of file DataVector.h.
|
inherited |
Definition at line 813 of file DataVector.h.
|
inherited |
Type of a unique_ptr that can be used to insert elements into this container.
Definition at line 828 of file DataVector.h.
|
inherited |
Definition at line 815 of file DataVector.h.
CaloTowerContainer::CaloTowerContainer | ( | ) |
Default constructor.
Instantiates a CaloTowerContainer without a \( \Delta \eta \times \Delta \varphi \) grid definition. Limited use only.
Definition at line 46 of file CaloTowerContainer.cxx.
CaloTowerContainer::CaloTowerContainer | ( | const CaloTowerSeg & | tseg, |
bool | noTowers = false |
||
) |
Useable Constructor.
tseg | input a CaloTowerSeg object containing a \( \Delta \eta \times \Delta \varphi \) tower grid description |
noTowers | If true, don't create the contained towers. |
Creates an empty CaloTower at each \( ( \eta, \varphi ) \) location of the grid.
Definition at line 50 of file CaloTowerContainer.cxx.
CaloTowerContainer::CaloTowerContainer | ( | const CaloTowerContainer & | other | ) |
|
virtualdefault |
Destructor.
|
private |
|
inherited |
l | An initializer list. |
Any existing owned elements will be released. The DataVector's
ownership policy determines whether it will take ownership of the new elements.
|
privateinherited |
Handle element assignment from a base pointer.
pos | Position in the container to assign. |
newElem | The new element to assign. |
The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.
|
privateinherited |
Handle element assignment.
pos | Position in the container to assign. |
newElem | The new element to assign. |
The container must own its elements. Auxiliary data are copied if appropriate.
|
privateinherited |
Handle element assignment.
pos | Position in the container to assign. |
newElem | The new element to assign. |
The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.
Definition at line 665 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Access an element, as an rvalue.
n | Array index to access. |
Will raise std::out_of_range
if the index is out-of-bounds. Note that we return a const
T*
rather than a reference.
|
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.
|
inline |
Definition at line 675 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
staticinherited |
Return the offset of a base DataVector
class.
ti | std::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.
|
staticinherited |
Helper for baseOffset
.
p | Pointer to the start of the top-level object. |
dv | Reference to the DataVector object. |
ti | std::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.
|
inline |
Definition at line 680 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
noexceptinherited |
Returns the total number of elements that the collection can hold before needing to allocate more memory.
|
noexceptinherited |
Return a const_iterator
pointing at the beginning of the collection.
const_iterator
.Note that dereferencing the iterator will yield a const
T*
rather than a reference.
|
noexceptinherited |
Return a const_iterator
pointing past the end of the collection.
const_iterator
.Note that dereferencing the iterator will yield a const
T*
rather than a reference.
|
private |
|
inherited |
void CaloTowerContainer::clear | ( | SG::OwnershipPolicy | p | ) |
Definition at line 296 of file CaloTowerContainer.cxx.
|
inherited |
Erase all the elements in the collection, and change how elements are to be deleted.
deleter | Object 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.
|
protectedinherited |
Clear m_isMostDerived
for this instance and for all bases.
Called from the constructor after setting m_isMostDerived
.
|
noexceptinherited |
Return a const_reverse_iterator
pointing past the end of the collection.
const_reverse_iterator
.Note that dereferencing the iterator will yield a const
T*
rather than a reference.
|
noexceptinherited |
Return a const_reverse_iterator
pointing at the beginning of the collection.
const_reverse_iterator
.Note that dereferencing the iterator will yield a const
T*
rather than a reference.
|
inline |
Return bin size \( \Delta \eta \).
Definition at line 570 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
staticinherited |
Helper to shorten calls to DataModel_detail::DVLCast
.
p | The value to convert. |
const
T*
.The conversion will be done with static_cast
if possible, with dynamic_cast
otherwise.
|
staticinherited |
Helper to shorten calls to DataModel_detail::DVLCast
.
p | The value to convert. |
T*
.The conversion will be done with static_cast
if possible, with dynamic_cast
otherwise.
|
inline |
Return bin size \( \Delta \varphi \).
Definition at line 583 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
privatevirtualinherited |
Find the most-derived DataVector
class in the hierarchy.
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.
|
staticinherited |
Return the DV/DL info struct for this class.
This can be used to make sure that it's instantiated.
|
virtualinherited |
Return the DV/DL info struct for this class.
This can be used to make sure that it's instantiated.
|
inline |
Return the tower energy at a given grid position.
theEta | input \( \eta \) value |
thePhi | input \( \varphi \) value |
Returns 0 if input out of range.
Definition at line 205 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
Return the tower energy at a given grid position.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
etaIndex | input \( \eta \) index |
phiIndex | input \( \varphi \) index |
Definition at line 214 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Return the tower energy at a given grid position.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 220 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Add a new element to the collection.
position | Iterator before which the element will be added. |
pElem | The 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 just the same as insert
. It's included just for interface compatibility with std::vector
.
|
inherited |
Add an element to the end of the collection.
pElem | The 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
.
|
noexceptinherited |
Returns true
if the collection is empty.
|
inline |
Definition at line 685 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
double CaloTowerContainer::energy | ( | double | theEta, |
double | thePhi | ||
) | const |
Return the tower energy at a given grid position.
theEta | input \( \eta \) value |
thePhi | input \( \varphi \) value |
Returns 0 if input out of range.
Definition at line 208 of file CaloTowerContainer.cxx.
Return the tower energy at a given grid position.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
etaIndex | input \( \eta \) index |
phiIndex | input \( \varphi \) index |
Definition at line 202 of file CaloTowerContainer.cxx.
|
inline |
Return the tower energy at a given grid position.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 243 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Remove a range of elements.
first | Iterator pointing to the first element to be removed. |
last | Iterator pointing one past the last element to be removed. |
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.
|
inherited |
Remove element at a given position.
position | Iterator pointing to the element to be removed. |
end()
).If the container owns its elements, then the pointed-to element will be deleted.
double CaloTowerContainer::et | ( | double | theEta, |
double | thePhi | ||
) | const |
Return the tower transverse energy at a given grid position.
theEta | input \( \eta \) value |
thePhi | input \( \varphi \) value |
Returns 0 if input out of range.
Definition at line 223 of file CaloTowerContainer.cxx.
Return the tower transverse energy at a given grid position.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
etaIndex | input \( \eta \) index |
phiIndex | input \( \varphi \) index |
Definition at line 215 of file CaloTowerContainer.cxx.
|
inline |
Return the tower transverse energy at a given grid position.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 195 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Return lower \( \eta \) value range boundary.
Definition at line 566 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the index out-of-range indicator.
Definition at line 651 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Definition at line 670 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Access an element, as an rvalue.
n | Array index to access. |
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).
size_t CaloTowerContainer::getCalos | ( | std::vector< CaloCell_ID::SUBCALO > & | theCalos | ) | const |
Retrieve the list of used calorimeters.
theCalos | reference to a modifiable vector of calorimeter indices |
Fills a vector with the list of included calorimeters and returns the number of included calorimeters.
Definition at line 180 of file CaloTowerContainer.cxx.
|
inline |
Returns the number of included calorimeters.
Definition at line 560 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
CaloTower * CaloTowerContainer::getTower | ( | double | eta, |
double | phi | ||
) |
Returns a pointer to a tower with given \( ( \eta, \varphi ) \) values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
eta | input \( \eta \) value |
phi | input \( \varphi \) value |
Definition at line 286 of file CaloTowerContainer.cxx.
Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 277 of file CaloTowerContainer.cxx.
Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices.
eta | input \( \eta \) index |
phi | input \( \varphi \) index |
Returns 0 if indices out of range.
Definition at line 266 of file CaloTowerContainer.cxx.
Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 253 of file CaloTowerContainer.cxx.
Returns a pointer to a tower with a given combined index.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theIndex | input combined index |
Definition at line 403 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
Returns a const pointer to a tower with a given combined index.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 413 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 372 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 379 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the \( \eta \) index for a given tower.
aTower | pointer to a CaloTower object |
Returns index_t(-1) if input invalid.
Definition at line 616 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the \( \eta \) index for a given \( \eta \) value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theEta | input \( \eta \) value |
Definition at line 623 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the \( \eta \) index for a given combined index.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
towerIndex | input combined index |
Definition at line 628 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the combined index of a tower on the grid.
aTower | pointer to a CaloTower object |
Returns index_t(-1) if input invalid.
Definition at line 598 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the combined index for given \( \eta \) and \( \varphi \) values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theEta | input \( \eta \) value |
thePhi | input \( \varphi \) value |
Definition at line 610 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the combined index for given \( \eta \) and \( \varphi \) indices.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
etaIndex | input \( \eta \) index |
phiIndex | input \( \varphi \) index |
Definition at line 605 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
bool CaloTowerContainer::getTowerIndices | ( | const CaloTower * | aTower, |
index_t & | indexEta, | ||
index_t & | indexPhi | ||
) | const |
Returns both \( \eta \) and \( \varphi \) indices for a given tower.
aTower | input pointer to a CaloTower |
indexEta | reference to a modifiable \( \eta \) index (set on return) |
indexPhi | reference to a modifiable \( \varphi \) index (set on return) |
Returns true
if tower allocated with valid indices.
Definition at line 235 of file CaloTowerContainer.cxx.
bool CaloTowerContainer::getTowerIndices | ( | double | theEta, |
double | thePhi, | ||
index_t & | indexEta, | ||
index_t & | indexPhi | ||
) | const |
Returns both \( \eta \) and \( \varphi \) indices for given \( \eta \) and \( \varphi \) values.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theEta | input \( \eta \) index |
thePhi | input \( \varphi \) index |
indexEta | reference to a modifiable \( \eta \) index (set on return) |
indexPhi | reference to a modifiable \( \varphi \) index (set on return) |
Returns true
if tower allocated with valid indices.
Definition at line 243 of file CaloTowerContainer.cxx.
|
inline |
Returns the \( \varphi \) index for a given tower.
aTower | pointer to a CaloTower object |
Returns index_t(-1) if input invalid.
Definition at line 633 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the \( \varphi \) index for a given \( \varphi \) value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
thePhi | input \( \varphi \) value |
Definition at line 640 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Returns the \( \varphi \) index for a given combined index.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
towerIndex | input combined index |
Definition at line 645 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
void CaloTowerContainer::init | ( | ) |
Initializes the CaloTowerContainer.
A CaloTower object with zero energy is put at each \( ( \eta, \varphi ) \) position of the tower grid.
Definition at line 107 of file CaloTowerContainer.cxx.
|
private |
|
inherited |
Add a group of new elements to the collection.
position | Iterator before which the element will be added. |
first | The start of the range to put in the container. |
last | The 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*.
Definition at line 303 of file CaloTowerContainer.cxx.
|
inherited |
Add a group of new elements to the collection.
position | Iterator before which the element will be added. |
l | An 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.
|
inherited |
Add a new element to the collection.
position | Iterator before which the element will be added. |
pElem | The 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.
|
private |
|
inherited |
Add a new element to the collection.
position | Iterator before which the element will be added. |
pElem | The 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.
|
inherited |
Insert the contents of another DataVector
, with auxiliary data copied via move semantics.
position | Iterator before which the new elements will be added. |
other | The 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.
|
inline |
Checks if an index is out of range.
anIndex | input combined tower index |
Returns true
if index is out of range.
Definition at line 655 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
staticinherited |
Swap the referents of two DataVector
iterators.
a | The first iterator for the swap. |
b | The second iterator for the swap. |
|
noexceptinherited |
Returns the size()
of the largest possible collection.
|
inline |
Return number of \( \eta \) bins.
Definition at line 574 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Return number of \( \varphi \) bins.
Definition at line 587 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
CaloTowerContainer & CaloTowerContainer::operator= | ( | const CaloTowerContainer & | other | ) |
Definition at line 660 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Access an element, as an rvalue.
n | Array index to access. |
No bounds checking is done. Note that we return a const
T*
rather than a reference.
|
inherited |
Return the ownership policy setting for this container.
|
inline |
Return lower \( \varphi \) value range boundary.
Definition at line 578 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
private |
|
inherited |
Add an element to the end of the collection.
pElem | The 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.
void CaloTowerContainer::push_back | ( | value_type | pElem | ) |
Definition at line 315 of file CaloTowerContainer.cxx.
|
inline |
Definition at line 690 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inline |
Definition at line 695 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
private |
|
private |
|
inherited |
Reset indices / reorder aux data after elements have been permuted.
beg | Start of the range of elements to process. |
end | End 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.
void CaloTowerContainer::setCalo | ( | const CaloCell_ID::SUBCALO & | nCalo | ) |
Adds a calorimeter index to the tower.
nCalo | input calorimeter index |
Updates the list of calorimeters included in the towers. This list is needed to restore the CaloTowerContainer from persistency.
Definition at line 169 of file CaloTowerContainer.cxx.
|
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.
|
privateinherited |
Shift the auxiliary elements of the container.
pos | The starting index for the shift. |
offs | The (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).
|
inherited |
|
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.
|
private |
|
private |
|
inherited |
Return the underlying std::vector
of the container.
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.
void CaloTowerContainer::swap | ( | CaloTowerContainer & | other | ) |
|
inherited |
Swap this collection with another.
rhs | The 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
.
|
inherited |
Swap one element out of the container.
pos | The element in the container to swap. |
newElem | New element to put in the container. May be 0. |
oldElem | Reference 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.
|
inherited |
Swap one element out of the container.
pos | The element in the container to swap. |
newElem | New element to put in the container. May be 0. |
oldElem | Reference 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.
|
inherited |
Swap one element out of the container.
index | Index of the element in the container to swap. |
newElem | New element to put in the container. May be 0. |
oldElem | Reference 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.
|
private |
|
inherited |
Test if we can insert; raise an exception if not.
op | Description 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.
|
inherited |
Test if we can insert; raise an exception if not.
op | Description 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.
|
inline |
Return a copy of the attached CaloTowerSeg.
Definition at line 591 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
friend |
Definition at line 511 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
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.
|
private |
Vector of calorimeter regions contributing to the tower signals.
Definition at line 520 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
inherited |
Definition at line 3436 of file DataVector.h.
|
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.
|
inherited |
Automatically generate dictionary for contained vector.
Declare the automatically created variable transient
Definition at line 3435 of file DataVector.h.
Index overflow indicator.
Definition at line 530 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
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.
|
private |
Tower grid \( ( \Delta \eta \times \Delta \varphi ) \) descriptor.
Definition at line 517 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.
|
staticconstexprinherited |
If true, then this type must own its contents.
Definition at line 859 of file DataVector.h.