ATLAS Offline Software
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 181 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 185 of file IThinningHdlr.h.

◆ Backups_t

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

Definition at line 186 of file IThinningHdlr.h.

◆ Idc_t

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

Definition at line 183 of file IThinningHdlr.h.

◆ Identifiable_t

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

Definition at line 184 of file IThinningHdlr.h.

Constructor & Destructor Documentation

◆ IdcThinningHdlr()

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

Definition at line 195 of file IThinningHdlr.h.

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

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 207 of file IThinningHdlr.h.

207 {/*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 220 of file IThinningHdlr.h.

220 {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 201 of file IThinningHdlr.h.

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

◆ 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 209 of file IThinningHdlr.h.

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

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 191 of file IThinningHdlr.h.

◆ m_container

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

Definition at line 192 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:184
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:191
Athena::IdcThinningHdlr::m_container
Idc_t & m_container
Definition: IThinningHdlr.h:192
Athena::IdcThinningHdlr::Idc_t
Container Idc_t
Definition: IThinningHdlr.h:183
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:36
python.compressB64.c
def c
Definition: compressB64.py:93