Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Types | Private Attributes | List of all members
Athena::IdcThinningHdlr< Container > Class Template Reference

Handle DataProxy holding IdentifiableContainer This class defines a (type-safe) protocol to pack and unpack thinned IdentifiableContainer. More...

#include <IThinningHdlr.h>

Inheritance diagram for Athena::IdcThinningHdlr< Container >:
Collaboration diagram for Athena::IdcThinningHdlr< Container >:

Public Member Functions

 IdcThinningHdlr (const Container &c)
 
void remove (const std::size_t idx)
 remove an element from the proxied DataVector More...
 
void commit ()
 pack the proxied collection This is needed in order to keep element link indices consistent and T/P converters unchanged. More...
 
void rollback ()
 unpack the proxied DataVector ie: restore it as it was before any thinning took place More...
 
virtual bool isMapping () const
 publish the type of underlying indexing (mapping or sequencing) More...
 

Private Types

typedef Container Idc_t
 
typedef Idc_t::IDENTIFIABLE Identifiable_t
 
typedef std::pair< std::size_t, Identifiable_t * > Backup_t
 
typedef std::list< Backup_tBackups_t
 

Private Attributes

Backups_t m_backup
 Vector holding the pointers to the elements of IdentifiableContainer, before any thinning took place. More...
 
Idc_tm_container
 

Detailed Description

template<typename Container>
class Athena::IdcThinningHdlr< Container >

Handle DataProxy holding IdentifiableContainer This class defines a (type-safe) protocol to pack and unpack thinned IdentifiableContainer.

This is not MT-safe!

Definition at line 180 of file IThinningHdlr.h.

Member Typedef Documentation

◆ Backup_t

template<typename Container >
typedef std::pair<std::size_t, Identifiable_t*> Athena::IdcThinningHdlr< Container >::Backup_t
private

Definition at line 184 of file IThinningHdlr.h.

◆ Backups_t

template<typename Container >
typedef std::list<Backup_t> Athena::IdcThinningHdlr< Container >::Backups_t
private

Definition at line 185 of file IThinningHdlr.h.

◆ Idc_t

template<typename Container >
typedef Container Athena::IdcThinningHdlr< Container >::Idc_t
private

Definition at line 182 of file IThinningHdlr.h.

◆ Identifiable_t

template<typename Container >
typedef Idc_t::IDENTIFIABLE Athena::IdcThinningHdlr< Container >::Identifiable_t
private

Definition at line 183 of file IThinningHdlr.h.

Constructor & Destructor Documentation

◆ IdcThinningHdlr()

template<typename Container >
Athena::IdcThinningHdlr< Container >::IdcThinningHdlr ( const Container c)
inline

Definition at line 194 of file IThinningHdlr.h.

194  :
196  m_backup (),
197  m_container( const_cast<Idc_t&>(c) )
198  {}

Member Function Documentation

◆ commit()

template<typename Container >
void Athena::IdcThinningHdlr< Container >::commit ( )
inlinevirtual

pack the proxied collection This is needed in order to keep element link indices consistent and T/P converters unchanged.

Implements Athena::IThinningHdlr.

Definition at line 206 of file IThinningHdlr.h.

206 {/*no-op*/}

◆ isMapping()

template<typename Container >
virtual bool Athena::IdcThinningHdlr< Container >::isMapping ( ) const
inlinevirtual

publish the type of underlying indexing (mapping or sequencing)

Reimplemented from Athena::IThinningHdlr.

Definition at line 219 of file IThinningHdlr.h.

219 {return true;}

◆ remove()

template<typename Container >
void Athena::IdcThinningHdlr< Container >::remove ( const std::size_t  idx)
inlinevirtual

remove an element from the proxied DataVector

Implements Athena::IThinningHdlr.

Definition at line 200 of file IThinningHdlr.h.

201  {
202  Identifiable_t *c = m_container.removeCollection (idx);
203  m_backup.push_back (std::make_pair(idx, c));
204  }

◆ rollback()

template<typename Container >
void Athena::IdcThinningHdlr< Container >::rollback ( )
inlinevirtual

unpack the proxied DataVector ie: restore it as it was before any thinning took place

Implements Athena::IThinningHdlr.

Definition at line 208 of file IThinningHdlr.h.

209  {
210  typedef typename Backups_t::iterator Iter;
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();
214  }
215  }

Member Data Documentation

◆ m_backup

template<typename Container >
Backups_t Athena::IdcThinningHdlr< Container >::m_backup
private

Vector holding the pointers to the elements of IdentifiableContainer, before any thinning took place.

Definition at line 190 of file IThinningHdlr.h.

◆ m_container

template<typename Container >
Idc_t& Athena::IdcThinningHdlr< Container >::m_container
private

Definition at line 191 of file IThinningHdlr.h.


The documentation for this class was generated from the following file:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Athena::IdcThinningHdlr::Identifiable_t
Idc_t::IDENTIFIABLE Identifiable_t
Definition: IThinningHdlr.h:183
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Athena::IdcThinningHdlr::m_backup
Backups_t m_backup
Vector holding the pointers to the elements of IdentifiableContainer, before any thinning took place.
Definition: IThinningHdlr.h:190
Athena::IdcThinningHdlr::m_container
Idc_t & m_container
Definition: IThinningHdlr.h:191
Athena::IdcThinningHdlr::Idc_t
Container Idc_t
Definition: IThinningHdlr.h:182
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
Athena::IThinningHdlr
This class defines a protocol to pack and unpack thinned collections.
Definition: IThinningHdlr.h:35
python.compressB64.c
def c
Definition: compressB64.py:93