Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4FermiDataTypes.hh File Reference
#include "G4LorentzVector.hh"
#include "G4ThreeVector.hh"
#include "globals.hh"

Go to the source code of this file.

Classes

class  G4FermiAtomicMass
class  G4FermiChargeNumber
struct  G4FermiNucleiData
struct  std::hash< G4FermiNucleiData >

Namespaces

namespace  std

Macros

#define FERMI_ASSERT_MSG(COND, MSG)

Functions

std::string std::to_string (G4FermiAtomicMass mass)
std::string std::to_string (G4FermiChargeNumber charge)
std::ostream & std::operator<< (std::ostream &out, const G4FermiAtomicMass &mass)
std::istream & std::operator>> (std::istream &in, G4FermiAtomicMass &mass)
std::ostream & std::operator<< (std::ostream &out, const G4FermiChargeNumber &charge)
std::istream & std::operator>> (std::istream &in, G4FermiChargeNumber &charge)
constexpr G4FermiAtomicMass operator""_m (unsigned long long mass)
constexpr G4FermiChargeNumber operator""_c (unsigned long long charge)

Macro Definition Documentation

◆ FERMI_ASSERT_MSG

#define FERMI_ASSERT_MSG ( COND,
MSG )
Value:
if (!(COND)) { \
ed << "assertion failed: \"" << #COND << '\"' << " at " << __FILE__ << ':' << __LINE__ \
<< '\n' \
<< MSG; \
G4Exception("G4FermiBreakUpAN: ", "fermi03", FatalException, ed, ""); \
}
@ FatalException
std::ostringstream G4ExceptionDescription

Definition at line 177 of file G4FermiDataTypes.hh.

177#define FERMI_ASSERT_MSG(COND, MSG) \
178 if (!(COND)) { \
179 G4ExceptionDescription ed; \
180 ed << "assertion failed: \"" << #COND << '\"' << " at " << __FILE__ << ':' << __LINE__ \
181 << '\n' \
182 << MSG; \
183 G4Exception("G4FermiBreakUpAN: ", "fermi03", FatalException, ed, ""); \
184}

Referenced by G4FermiParticle::G4FermiParticle().

Function Documentation

◆ operator""_c()

G4FermiChargeNumber operator""_c ( unsigned long long charge)
constexpr

Definition at line 172 of file G4FermiDataTypes.hh.

173{
174 return G4FermiChargeNumber(static_cast<std::uint32_t>(charge));
175}

◆ operator""_m()

G4FermiAtomicMass operator""_m ( unsigned long long mass)
constexpr

Definition at line 167 of file G4FermiDataTypes.hh.

168{
169 return G4FermiAtomicMass(static_cast<std::uint32_t>(mass));
170}