evio  6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
evio::HeaderType Class Reference

Numerical values associated with types of a file or record header. More...

#include <HeaderType.h>

Public Member Functions

std::string getName () const
 Get the object name. More...
 
uint32_t getValue () const
 Get the integer value associated with this header type. More...
 
bool isEvioFileHeader () const
 Is this an evio file header? More...
 
bool isHipoFileHeader () const
 Is this a HIPO file header? More...
 
bool isFileHeader () const
 Is this a file header? More...
 
bool isTrailer () const
 Is this a trailer? More...
 
bool operator== (const HeaderType &rhs) const
 
bool operator!= (const HeaderType &rhs) const
 

Static Public Member Functions

static const HeaderTypegetHeaderType (uint32_t val)
 Get the object from the integer value. More...
 
static std::string getName (uint32_t val)
 Get the name from the integer value. More...
 

Static Public Attributes

static const HeaderType EVIO_RECORD = HeaderType(0, "EVIO_RECORD")
 Header for a general evio record. More...
 
static const HeaderType EVIO_FILE = HeaderType(1, "EVIO_FILE")
 Header for an evio file. More...
 
static const HeaderType EVIO_FILE_EXTENDED = HeaderType(2, "EVIO_FILE_EXTENDED")
 Header for an extended evio file. More...
 
static const HeaderType EVIO_TRAILER = HeaderType(3, "EVIO_TRAILER")
 Header for an evio trailer record. More...
 
static const HeaderType HIPO_RECORD = HeaderType(4, "HIPO_RECORD")
 Header for a general hipo record. More...
 
static const HeaderType HIPO_FILE = HeaderType(5, "HIPO_FILE")
 Header for an hipo file. More...
 
static const HeaderType HIPO_FILE_EXTENDED = HeaderType(6, "HIPO_FILE_EXTENDED")
 Header for an extended hipo file. More...
 
static const HeaderType HIPO_TRAILER = HeaderType(7, "HIPO_TRAILER")
 Header for an hipo trailer record. More...
 
static const HeaderType UNKNOWN = HeaderType(15, "UNKNOWN")
 Unknown header. More...
 

Detailed Description

Numerical values associated with types of a file or record header.

The value associated with each member is stored in the header's bit-info word in the top 4 bits. Thus the lowest value is 0 and the highest (UNKNOWN) is 15. This class approximates the Java enum it was copied from.

Version
6.0
Since
6.0 4/10/2019
Author
timmer

Member Function Documentation

static const HeaderType& evio::HeaderType::getHeaderType ( uint32_t  val)
inlinestatic

Get the object from the integer value.

Parameters
valthe value to match.
Returns
the matching enum, or null.

References UNKNOWN.

Referenced by getName().

std::string evio::HeaderType::getName ( ) const
inline

Get the object name.

Returns
the object name.
static std::string evio::HeaderType::getName ( uint32_t  val)
inlinestatic

Get the name from the integer value.

Parameters
valthe value to match.
Returns
the name, or null.

References getHeaderType().

uint32_t evio::HeaderType::getValue ( ) const
inline

Get the integer value associated with this header type.

Returns
integer value associated with this header type.

Referenced by evio::FileHeader::setBitInfo(), and evio::RecordHeader::setHeaderType().

bool evio::HeaderType::isEvioFileHeader ( ) const
inline

Is this an evio file header?

Returns
true if is an evio file header, else false

References EVIO_FILE, and EVIO_FILE_EXTENDED.

Referenced by isFileHeader(), and evio::RecordOutput::RecordOutput().

bool evio::HeaderType::isFileHeader ( ) const
inline

Is this a file header?

Returns
true if is a file header, else false

References isEvioFileHeader(), and isHipoFileHeader().

bool evio::HeaderType::isHipoFileHeader ( ) const
inline

Is this a HIPO file header?

Returns
true if is an HIPO file header, else false

References HIPO_FILE, and HIPO_FILE_EXTENDED.

Referenced by isFileHeader(), and evio::RecordOutput::RecordOutput().

bool evio::HeaderType::isTrailer ( ) const
inline

Is this a trailer?

Returns
true if is a trailer, else false

References EVIO_TRAILER, and HIPO_TRAILER.

bool evio::HeaderType::operator!= ( const HeaderType rhs) const
bool evio::HeaderType::operator== ( const HeaderType rhs) const

Member Data Documentation

const HeaderType evio::HeaderType::EVIO_FILE = HeaderType(1, "EVIO_FILE")
static

Header for an evio file.

Referenced by evio::FileHeader::FileHeader(), and isEvioFileHeader().

const HeaderType evio::HeaderType::EVIO_FILE_EXTENDED = HeaderType(2, "EVIO_FILE_EXTENDED")
static

Header for an extended evio file.

Currently not used.

Referenced by isEvioFileHeader().

const HeaderType evio::HeaderType::EVIO_RECORD = HeaderType(0, "EVIO_RECORD")
static
const HeaderType evio::HeaderType::EVIO_TRAILER = HeaderType(3, "EVIO_TRAILER")
static

Header for an evio trailer record.

Referenced by isTrailer(), and evio::RecordOutput::RecordOutput().

const HeaderType evio::HeaderType::HIPO_FILE = HeaderType(5, "HIPO_FILE")
static
const HeaderType evio::HeaderType::HIPO_FILE_EXTENDED = HeaderType(6, "HIPO_FILE_EXTENDED")
static

Header for an extended hipo file.

Currently not used.

Referenced by isHipoFileHeader().

const HeaderType evio::HeaderType::HIPO_RECORD = HeaderType(4, "HIPO_RECORD")
static

Header for a general hipo record.

Referenced by evio::RecordOutput::RecordOutput().

const HeaderType evio::HeaderType::HIPO_TRAILER = HeaderType(7, "HIPO_TRAILER")
static

Header for an hipo trailer record.

Referenced by isTrailer(), and evio::RecordOutput::RecordOutput().

const HeaderType evio::HeaderType::UNKNOWN = HeaderType(15, "UNKNOWN")
static

Unknown header.

Referenced by getHeaderType().


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