ATLAS Offline Software
Public Member Functions | List of all members
Trk::ElementFraction Class Reference

#include <Material.h>

Inheritance diagram for Trk::ElementFraction:
Collaboration diagram for Trk::ElementFraction:

Public Member Functions

 ElementFraction ()
 Default Constructor. More...
 
 ElementFraction (const std::pair< unsigned char, unsigned char > &ef)
 Copy Constructor from base class. More...
 
 ElementFraction (unsigned char iz, unsigned char ifrac)
 Constructor from arguments. More...
 
ElementFractionoperator= (const std::pair< unsigned char, unsigned char > &ef)
 assignment operator from base class More...
 
unsigned int element () const
 Return in a nice format. More...
 
double fraction () const
 Return in a nice format. More...
 

Detailed Description

Definition at line 26 of file Material.h.

Constructor & Destructor Documentation

◆ ElementFraction() [1/3]

Trk::ElementFraction::ElementFraction ( )
inline

Default Constructor.

Definition at line 29 of file Material.h.

29 : std::pair<unsigned char, unsigned char>(0, 0) {}

◆ ElementFraction() [2/3]

Trk::ElementFraction::ElementFraction ( const std::pair< unsigned char, unsigned char > &  ef)
inline

Copy Constructor from base class.

Definition at line 32 of file Material.h.

33  : std::pair<unsigned char, unsigned char>(ef) {}

◆ ElementFraction() [3/3]

Trk::ElementFraction::ElementFraction ( unsigned char  iz,
unsigned char  ifrac 
)
inline

Constructor from arguments.

Definition at line 36 of file Material.h.

37  : std::pair<unsigned char, unsigned char>(iz, ifrac) {}

Member Function Documentation

◆ element()

unsigned int Trk::ElementFraction::element ( ) const
inline

Return in a nice format.

Definition at line 49 of file Material.h.

49  {
50  return static_cast<unsigned int>((*this).first);
51  }

◆ fraction()

double Trk::ElementFraction::fraction ( ) const
inline

Return in a nice format.

Definition at line 54 of file Material.h.

54  {
55  return (static_cast<unsigned int>((*this).second)) * s_oneOverUcharMax;
56  }

◆ operator=()

ElementFraction& Trk::ElementFraction::operator= ( const std::pair< unsigned char, unsigned char > &  ef)
inline

assignment operator from base class

Definition at line 40 of file Material.h.

41  {
42  if (this != &ef) {
43  std::pair<unsigned char, unsigned char>::operator=(ef);
44  }
45  return (*this);
46  }

The documentation for this class was generated from the following file:
LheEventFiller_Common.ef
ef
Definition: SFGen_i/share/common/LheEventFiller_Common.py:7