Jpp 21.0.0-rc.1-88-g0130508c4
the software that should make you happy
Loading...
Searching...
No Matches
JCALIBRATE::ring_type Struct Reference

Auxiliary data structure to define ring. More...

#include <JFitK40.hh>

Public Member Functions

 ring_type (const char c)
 Constructor.
 
int getIndex () const
 Get index.
 
 operator int () const
 Type conversion operator.
 

Static Public Member Functions

static ring_type getRing (const int index)
 Get ring.
 

Public Attributes

char c
 

Friends

std::istream & operator>> (std::istream &in, ring_type &ring)
 Read ring from input stream.
 
std::ostream & operator<< (std::ostream &out, const ring_type &ring)
 Write ring to output stream.
 

Detailed Description

Auxiliary data structure to define ring.

The ring values run from 'A' (down) to 'F' (up).

Definition at line 902 of file JFitK40.hh.

Constructor & Destructor Documentation

◆ ring_type()

JCALIBRATE::ring_type::ring_type ( const char c)
inline

Constructor.

Parameters
cring

Definition at line 908 of file JFitK40.hh.

908 :
909 c(c)
910 {}

Member Function Documentation

◆ getIndex()

int JCALIBRATE::ring_type::getIndex ( ) const
inline

Get index.

Returns
index

Definition at line 918 of file JFitK40.hh.

919 {
920 return (c - 'A');
921 }

◆ operator int()

JCALIBRATE::ring_type::operator int ( ) const
inline

Type conversion operator.

Returns
index

Definition at line 929 of file JFitK40.hh.

930 {
931 return getIndex();
932 }
int getIndex() const
Get index.
Definition JFitK40.hh:918

◆ getRing()

static ring_type JCALIBRATE::ring_type::getRing ( const int index)
inlinestatic

Get ring.

Parameters
indexindex
Returns
ring

Definition at line 941 of file JFitK40.hh.

942 {
943 return { (char) ('A' + index) };
944 }

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
ring_type & ring )
friend

Read ring from input stream.

Parameters
ininput stream
ringring
Returns
input stream

Definition at line 954 of file JFitK40.hh.

955 {
956 return in >> ring.c;
957 }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const ring_type & ring )
friend

Write ring to output stream.

Parameters
outoutput stream
ringring
Returns
output stream

Definition at line 967 of file JFitK40.hh.

968 {
969 return out << ring.c;
970 }

Member Data Documentation

◆ c

char JCALIBRATE::ring_type::c

Definition at line 972 of file JFitK40.hh.


The documentation for this struct was generated from the following file: