PARTONS  
PARtonic Tomography Of Nucleon Software
Public Types | Public Member Functions | Private Attributes | List of all members
PARTONS::PhysicalUnit Class Reference

Definition of units. More...

Public Types

enum  Type {
  UNDEFINED = 0 , NONE = 1 , EV = 2 , KEV = 3 ,
  MEV = 4 , GEV = 5 , TEV = 6 , EV2 = 7 ,
  KEV2 = 8 , MEV2 = 9 , GEV2 = 10 , TEV2 = 11 ,
  EVm1 = 12 , KEVm1 = 13 , MEVm1 = 14 , GEVm1 = 15 ,
  TEVm1 = 16 , FM = 17 , PM = 18 , NM = 19 ,
  UM = 20 , MM = 21 , M = 22 , FS = 23 ,
  PS = 24 , NS = 25 , US = 26 , MS = 27 ,
  S = 28 , GEVm2 = 29 , FM2 = 30 , FB = 31 ,
  PB = 32 , NB = 33 , UB = 34 , MB = 35 ,
  B = 36 , DEG = 37 , RAD = 38 , MRAD = 39
}
 Enum types. More...
 

Public Member Functions

 PhysicalUnit ()
 Default constructor. More...
 
 PhysicalUnit (Type type)
 Assignment constructor. More...
 
 PhysicalUnit (const std::string &type)
 Assignment constructor. More...
 
 PhysicalUnit (const PhysicalUnit &other)
 Copy constructor. More...
 
 operator Type () const
 Automatic cast to enum. More...
 
std::string toString () const
 Get string representing class content. More...
 
std::string getShortName ()
 Get short string representing PhysicalUnit::m_type. More...
 
void serialize (ElemUtils::Packet &packet) const
 Serialize into given Packet. More...
 
void unserialize (ElemUtils::Packet &packet)
 Retrieve data from given Packet. More...
 
UnitCategory::Type getUnitCategory () const
 Get unit category. More...
 
double getConversionFactor () const
 Get conversion factor. More...
 
PhysicalUnit::Type getType () const
 Get PhysicalUnit::m_type. More...
 
void setType (Type type)
 Set PhysicalUnit::m_type. More...
 

Private Attributes

PhysicalUnit::Type m_type
 Type. More...
 

Detailed Description

Definition of units.

Member Enumeration Documentation

◆ Type

Enum types.

Enumerator
UNDEFINED 

undefined

NONE 

none

EV 

eV

KEV 

keV

MEV 

MeV.

GEV 

GeV.

TEV 

TeV.

EV2 

eV^2

KEV2 

keV^2

MEV2 

MeV^2.

GEV2 

GeV^2.

TEV2 

TeV^2.

EVm1 

eV^-1

KEVm1 

keV^-1

MEVm1 

MeV^-1.

GEVm1 

GeV^-1.

TEVm1 

TeV^-1.

FM 

fm

PM 

pm

NM 

nm

UM 

um

MM 

mm

m

FS 

fs

PS 

ps

NS 

ns

US 

us

MS 

ms

s

GEVm2 

GeV^-2.

FM2 

fm^2

FB 

fb

PB 

pb

NB 

nb

UB 

ub

MB 

mb

b

DEG 

degree

RAD 

radian

MRAD 

mradian

Constructor & Destructor Documentation

◆ PhysicalUnit() [1/4]

PARTONS::PhysicalUnit::PhysicalUnit ( )

Default constructor.

◆ PhysicalUnit() [2/4]

PARTONS::PhysicalUnit::PhysicalUnit ( Type  type)

Assignment constructor.

Parameters
typeType to be assigned.

◆ PhysicalUnit() [3/4]

PARTONS::PhysicalUnit::PhysicalUnit ( const std::string &  type)

Assignment constructor.

Parameters
typeType to be assigned.

◆ PhysicalUnit() [4/4]

PARTONS::PhysicalUnit::PhysicalUnit ( const PhysicalUnit other)

Copy constructor.

Parameters
otherObject to be copied.

Member Function Documentation

◆ getConversionFactor()

double PARTONS::PhysicalUnit::getConversionFactor ( ) const

Get conversion factor.

◆ getShortName()

std::string PARTONS::PhysicalUnit::getShortName ( )

Get short string representing PhysicalUnit::m_type.

◆ getType()

PhysicalUnit::Type PARTONS::PhysicalUnit::getType ( ) const

◆ getUnitCategory()

UnitCategory::Type PARTONS::PhysicalUnit::getUnitCategory ( ) const

Get unit category.

◆ operator Type()

PARTONS::PhysicalUnit::operator PhysicalUnit::Type ( ) const

Automatic cast to enum.

◆ serialize()

void PARTONS::PhysicalUnit::serialize ( ElemUtils::Packet &  packet) const

Serialize into given Packet.

Parameters
packetTarget Packet.

◆ setType()

void PARTONS::PhysicalUnit::setType ( Type  type)

◆ toString()

std::string PARTONS::PhysicalUnit::toString ( ) const

Get string representing class content.

◆ unserialize()

void PARTONS::PhysicalUnit::unserialize ( ElemUtils::Packet &  packet)

Retrieve data from given Packet.

Parameters
packetInput Packet.

Member Data Documentation

◆ m_type

PhysicalUnit::Type PARTONS::PhysicalUnit::m_type
private

Type.


The documentation for this class was generated from the following files: