Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef ATHENAKERNEL_ITHINNINGHDLR_H
8 #define ATHENAKERNEL_ITHINNINGHDLR_H 1
16 #include <type_traits>
17 #include "GaudiKernel/DataObject.h"
65 template <
typename Element>
79 template <
typename Container>
98 { m_container[
idx] = 0; }
105 Iter itr = std::stable_partition( m_container.begin(),
109 m_container.resize(
std::distance( m_container.begin(), itr ) );
114 const std::size_t
size = m_backup.size();
115 m_container.resize(
size );
116 std::copy (m_backup.begin(), m_backup.end(),
117 m_container.begin());
129 template <
typename Container>
148 { m_container[
idx] = 0; }
155 Iter itr = std::stable_partition( m_container.begin(),
159 m_container.resize(
std::distance( m_container.begin(), itr ) );
164 const std::size_t
size = m_backup.size();
165 m_container.resize(
size );
166 std::copy (m_backup.begin(), m_backup.end(),
167 m_container.begin());
179 template <
typename Container>
184 typedef std::pair<std::size_t, Identifiable_t*>
Backup_t;
197 m_container( const_cast<
Idc_t&>(
c) )
203 m_backup.push_back (std::make_pair(
idx,
c));
211 Iter
end = m_backup.end();
212 for ( Iter itr = m_backup.begin(); itr!=
end; ++itr) {
213 m_container.addCollection (itr->second, itr->first).ignore();
225 template <
class Container>
232 typedef typename std::is_base_of<std::vector<value_type>,
Container>
237 typedef typename std::is_base_of<DataObject, Container>
241 using type = std::conditional_t<
254 #endif //> ATHENAKERNEL_ITHINNINGHDLR_H
JetConstituentVector::iterator iterator
std::remove_pointer< value_type >::type base_value_type
std::pair< std::size_t, Identifiable_t * > Backup_t
std::is_base_of< std::vector< value_type >, Container > derives_from_std_vector
DvThinningHdlr(const Container &c)
void rollback()
unpack the proxied DataVector ie: restore it as it was before any thinning took place
void rollback()
unpack the proxied DataVector ie: restore it as it was before any thinning took place
Idc_t::IDENTIFIABLE Identifiable_t
metafunction to automagically dispatch on the type of a container and fetch the right thinning handle...
Predicate to spot non NULL pointers.
virtual bool isMapping() const
publish the type of underlying indexing (mapping or sequencing)
virtual void rollback()=0
unpack the proxied DataVector ie: restore it as it was before any thinning took place
storage of the time histories of all the cells
Some weak symbol referencing magic...
Handle DataProxy holding IdentifiableContainer This class defines a (type-safe) protocol to pack and ...
StdThinningHdlr(const Container &c)
bool operator()(Element *f) const
Backups_t m_backup
Vector holding the pointers to the elements of IdentifiableContainer, before any thinning took place.
Handle DataProxy holding DataVector. This class defines a (type-safe) protocol to pack and unpack thi...
std::is_base_of< DataObject, Container > derives_from_dataobject
virtual ~IThinningHdlr()
virtual destructor
const Vector_t m_backup
Vector holding the pointers to the elements of std::vector<T>, before any thinning took place.
IdcThinningHdlr(const Container &c)
virtual void commit()=0
pack the proxied collection This is needed in order to keep element link indices consistent and T/P c...
void rollback()
unpack the proxied DataVector ie: restore it as it was before any thinning took place
Handle DataProxy holding std::vector<T> This class defines a (type-safe) protocol to pack and unpack ...
Container::value_type value_type
std::list< Backup_t > Backups_t
const PtrVector m_backup
Vector holding the pointers to the elements of DataVector, before any thinning took place.
void commit()
pack the proxied collection This is needed in order to keep element link indices consistent and T/P c...
void remove(const std::size_t idx)
remove an element from the proxied DataVector
virtual bool isMapping() const
publish the type of underlying indexing (mapping or sequencing)
void commit()
pack the proxied collection This is needed in order to keep element link indices consistent and T/P c...
Container::PtrVector PtrVector
This class defines a protocol to pack and unpack thinned collections.
void remove(const std::size_t idx)
remove an element from the proxied DataVector
Define macros for attributes used to control the static checker.
void remove(const std::size_t idx)
remove an element from the proxied DataVector
std::conditional_t< derives_from_dataobject::value, ::Athena::IdcThinningHdlr< Container >, std::conditional_t< derives_from_std_vector::value, ::Athena::StdThinningHdlr< Container >, ::Athena::DvThinningHdlr< Container > > > type
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
void DebugAids::stacktraceLine ATLAS_NOT_THREAD_SAFE(IOFD fd, unsigned long addr)
Write out stack trace line to FD.
virtual void remove(const std::size_t idx)=0
remove an element from the proxied DataVector
void commit()
pack the proxied collection This is needed in order to keep element link indices consistent and T/P c...