|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef ATHENAKERNEL_ITHINNINGHDLR_H
8 #define ATHENAKERNEL_ITHINNINGHDLR_H 1
16 #include <boost/mpl/if.hpp>
17 #include <type_traits>
18 #include "GaudiKernel/DataObject.h"
66 template <
typename Element>
80 template <
typename Container>
99 { m_container[
idx] = 0; }
106 Iter itr = std::stable_partition( m_container.begin(),
110 m_container.resize(
std::distance( m_container.begin(), itr ) );
115 const std::size_t
size = m_backup.size();
116 m_container.resize(
size );
117 std::copy (m_backup.begin(), m_backup.end(),
118 m_container.begin());
130 template <
typename Container>
149 { m_container[
idx] = 0; }
156 Iter itr = std::stable_partition( m_container.begin(),
160 m_container.resize(
std::distance( m_container.begin(), itr ) );
165 const std::size_t
size = m_backup.size();
166 m_container.resize(
size );
167 std::copy (m_backup.begin(), m_backup.end(),
168 m_container.begin());
180 template <
typename Container>
185 typedef std::pair<std::size_t, Identifiable_t*>
Backup_t;
198 m_container( const_cast<
Idc_t&>(
c) )
204 m_backup.push_back (std::make_pair(
idx,
c));
212 Iter
end = m_backup.end();
213 for ( Iter itr = m_backup.begin(); itr!=
end; ++itr) {
214 m_container.addCollection (itr->second, itr->first).ignore();
226 template <
class Container>
233 typedef typename std::is_base_of<std::vector<value_type>,
Container>
238 typedef typename std::is_base_of<DataObject, Container>
242 #define if_c ::boost::mpl::if_c
257 #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 ...
if_c< derives_from_dataobject::value, ::Athena::IdcThinningHdlr< Container >, typename if_c< derives_from_std_vector::value, ::Athena::StdThinningHdlr< Container >, ::Athena::DvThinningHdlr< Container > >::type >::type type
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
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...