evio
6.0
|
Numerical values associated with evio data types. More...
#include <DataType.h>
Public Member Functions | |
const std::string & | getName () const |
Get the name associated with this data type. More... | |
uint32_t | getValue () const |
Get the integer value associated with this data type. More... | |
std::string | toString () const |
Return a string which is usually the same as the name of the enumerated value, except in the cases of ALSOSEGMENT and ALSOBANK which return SEGMENT and BANK respectively. More... | |
bool | isStructure () const |
Convenience routine to see if "this" data type is a structure (a container.) More... | |
bool | isBank () const |
Convenience routine to see if "this" data type is a bank structure. More... | |
bool | isSegment () const |
Convenience routine to see if "this" data type is a segment structure. More... | |
bool | isTagSegment () const |
Convenience routine to see if "this" data type is a tagsegment structure. More... | |
bool | isInteger () const |
Convenience method to see if "this" data type is an integer of some kind - either 8, 16, 32, or 64 bits worth. More... | |
int | getBytes () const |
Return the number of bytes this data type takes (if relevant). More... | |
bool | operator== (const DataType &rhs) const |
bool | operator!= (const DataType &rhs) const |
Static Public Member Functions | |
static const DataType & | getDataType (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 DataType | valueOf (std::string const &typeName) |
Get the enum constant from a string. More... | |
static bool | isStructure (uint32_t dataType) |
Convenience method to see if the given integer arg represents a data type which is a structure (a container). More... | |
static bool | isBank (uint32_t dataType) |
Convenience method to see if the given integer arg represents a BANK. More... | |
static bool | isSegment (uint32_t dataType) |
Convenience method to see if the given integer arg represents a SEGMENT. More... | |
static bool | isTagSegment (uint32_t dataType) |
Convenience method to see if the given integer arg represents a TAGSEGMENT. More... | |
Static Public Attributes | |
static const DataType | UNKNOWN32 = DataType(0x0, "UNKNOWN32") |
Unknown data type. More... | |
static const DataType | UINT32 = DataType(0x1, "UINT32", 4) |
Unsigned 32 bit int. More... | |
static const DataType | FLOAT32 = DataType(0x2, "FLOAT32", 4) |
32 bit float. More... | |
static const DataType | CHARSTAR8 = DataType(0x3, "CHARSTAR8") |
ASCII characters. More... | |
static const DataType | SHORT16 = DataType(0x4, "SHORT16", 2) |
16 bit int. More... | |
static const DataType | USHORT16 = DataType(0x5, "USHORT16", 2) |
Unsigned 16 bit int. More... | |
static const DataType | CHAR8 = DataType(0x6, "CHAR8", 1) |
8 bit int. More... | |
static const DataType | UCHAR8 = DataType(0x7, "UCHAR8", 1) |
Unsigned 8 bit int. More... | |
static const DataType | DOUBLE64 = DataType(0x8, "DOUBLE64", 8) |
64 bit double. More... | |
static const DataType | LONG64 = DataType(0x9, "LONG64", 8) |
64 bit int. More... | |
static const DataType | ULONG64 = DataType(0xa, "ULONG64", 8) |
Unsigned 64 bit int. More... | |
static const DataType | INT32 = DataType(0xb, "INT32", 4) |
32 bit int. More... | |
static const DataType | TAGSEGMENT = DataType(0xc, "TAGSEGMENT") |
Tag segment. More... | |
static const DataType | ALSOSEGMENT = DataType(0xd, "ALSOSEGMENT") |
Segment alternate value. More... | |
static const DataType | ALSOBANK = DataType(0xe, "ALSOBANK") |
Bank alternate value. More... | |
static const DataType | COMPOSITE = DataType(0xf, "COMPOSITE") |
Composite data type. More... | |
static const DataType | BANK = DataType(0x10, "BANK") |
Bank. More... | |
static const DataType | SEGMENT = DataType(0x20, "SEGMENT") |
Segment. More... | |
static const DataType | HOLLERIT = DataType(0x21, "HOLLERIT") |
In composite data, Hollerit type. More... | |
static const DataType | NVALUE = DataType(0x22, "NVALUE") |
In composite data, N value. More... | |
static const DataType | nVALUE = DataType(0x23, "nVALUE") |
In composite data, n value. More... | |
static const DataType | mVALUE = DataType(0x24, "mVALUE") |
In composite data, m value. More... | |
static const DataType | NOT_A_VALID_TYPE = DataType(0x30, "INVALID") |
Not a valid data type. More... | |
Numerical values associated with evio data types.
This class approximates the Java enum it was copied from. ALSOTAGSEGMENT (0x40) value was removed from this class because the upper 2 bits of a byte containing the datatype are now used to store padding data.
|
inline |
Return the number of bytes this data type takes (if relevant).
Referenced by evio::BaseStructure::dataLength(), and evio::BaseStructure::getNumberDataItems().
|
inlinestatic |
Get the object from the integer value.
val | the value to match. |
References UNKNOWN32.
Referenced by evio::EventBuilder::addChild(), evio::StructureTransformer::copy(), evio::EvioNode::getDataTypeObj(), getName(), evio::EvioXMLDictionary::getName(), evio::EvioNode::getTypeObj(), evio::CompositeData::process(), evio::BaseStructureHeader::setDataType(), evio::StructureTransformer::transform(), and evio::BaseStructure::transform().
|
inlinestatic |
Get the name from the integer value.
val | the value to match. |
null
. References getDataType().
Referenced by evio::EventBuilder::addChild(), and evio::BaseStructureHeader::getDataTypeName().
|
inline |
Get the name associated with this data type.
|
inline |
Get the integer value associated with this data type.
Referenced by evio::EvioNode::EvioNode(), evio::EvioNode::extractNode(), evio::BaseStructureHeader::getDataTypeValue(), evio::CompactEventBuilder::openBank(), evio::CompactEventBuilder::openSegment(), evio::CompactEventBuilder::openTagSegment(), evio::EvioNode::scanStructure(), evio::EvioNode::setData(), evio::SegmentHeader::write(), evio::TagSegmentHeader::write(), and evio::BankHeader::write().
|
inlinestatic |
Convenience method to see if the given integer arg represents a BANK.
dataType | the int value to match. |
true
if the data type corresponds to a BANK. References ALSOBANK, and BANK.
Referenced by evio::RecordOutput::addEvent(), and evio::EvioXMLDictionary::getName().
|
inline |
Convenience routine to see if "this" data type is a bank structure.
true
if this data type corresponds to a bank structure. References ALSOBANK, and BANK.
Referenced by evio::EvioNode::scanStructure().
|
inline |
|
inlinestatic |
Convenience method to see if the given integer arg represents a SEGMENT.
dataType | the int value to match. |
true
if the data type corresponds to a SEGMENT. References ALSOSEGMENT, and SEGMENT.
|
inline |
Convenience routine to see if "this" data type is a segment structure.
true
if this data type corresponds to a bank structure. References ALSOSEGMENT, and SEGMENT.
Referenced by evio::EvioNode::scanStructure().
|
inlinestatic |
Convenience method to see if the given integer arg represents a data type which is a structure (a container).
dataType | the int value to match. |
true
if the data type corresponds to one of the structure types: BANK, SEGMENT, TAGSEGMENT, ALSOBANK, or ALSOSEGMENT. References ALSOBANK, ALSOSEGMENT, BANK, SEGMENT, and TAGSEGMENT.
Referenced by evio::EventBuilder::addChild(), and evio::BaseStructure::transform().
|
inline |
Convenience routine to see if "this" data type is a structure (a container.)
true
if the data type corresponds to one of the structure types: BANK, SEGMENT, TAGSEGMENT, ALSOBANK, or ALSOSEGMENT. References ALSOBANK, ALSOSEGMENT, BANK, SEGMENT, and TAGSEGMENT.
Referenced by evio::EvioNode::scanStructure().
|
inlinestatic |
Convenience method to see if the given integer arg represents a TAGSEGMENT.
dataType | the int value to match. |
true
if the data type corresponds to a TAGSEGMENT. References TAGSEGMENT.
|
inline |
Convenience routine to see if "this" data type is a tagsegment structure.
true
if this data type corresponds to a tagsegment structure. References TAGSEGMENT.
bool evio::DataType::operator!= | ( | const DataType & | rhs | ) | const |
bool evio::DataType::operator== | ( | const DataType & | rhs | ) | const |
|
inline |
Return a string which is usually the same as the name of the enumerated value, except in the cases of ALSOSEGMENT and ALSOBANK which return SEGMENT and BANK respectively.
References ALSOBANK, and ALSOSEGMENT.
Referenced by evio::RecordOutput::addEvent(), evio::EvioEvent::toString(), evio::EvioNode::toString(), evio::BaseStructure::toString(), evio::BaseStructure::updateCharData(), evio::BaseStructure::updateCompositeData(), evio::BaseStructure::updateDoubleData(), evio::BaseStructure::updateFloatData(), evio::BaseStructure::updateIntData(), evio::BaseStructure::updateLongData(), evio::BaseStructure::updateShortData(), evio::BaseStructure::updateStringData(), evio::BaseStructure::updateUCharData(), evio::BaseStructure::updateUIntData(), evio::BaseStructure::updateULongData(), and evio::BaseStructure::updateUShortData().
|
inlinestatic |
Get the enum constant from a string.
typeName | the name of the DataType to obtain. |
References UNKNOWN32.
Referenced by evio::EvioXMLDictionary::parseXML().
Bank alternate value.
Referenced by evio::EventBuilder::addChild(), evio::EvioCompactReaderV4::addStructure(), evio::StructureTransformer::copy(), evio::Util::getDataType(), isBank(), isStructure(), evio::CompactEventBuilder::openBank(), evio::EvioCompactReaderV4::removeStructure(), toString(), evio::StructureTransformer::transform(), evio::EvioNode::updateLengths(), evio::EvioNode::updateNum(), and evio::EvioNode::updateTag().
Segment alternate value.
Referenced by evio::EventBuilder::addChild(), evio::EvioCompactReaderV4::addStructure(), evio::StructureTransformer::copy(), evio::Util::getDataType(), isSegment(), isStructure(), evio::CompactEventBuilder::openSegment(), evio::EvioCompactReaderV4::removeStructure(), toString(), evio::StructureTransformer::transform(), evio::EvioNode::updateLengths(), and evio::EvioNode::updateTag().
Bank.
Referenced by evio::EventBuilder::addChild(), evio::EvioCompactReaderV4::addStructure(), evio::StructureTransformer::copy(), evio::EvioNode::EvioNode(), evio::EvioNode::extractNode(), isBank(), isStructure(), evio::EventBuilder::main(), evio::CompactEventBuilder::openBank(), evio::EvioCompactReaderV4::removeStructure(), evio::EvioNode::scanStructure(), evio::EvioNode::setData(), evio::StructureTransformer::transform(), evio::EvioNode::updateLengths(), evio::EvioNode::updateNum(), and evio::EvioNode::updateTag().
8 bit int.
Referenced by evio::CompactEventBuilder::addByteData(), evio::CompositeData::Data::addChar(), evio::EventBuilder::appendCharData(), evio::BaseStructure::dataLength(), evio::CompositeData::dataToRawBytes(), evio::CompositeData::getChar(), evio::BaseStructure::getCharData(), evio::Util::getDataType(), isInteger(), evio::EventBuilder::setCharData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateCharData(), and evio::BaseStructure::write().
ASCII characters.
Referenced by evio::CompositeData::Data::addString(), evio::CompactEventBuilder::addStringData(), evio::EventBuilder::appendStringData(), evio::BaseStructure::dataLength(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::BaseStructure::getNumberDataItems(), evio::BaseStructure::getStringData(), evio::CompositeData::getStrings(), evio::EventBuilder::main(), evio::EventBuilder::setStringData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateStringData(), and evio::BaseStructure::write().
Composite data type.
Referenced by evio::CompactEventBuilder::addCompositeData(), evio::EventBuilder::appendCompositeData(), evio::BaseStructure::dataLength(), evio::BaseStructure::getCompositeData(), evio::Util::getDataType(), evio::BaseStructure::getNumberDataItems(), evio::EventBuilder::setCompositeData(), evio::EvioSwap::swapLeafData(), evio::BaseStructure::updateCompositeData(), and evio::BaseStructure::write().
64 bit double.
Referenced by evio::CompositeData::Data::addDouble(), evio::CompactEventBuilder::addDoubleData(), evio::EventBuilder::appendDoubleData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getDouble(), evio::BaseStructure::getDoubleData(), evio::EventBuilder::main(), evio::EventBuilder::setDoubleData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateDoubleData(), and evio::BaseStructure::write().
32 bit float.
Referenced by evio::CompositeData::Data::addFloat(), evio::CompactEventBuilder::addFloatData(), evio::EventBuilder::appendFloatData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getFloat(), evio::BaseStructure::getFloatData(), evio::EventBuilder::setFloatData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateFloatData(), and evio::BaseStructure::write().
In composite data, Hollerit type.
Referenced by evio::CompositeData::dataToRawBytes(), evio::CompositeData::getHollerit(), evio::CompositeData::process(), and evio::CompositeData::toString().
32 bit int.
Referenced by evio::CompositeData::Data::addInt(), evio::CompactEventBuilder::addIntData(), evio::EventBuilder::appendIntData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getInt(), evio::BaseStructure::getIntData(), isInteger(), evio::EventBuilder::main(), evio::EventBuilder::setIntData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateIntData(), and evio::BaseStructure::write().
64 bit int.
Referenced by evio::CompositeData::Data::addLong(), evio::CompactEventBuilder::addLongData(), evio::EventBuilder::appendLongData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getLong(), evio::BaseStructure::getLongData(), isInteger(), evio::EventBuilder::setLongData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateLongData(), and evio::BaseStructure::write().
In composite data, m value.
Referenced by evio::CompositeData::getmValue(), evio::CompositeData::process(), and evio::CompositeData::toString().
Not a valid data type.
Referenced by evio::Util::getDataType(), evio::EvioXMLDictionary::getType(), and evio::EvioXMLDictionary::parseXML().
In composite data, N value.
Referenced by evio::CompositeData::getNValue(), evio::CompositeData::process(), and evio::CompositeData::toString().
In composite data, n value.
Referenced by evio::CompositeData::getnValue(), evio::CompositeData::process(), and evio::CompositeData::toString().
Segment.
Referenced by evio::EventBuilder::addChild(), evio::EvioCompactReaderV4::addStructure(), evio::StructureTransformer::copy(), isSegment(), isStructure(), evio::EventBuilder::main(), evio::CompactEventBuilder::openSegment(), evio::EvioCompactReaderV4::removeStructure(), evio::EvioNode::scanStructure(), evio::StructureTransformer::transform(), evio::EvioNode::updateLengths(), and evio::EvioNode::updateTag().
16 bit int.
Referenced by evio::CompositeData::Data::addShort(), evio::CompactEventBuilder::addShortData(), evio::EventBuilder::appendShortData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getShort(), evio::BaseStructure::getShortData(), isInteger(), evio::EventBuilder::main(), evio::EventBuilder::setShortData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateShortData(), and evio::BaseStructure::write().
Tag segment.
Referenced by evio::EventBuilder::addChild(), evio::EvioCompactReaderV4::addStructure(), evio::Util::getDataType(), isStructure(), isTagSegment(), evio::EventBuilder::main(), evio::CompactEventBuilder::openTagSegment(), evio::EvioCompactReaderV4::removeStructure(), evio::EvioNode::scanStructure(), evio::EvioNode::updateLengths(), and evio::EvioNode::updateTag().
Unsigned 8 bit int.
Referenced by evio::CompactEventBuilder::addByteData(), evio::CompositeData::Data::addm(), evio::CompositeData::Data::addUChar(), evio::EventBuilder::appendUCharData(), evio::BaseStructure::dataLength(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getUChar(), evio::BaseStructure::getUCharData(), isInteger(), evio::EventBuilder::setUCharData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateUCharData(), and evio::BaseStructure::write().
Unsigned 32 bit int.
Referenced by evio::CompactEventBuilder::addIntData(), evio::CompositeData::Data::addN(), evio::CompositeData::Data::addUint(), evio::EventBuilder::appendUIntData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getUInt(), evio::BaseStructure::getUIntData(), isInteger(), evio::EventBuilder::setUIntData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateUIntData(), and evio::BaseStructure::write().
Unsigned 64 bit int.
Referenced by evio::CompactEventBuilder::addLongData(), evio::CompositeData::Data::addULong(), evio::EventBuilder::appendULongData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getULong(), evio::BaseStructure::getULongData(), isInteger(), evio::EventBuilder::setULongData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateULongData(), and evio::BaseStructure::write().
Unknown data type.
Referenced by evio::CompactEventBuilder::addIntData(), evio::BaseStructure::dataLength(), evio::Util::getDataType(), getDataType(), evio::EvioXMLDictionary::getName(), evio::EvioXMLDictionary::parseXML(), evio::EvioSwap::swapLeafData(), valueOf(), and evio::BaseStructure::write().
Unsigned 16 bit int.
Referenced by evio::CompositeData::Data::addn(), evio::CompactEventBuilder::addShortData(), evio::CompositeData::Data::addUShort(), evio::EventBuilder::appendUShortData(), evio::CompositeData::dataToRawBytes(), evio::Util::getDataType(), evio::CompositeData::getUShort(), evio::BaseStructure::getUShortData(), isInteger(), evio::EventBuilder::setUShortData(), evio::EvioSwap::swapData(), evio::EvioSwap::swapLeafData(), evio::CompositeData::toString(), evio::BaseStructure::updateUShortData(), and evio::BaseStructure::write().