7#ifndef ATHENAKERNEL_ITHINNINGHDLR_H
8#define ATHENAKERNEL_ITHINNINGHDLR_H 1
17#include "GaudiKernel/DataObject.h"
43 virtual void remove(
const std::size_t idx ) = 0;
65 template <
typename Element>
79template <
typename Container>
102 typedef typename PtrVector::iterator Iter;
114 const std::size_t size =
m_backup.size();
129template <
typename Container>
152 typedef typename Vector_t::iterator Iter;
164 const std::size_t size =
m_backup.size();
179template <
typename Container>
184 typedef std::pair<std::size_t, Identifiable_t*>
Backup_t;
203 m_backup.push_back (std::make_pair(idx, c));
210 typedef typename Backups_t::iterator Iter;
212 for ( Iter itr =
m_backup.begin(); itr!=end; ++itr) {
213 m_container.addCollection (itr->second, itr->first).ignore();
225template <
class Container>
232 typedef typename std::is_base_of<std::vector<value_type>,
Container>
237 typedef typename std::is_base_of<DataObject, Container>
241using type = std::conditional_t<
242 derives_from_dataobject::value,
245 derives_from_std_vector::value,
Define macros for attributes used to control the static checker.
Handle DataProxy holding DataVector.
DvThinningHdlr(const Container &c)
void rollback()
unpack the proxied DataVector ie: restore it as it was before any thinning took place
const PtrVector m_backup
Vector holding the pointers to the elements of DataVector, before any thinning took place.
void remove(const std::size_t idx)
remove an element from the proxied DataVector
Container::PtrVector PtrVector
void commit()
pack the proxied collection This is needed in order to keep element link indices consistent and T/P c...
This class defines a protocol to pack and unpack thinned collections.
virtual void rollback()=0
unpack the proxied DataVector ie: restore it as it was before any thinning took place
virtual bool isMapping() const
publish the type of underlying indexing (mapping or sequencing)
virtual ~IThinningHdlr()
virtual destructor
virtual void remove(const std::size_t idx)=0
remove an element from the proxied DataVector
virtual void commit()=0
pack the proxied collection This is needed in order to keep element link indices consistent and T/P c...
Handle DataProxy holding IdentifiableContainer This class defines a (type-safe) protocol to pack and ...
void commit()
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
IdcThinningHdlr(const Container &c)
std::pair< std::size_t, Identifiable_t * > Backup_t
std::list< Backup_t > Backups_t
virtual bool isMapping() const
publish the type of underlying indexing (mapping or sequencing)
void remove(const std::size_t idx)
remove an element from the proxied DataVector
Idc_t::IDENTIFIABLE Identifiable_t
Backups_t m_backup
Vector holding the pointers to the elements of IdentifiableContainer, before any thinning took place.
Handle DataProxy holding std::vector<T> This class defines a (type-safe) protocol to pack and unpack ...
StdThinningHdlr(const Container &c)
void rollback()
unpack the proxied DataVector ie: restore it as it was before any thinning took place
void remove(const std::size_t idx)
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...
const Vector_t m_backup
Vector holding the pointers to the elements of std::vector<T>, before any thinning took place.
storage of the time histories of all the cells
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....
StatusCode ROOTMessageFilterSvc::initialize ATLAS_NOT_THREAD_SAFE()
Return the file descriptor fataldump() uses for output.
DataModel_detail::iterator< DVL > stable_partition(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, Predicate pred)
Specialization of stable_partition for DataVector/List.
Predicate to spot non NULL pointers.
bool operator()(Element *f) const
metafunction to automagically dispatch on the type of a container and fetch the right thinning handle...
std::is_base_of< std::vector< value_type >, Container > derives_from_std_vector
std::is_base_of< DataObject, Container > derives_from_dataobject
Container::value_type value_type
std::remove_pointer< value_type >::type base_value_type
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