ATLAS Offline Software
Public Member Functions | Public Attributes | Private Attributes | List of all members
Trk::LayerMaterialMap Class Reference

#include <LayerMaterialMap.h>

Inheritance diagram for Trk::LayerMaterialMap:
Collaboration diagram for Trk::LayerMaterialMap:

Public Member Functions

 LayerMaterialMap ()
 Default constructor. More...
 
 LayerMaterialMap (const Trk::SharedObject< const ElementTable > &eTable)
 Default constructor. More...
 
 LayerMaterialMap (const Trk::LayerMaterialMap &lmc)
 Copy constructor. More...
 
LayerMaterialMapoperator= (const LayerMaterialMap &lmc)
 Assigment operator. More...
 
 ~LayerMaterialMap ()
 Destructor. More...
 
const ElementTableelementTable () const
 retrieval method More...
 
void updateElementTable (const SharedObject< const ElementTable > &eTable)
 update method More...
 
void synchronizeElementTable ()
 synchronize the ElementTable More...
 

Public Attributes

keys
 STL member. More...
 
elements
 STL member. More...
 

Private Attributes

SharedObject< const ElementTablem_elementTable
 

Detailed Description

This class extends the DataVector<Trk::LayerMaterialProperties> by an elementTable;

@author Andreas.Salzburger -at- cern.ch

Definition at line 31 of file LayerMaterialMap.h.

Constructor & Destructor Documentation

◆ LayerMaterialMap() [1/3]

Trk::LayerMaterialMap::LayerMaterialMap ( )
inline

Default constructor.

Definition at line 35 of file LayerMaterialMap.h.

36  : std::map<Trk::LayerIndex, const Trk::LayerMaterialProperties*>(),

◆ LayerMaterialMap() [2/3]

Trk::LayerMaterialMap::LayerMaterialMap ( const Trk::SharedObject< const ElementTable > &  eTable)
inline

Default constructor.

Definition at line 40 of file LayerMaterialMap.h.

41  : std::map<Trk::LayerIndex, const Trk::LayerMaterialProperties*>(),
42  m_elementTable(eTable) {}

◆ LayerMaterialMap() [3/3]

Trk::LayerMaterialMap::LayerMaterialMap ( const Trk::LayerMaterialMap lmc)
inline

Copy constructor.

Definition at line 45 of file LayerMaterialMap.h.

46  : std::map<Trk::LayerIndex, const Trk::LayerMaterialProperties*>(lmc),

◆ ~LayerMaterialMap()

Trk::LayerMaterialMap::~LayerMaterialMap ( )
inline

Destructor.

Definition at line 78 of file LayerMaterialMap.h.

78  {
79  // delete the entries to act like a DataVector
80  for (auto& it : (*this)) delete (it.second);
81 }

Member Function Documentation

◆ elementTable()

const ElementTable* Trk::LayerMaterialMap::elementTable ( ) const
inline

retrieval method

Definition at line 63 of file LayerMaterialMap.h.

63 { return m_elementTable.get(); }

◆ operator=()

LayerMaterialMap& Trk::LayerMaterialMap::operator= ( const LayerMaterialMap lmc)
inline

Assigment operator.

Definition at line 50 of file LayerMaterialMap.h.

50  {
51  if (this != &lmc) {
52  m_elementTable = lmc.m_elementTable;
53  std::map<Trk::LayerIndex, const Trk::LayerMaterialProperties*>::operator=(
54  lmc);
55  }
56  return (*this);
57  }

◆ synchronizeElementTable()

void Trk::LayerMaterialMap::synchronizeElementTable ( )
inline

synchronize the ElementTable

Definition at line 83 of file LayerMaterialMap.h.

83  {
84  // loop 1 - add up all the ElementTable
85  Trk::ElementTable* eTable = new Trk::ElementTable();
86  if (elementTable()) (*eTable) += (*elementTable());
87  for (auto& it : (*this)) {
88  const Trk::ElementTable* eTableLM = it.second->elementTable();
89  if (eTableLM) (*eTable) += (*eTableLM);
90  }
91  // loop 2 - set the updated ElementTable
93  for (auto& it : (*this)) it.second->updateElementTable(m_elementTable);
94 }

◆ updateElementTable()

void Trk::LayerMaterialMap::updateElementTable ( const SharedObject< const ElementTable > &  eTable)
inline

update method

Definition at line 66 of file LayerMaterialMap.h.

66  {
67  m_elementTable = eTable;
69  }

Member Data Documentation

◆ elements

T std::map< K, T >::elements
inherited

STL member.

◆ keys

K std::map< K, T >::keys
inherited

STL member.

◆ m_elementTable

SharedObject<const ElementTable> Trk::LayerMaterialMap::m_elementTable
private

Definition at line 75 of file LayerMaterialMap.h.


The documentation for this class was generated from the following file:
Trk::LayerMaterialMap::synchronizeElementTable
void synchronizeElementTable()
synchronize the ElementTable
Definition: LayerMaterialMap.h:83
skel.it
it
Definition: skel.GENtoEVGEN.py:396
SharedObject
Trk::LayerMaterialMap::elementTable
const ElementTable * elementTable() const
retrieval method
Definition: LayerMaterialMap.h:63
Trk::LayerMaterialMap::m_elementTable
SharedObject< const ElementTable > m_elementTable
Definition: LayerMaterialMap.h:75
Trk::ElementTable
Definition: ElementTable.h:24