ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Trk::MaterialComposition Struct Reference

#include <Material.h>

Inheritance diagram for Trk::MaterialComposition:
Collaboration diagram for Trk::MaterialComposition:

Public Member Functions

 MaterialComposition ()
 default constructors More...
 
 MaterialComposition (const MaterialComposition &)=default
 
 MaterialComposition (MaterialComposition &&)=default
 
MaterialCompositionoperator= (const MaterialComposition &)=default
 
MaterialCompositionoperator= (MaterialComposition &&)=default
 
 ~MaterialComposition ()
 
 MaterialComposition (const std::vector< unsigned char > &iel, const std::vector< unsigned char > &ifrac)
 constructor for persistency (1), size optimized More...
 
 MaterialComposition (const std::vector< std::pair< unsigned char, unsigned char > > &efracs)
 constructor for persistency (2), size optimized More...
 
 MaterialComposition (const std::vector< ElementFraction > &mc)
 Copy constructor from base class. More...
 
MaterialCompositionoperator= (const std::vector< ElementFraction > &mc)
 assignment operator from base class More...
 
MaterialCompositionoperator= (const std::vector< std::pair< unsigned char, unsigned char > > &efracs)
 assignment operator for persistency (2) More...
 

Public Attributes

elements
 STL member. More...
 

Detailed Description

Definition at line 60 of file Material.h.

Constructor & Destructor Documentation

◆ MaterialComposition() [1/6]

Trk::MaterialComposition::MaterialComposition ( )
inline

default constructors

Definition at line 63 of file Material.h.

63 : std::vector<ElementFraction>() {}

◆ MaterialComposition() [2/6]

Trk::MaterialComposition::MaterialComposition ( const MaterialComposition )
default

◆ MaterialComposition() [3/6]

Trk::MaterialComposition::MaterialComposition ( MaterialComposition &&  )
default

◆ ~MaterialComposition()

Trk::MaterialComposition::~MaterialComposition ( )
inline

Definition at line 68 of file Material.h.

68 {}

◆ MaterialComposition() [4/6]

Trk::MaterialComposition::MaterialComposition ( const std::vector< unsigned char > &  iel,
const std::vector< unsigned char > &  ifrac 
)
inline

constructor for persistency (1), size optimized

Definition at line 71 of file Material.h.

72  {
73  reserve(iel.size());
74  for (std::size_t elvc = 0; elvc < iel.size() && !ifrac.empty(); ++elvc)
75  push_back(ElementFraction(iel[elvc], ifrac[elvc]));
76  }

◆ MaterialComposition() [5/6]

Trk::MaterialComposition::MaterialComposition ( const std::vector< std::pair< unsigned char, unsigned char > > &  efracs)
inline

constructor for persistency (2), size optimized

Definition at line 79 of file Material.h.

80  {
81  reserve(efracs.size());
82  for (auto& efracIt : efracs) push_back(efracIt);
83  }

◆ MaterialComposition() [6/6]

Trk::MaterialComposition::MaterialComposition ( const std::vector< ElementFraction > &  mc)
inline

Copy constructor from base class.

Definition at line 86 of file Material.h.

87  : std::vector<ElementFraction>(mc) {}

Member Function Documentation

◆ operator=() [1/4]

MaterialComposition& Trk::MaterialComposition::operator= ( const MaterialComposition )
default

◆ operator=() [2/4]

MaterialComposition& Trk::MaterialComposition::operator= ( const std::vector< ElementFraction > &  mc)
inline

assignment operator from base class

Definition at line 90 of file Material.h.

90  {
91  if (this != &mc) {
92  std::vector<ElementFraction>::operator=(mc);
93  }
94  return (*this);
95  }

◆ operator=() [3/4]

MaterialComposition& Trk::MaterialComposition::operator= ( const std::vector< std::pair< unsigned char, unsigned char > > &  efracs)
inline

assignment operator for persistency (2)

Definition at line 98 of file Material.h.

99  {
100  clear();
101  reserve(efracs.size());
102  for (auto& efracIt : efracs) push_back(efracIt);
103  return (*this);
104  }

◆ operator=() [4/4]

MaterialComposition& Trk::MaterialComposition::operator= ( MaterialComposition &&  )
default

Member Data Documentation

◆ elements

T std::vector< T >::elements
inherited

STL member.


The documentation for this struct was generated from the following file:
mc
Definition: mc.PG_single_nu_valid.py:1
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48