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

This class is used to store relevant info about an evio container (bank, segment, or tag segment), without having to de-serialize it into many objects and arrays. More...

#include <EvioNode.h>

Public Member Functions

 EvioNode ()
 Constructor when fancy features not needed. More...
 
 EvioNode (const EvioNode &firstNode)
 Copy constructor. More...
 
 EvioNode (const std::shared_ptr< EvioNode > &src)
 Copy constructor. More...
 
 EvioNode (EvioNode &&src) noexcept
 Move constructor. More...
 
 EvioNode (size_t pos, uint32_t place, std::shared_ptr< ByteBuffer > &buffer, RecordNode &blockNode)
 Constructor which creates an EvioNode associated with an event (top level) evio container when parsing buffers for evio data. More...
 
 EvioNode (size_t pos, uint32_t place, size_t recordPos, std::shared_ptr< ByteBuffer > &buffer)
 Constructor which creates an EvioNode associated with an event (top level) evio container when parsing buffers for evio data. More...
 
 EvioNode (uint16_t tag, uint8_t num, size_t pos, size_t dataPos, DataType const &type, DataType const &dataType, std::shared_ptr< ByteBuffer > buffer)
 Constructor which creates an EvioNode in the CompactEventBuilder. More...
 
 ~EvioNode ()=default
 
EvioNodeoperator= (const EvioNode &other)
 Assignment operator. More...
 
bool operator== (const EvioNode &src) const
 Comparison operator. More...
 
EvioNodeshift (int deltaPos)
 Shift the positions (pos, dataPos, and recordPos) of this node and its children by a fixed amount. More...
 
std::string toString ()
 Get a string representation of this object. More...
 
void clearLists ()
 Clear childNodes. More...
 
void clear ()
 Clear all data in this object. More...
 
void clearObjects ()
 Empty all lists and remove all other objects from this object. More...
 
void clearIntArray ()
 Only clear the data vector. More...
 
void setBuffer (std::shared_ptr< ByteBuffer > &buf)
 Set the buffer. More...
 
void setData (size_t position, uint32_t plc, std::shared_ptr< ByteBuffer > &buf, RecordNode &recNode)
 Once this node is cleared, it may be reused and then re-initialized with this method. More...
 
void setData (size_t position, uint32_t plc, size_t recPos, std::shared_ptr< ByteBuffer > &buf)
 Once this node is cleared, it may be reused and then re-initialized with this method. More...
 
bool isObsolete () const
 Has the data this node represents in the buffer been removed? More...
 
void setObsolete (bool ob)
 Set whether this node & descendants are now obsolete because the data they represent in the buffer has been removed. More...
 
std::vector< std::shared_ptr
< EvioNode > > & 
getAllNodes ()
 Get the vector of all nodes that this node contains, always including itself. More...
 
std::vector< std::shared_ptr
< EvioNode > > & 
getChildNodes ()
 Get the vector of all child nodes that this node contains. More...
 
void getAllDescendants (std::vector< std::shared_ptr< EvioNode >> &descendants)
 Get the list of all descendant nodes that this node contains - not only the immediate children. More...
 
std::shared_ptr< EvioNodegetChildAt (uint32_t index)
 Get the child node at the given index (starts at 0). More...
 
uint32_t getChildCount () const
 Get the number all children that this node contains. More...
 
std::shared_ptr< ByteBuffergetBuffer ()
 Get the object containing the buffer that this node is associated with. More...
 
uint32_t getLength () const
 Get the length of this evio structure (not including length word itself) in 32-bit words. More...
 
uint32_t getTotalBytes () const
 Get the length of this evio structure including entire header in bytes. More...
 
uint16_t getTag () const
 Get the tag of this evio structure. More...
 
uint8_t getNum () const
 Get the num of this evio structure. More...
 
uint32_t getPad () const
 Get the padding of this evio structure. More...
 
size_t getPosition () const
 Get the file/buffer byte position of this evio structure. More...
 
uint32_t getType () const
 Get the evio type of this evio structure, not what it contains. More...
 
DataType getTypeObj () const
 Get the evio type of this evio structure as an object. More...
 
uint32_t getDataLength () const
 Get the length of this evio structure's data only (no header words) in 32-bit words. More...
 
size_t getDataPosition () const
 Get the file/buffer byte position of this evio structure's data. More...
 
uint32_t getDataType () const
 Get the evio type of the data this evio structure contains. More...
 
DataType getDataTypeObj () const
 Get the evio type of the data this evio structure contains as an object. More...
 
size_t getRecordPosition () const
 Get the file/buffer byte position of the record containing this node. More...
 
uint32_t getPlace () const
 Get the place of containing event in file/buffer. More...
 
std::shared_ptr< EvioNodegetParentNode ()
 Get this node's parent node. More...
 
uint32_t getEventNumber () const
 If this object represents an event (top-level, evio bank), then returns its number (place in file or buffer) starting with 1. More...
 
bool isEvent () const
 Does this object represent an event? More...
 
bool getScanned () const
 Has this object been scanned (i.e. More...
 
void updateLengths (uint32_t deltaLen)
 Update the length of this node in the buffer and all its parent nodes as well. More...
 
void updateTag (uint16_t newTag)
 Update, in the buffer, the tag of the structure header this object represents. More...
 
void updateNum (uint8_t newNum)
 Update, in the buffer, the num of the bank header this object represents. More...
 
ByteBuffergetByteData (ByteBuffer &dest, bool copy)
 Get the data associated with this node in ByteBuffer form. More...
 
std::shared_ptr< ByteBuffer > & getByteData (std::shared_ptr< ByteBuffer > &dest, bool copy)
 Get the data associated with this node in ByteBuffer form. More...
 
std::shared_ptr< ByteBuffergetByteData (bool copy)
 Get the data associated with this node in ByteBuffer form. More...
 
std::vector< uint32_t > & getIntData ()
 Get the data associated with this node as an 32-bit integer vector. More...
 
void getIntData (std::vector< uint32_t > &intData)
 Get the data associated with this node as an 32-bit integer vector. More...
 
void getLongData (std::vector< uint64_t > &longData)
 Get the data associated with this node as an 64-bit integer vector. More...
 
void getShortData (std::vector< uint16_t > &shortData)
 Get the data associated with this node as an 16-bit integer vector. More...
 
ByteBuffergetStructureBuffer (ByteBuffer &dest, bool copy)
 Get this node's entire evio structure in ByteBuffer form. More...
 
std::shared_ptr< ByteBuffer > & getStructureBuffer (std::shared_ptr< ByteBuffer > &dest, bool copy)
 Get this node's entire evio structure in ByteBuffer form. More...
 

Static Public Member Functions

static void scanStructure (std::shared_ptr< EvioNode > &node)
 This method recursively stores, in the given list, all the information about an evio structure's children found in the given ByteBuffer object. More...
 
static std::shared_ptr
< EvioNode > & 
extractNode (std::shared_ptr< EvioNode > &bankNode, size_t position)
 This method populates an EvioNode object that will represent an evio bank from that same node containing a reference to the backing buffer and given a position in that buffer. More...
 
static std::shared_ptr< EvioNodeextractEventNode (std::shared_ptr< ByteBuffer > &buffer, RecordNode &recNode, size_t position, uint32_t place)
 This method extracts an EvioNode object representing an evio event (top level evio bank) from a given buffer, a location in the buffer, and a few other things. More...
 
static std::shared_ptr< EvioNodeextractEventNode (std::shared_ptr< ByteBuffer > &buffer, size_t recPosition, size_t position, uint32_t place)
 This method extracts an EvioNode object representing an evio event (top level evio bank) from a given buffer, a location in the buffer, and a few other things. More...
 

Public Attributes

uint32_t id
 Local id for testing. More...
 

Static Public Attributes

static uint32_t staticId = 0
 Static id for testing. More...
 

Protected Member Functions

 EvioNode (std::shared_ptr< EvioNode > &firstNode, int dummy)
 Constructor used when swapping data. More...
 
std::shared_ptr< EvioNodegetThis ()
 

Friends

class Util
 
class EventHeaderParser
 
class EvioCompactReaderV4
 
class EvioCompactReaderV6
 

Detailed Description

This class is used to store relevant info about an evio container (bank, segment, or tag segment), without having to de-serialize it into many objects and arrays.

It is not thread-safe and is designed for speed.

Author
timmer
Date
07/22/2019

Constructor & Destructor Documentation

evio::EvioNode::EvioNode ( std::shared_ptr< EvioNode > &  containingEvent,
int  dummy 
)
explicitprotected

Constructor used when swapping data.

Parameters
containingEventevent containing this node.
dummythis arg is only here to differentiate it from the other constructor taking a shared pointer of EvioNode. Use any value.
evio::EvioNode::EvioNode ( )

Constructor when fancy features not needed.

evio::EvioNode::EvioNode ( const EvioNode src)

Copy constructor.

evio::EvioNode::EvioNode ( const std::shared_ptr< EvioNode > &  src)
explicit

Copy constructor.

evio::EvioNode::EvioNode ( EvioNode &&  src)
noexcept

Move constructor.

evio::EvioNode::EvioNode ( size_t  pos,
uint32_t  place,
std::shared_ptr< ByteBuffer > &  buffer,
RecordNode recordNode 
)

Constructor which creates an EvioNode associated with an event (top level) evio container when parsing buffers for evio data.

Parameters
posposition of event in buffer (number of bytes)
placecontaining event's place in buffer (starting at 0)
bufferbuffer containing this event
recordNodeblock containing this event

References evio::DataType::BANK, and evio::DataType::getValue().

evio::EvioNode::EvioNode ( size_t  pos,
uint32_t  place,
size_t  recordPos,
std::shared_ptr< ByteBuffer > &  buffer 
)

Constructor which creates an EvioNode associated with an event (top level) evio container when parsing buffers for evio data.

Parameters
posposition of event in buffer (number of bytes).
placecontaining event's place in buffer (starting at 0).
recordPosposition of record containing this node.
bufferbuffer containing this event.

References evio::DataType::BANK, and evio::DataType::getValue().

evio::EvioNode::EvioNode ( uint16_t  tag,
uint8_t  num,
size_t  pos,
size_t  dataPos,
DataType const &  type,
DataType const &  dataType,
std::shared_ptr< ByteBuffer buffer 
)

Constructor which creates an EvioNode in the CompactEventBuilder.

Parameters
tagthe tag for the event (or bank) header.
numthe num for the event (or bank) header.
posposition of event in buffer (bytes).
dataPosposition of event's data in buffer (bytes.)
typethe type of this evio structure.
dataTypethe data type contained in this evio event.
bufferbuffer containing this event.

References evio::DataType::getValue().

evio::EvioNode::~EvioNode ( )
default

Member Function Documentation

void evio::EvioNode::clear ( )

Clear all data in this object.

References clearObjects().

void evio::EvioNode::clearIntArray ( )

Only clear the data vector.

void evio::EvioNode::clearLists ( )

Clear childNodes.

Place only this or eventNode object into the allNodes.

References getThis().

void evio::EvioNode::clearObjects ( )

Empty all lists and remove all other objects from this object.

References evio::RecordNode::clear().

Referenced by clear().

std::shared_ptr< EvioNode > evio::EvioNode::extractEventNode ( std::shared_ptr< ByteBuffer > &  buffer,
RecordNode recNode,
size_t  position,
uint32_t  place 
)
static

This method extracts an EvioNode object representing an evio event (top level evio bank) from a given buffer, a location in the buffer, and a few other things.

An EvioNode object represents an evio container - either a bank, segment, or tag segment.

Parameters
bufferbuffer to examine
recNodeobject holding data about block header
positionposition in buffer
placeplace of event in buffer (starting at 0)
Returns
EvioNode object containing evio event information
Exceptions
EvioExceptionif not enough data in buffer to read evio bank header (8 bytes).

References extractNode().

Referenced by evio::Reader::scanBuffer(), and evio::Reader::scanUncompressedBuffer().

std::shared_ptr< EvioNode > evio::EvioNode::extractEventNode ( std::shared_ptr< ByteBuffer > &  buffer,
size_t  recPosition,
size_t  position,
uint32_t  place 
)
static

This method extracts an EvioNode object representing an evio event (top level evio bank) from a given buffer, a location in the buffer, and a few other things.

An EvioNode object represents an evio container - either a bank, segment, or tag segment.

Parameters
bufferbuffer to examine
recPositionposition of containing record
positionposition in buffer
placeplace of event in buffer (starting at 0)
Returns
EvioNode object containing evio event information
Exceptions
EvioExceptionif not enough data in buffer to read evio bank header (8 bytes).

References extractNode().

std::shared_ptr< EvioNode > & evio::EvioNode::extractNode ( std::shared_ptr< EvioNode > &  bankNode,
size_t  position 
)
static

This method populates an EvioNode object that will represent an evio bank from that same node containing a reference to the backing buffer and given a position in that buffer.

Parameters
bankNodeEvioNode to represent a bank and containing, at least, a reference to backing buffer.
positionposition in backing buffer
Returns
EvioNode bankNode arg filled with appropriate data.
Exceptions
EvioExceptionif not enough data in buffer to read evio bank header (8 bytes).

References evio::DataType::BANK, evio::ByteBuffer::getInt(), evio::ByteBuffer::getUInt(), evio::DataType::getValue(), and evio::ByteBuffer::remaining().

Referenced by evio::EvioCompactReaderV4::addStructure(), and extractEventNode().

void evio::EvioNode::getAllDescendants ( std::vector< std::shared_ptr< EvioNode >> &  descendants)

Get the list of all descendant nodes that this node contains - not only the immediate children.

This is meaningful only if this node has been scanned, otherwise nothing is added to the given list.

Parameters
descendantslist to be filled with EvioNodes of all descendants
std::vector< std::shared_ptr< EvioNode > > & evio::EvioNode::getAllNodes ( )

Get the vector of all nodes that this node contains, always including itself.

This is meaningful only if this node has been scanned, otherwise it contains only itself.

Returns
list of all nodes that this node contains.
std::shared_ptr< ByteBuffer > evio::EvioNode::getBuffer ( )

Get the object containing the buffer that this node is associated with.

Returns
object containing the buffer that this node is associated with.

Referenced by evio::WriterMT::addEvent().

ByteBuffer & evio::EvioNode::getByteData ( ByteBuffer dest,
bool  copy 
)

Get the data associated with this node in ByteBuffer form.

Depending on the copy argument, the given buffer will be filled with either a copy of or a view into this node's buffer. Position and limit are set for reading.

Parameters
destbuffer in which to place data.
copyif true, then return a copy as opposed to a view into this node's buffer.
Returns
dest arg ByteBuffer containing data. Position and limit are set for reading.

References evio::ByteBuffer::copyData(), and evio::ByteBuffer::limit().

Referenced by getByteData().

std::shared_ptr< ByteBuffer > & evio::EvioNode::getByteData ( std::shared_ptr< ByteBuffer > &  dest,
bool  copy 
)

Get the data associated with this node in ByteBuffer form.

Depending on the copy argument, the given buffer will be filled with either a copy of or a view into this node's buffer. Position and limit are set for reading.

Parameters
destbuffer in which to place data.
copyif true, then return a copy as opposed to a view into this node's buffer.
Returns
dest arg ByteBuffer containing data. Position and limit are set for reading.

References getByteData().

std::shared_ptr< ByteBuffer > evio::EvioNode::getByteData ( bool  copy)

Get the data associated with this node in ByteBuffer form.

Depending on the copy argument, the given buffer will be filled with either a copy of or a view into this node's buffer. Position and limit are set for reading.

Parameters
copyif true, then return a copy as opposed to a view into this node's buffer.
Returns
newly created ByteBuffer containing data. Position and limit are set for reading.
std::shared_ptr< EvioNode > evio::EvioNode::getChildAt ( uint32_t  index)

Get the child node at the given index (starts at 0).

This is meaningful only if this node has been scanned, otherwise it is null.

Parameters
indexindex of child node
Returns
child node at the given index; null if not scanned or no child at that index
uint32_t evio::EvioNode::getChildCount ( ) const

Get the number all children that this node contains.

This is meaningful only if this node has been scanned, otherwise it returns 0.

Returns
number of children that this node contains; 0 if not scanned
std::vector< std::shared_ptr< EvioNode > > & evio::EvioNode::getChildNodes ( )

Get the vector of all child nodes that this node contains.

This is meaningful only if this node has been scanned, otherwise it is null.

Returns
list of all child nodes that this node contains; null if not scanned or no children
uint32_t evio::EvioNode::getDataLength ( ) const

Get the length of this evio structure's data only (no header words) in 32-bit words.

Returns
length of this evio structure's data only (no header words) in 32-bit words.

Referenced by evio::CompositeData::swapAll().

size_t evio::EvioNode::getDataPosition ( ) const

Get the file/buffer byte position of this evio structure's data.

Returns
file/buffer byte position of this evio structure's data
uint32_t evio::EvioNode::getDataType ( ) const

Get the evio type of the data this evio structure contains.

Call DataType#getDataType(uint32_t) on the returned value to get the object representation.

Returns
evio type of the data this evio structure contains
DataType evio::EvioNode::getDataTypeObj ( ) const

Get the evio type of the data this evio structure contains as an object.

Returns
evio type of the data this evio structure contains as an object.

References evio::DataType::getDataType().

Referenced by toString().

uint32_t evio::EvioNode::getEventNumber ( ) const

If this object represents an event (top-level, evio bank), then returns its number (place in file or buffer) starting with 1.

If not, return -1.

Returns
event number if representing an event, else -1
std::vector< uint32_t > & evio::EvioNode::getIntData ( )

Get the data associated with this node as an 32-bit integer vector.

Store it and return it in future calls (like in event builder). If data is of a type less than 32 bits, the last int will be junk.

Returns
integer array containing data.
void evio::EvioNode::getIntData ( std::vector< uint32_t > &  intData)

Get the data associated with this node as an 32-bit integer vector.

Place data in the given vector. If data is of a type less than 32 bits, the last int will be junk.

Parameters
intDatavector in which to store data.
uint32_t evio::EvioNode::getLength ( ) const

Get the length of this evio structure (not including length word itself) in 32-bit words.

Returns
length of this evio structure (not including length word itself) in 32-bit words
void evio::EvioNode::getLongData ( std::vector< uint64_t > &  longData)

Get the data associated with this node as an 64-bit integer vector.

Place data in the given vector. If data is of a type less than 64 bits, the last element may be junk.

Parameters
longDatavector in which to store data.
uint8_t evio::EvioNode::getNum ( ) const

Get the num of this evio structure.

Will be zero for tagsegments.

Returns
num of this evio structure
uint32_t evio::EvioNode::getPad ( ) const

Get the padding of this evio structure.

Will be zero for segments and tagsegments.

Returns
padding of this evio structure

Referenced by evio::CompositeData::swapAll().

std::shared_ptr< EvioNode > evio::EvioNode::getParentNode ( )

Get this node's parent node.

Returns
this node's parent node or null if none.
uint32_t evio::EvioNode::getPlace ( ) const

Get the place of containing event in file/buffer.

First event = 0, second = 1, etc. Only for internal use.

Returns
place of containing event in file/buffer.
size_t evio::EvioNode::getPosition ( ) const

Get the file/buffer byte position of this evio structure.

Returns
file/buffer byte position of this evio structure
size_t evio::EvioNode::getRecordPosition ( ) const

Get the file/buffer byte position of the record containing this node.

Since
version 6.
Returns
file/buffer byte position of the record containing this node.
bool evio::EvioNode::getScanned ( ) const

Has this object been scanned (i.e.

has all the information about this node's children been parsed and stored) ?

Returns
true if this object has been scanned, else false
void evio::EvioNode::getShortData ( std::vector< uint16_t > &  shortData)

Get the data associated with this node as an 16-bit integer vector.

Place data in the given vector. If data is of a type less than 16 bits, the last element may be junk.

Parameters
shortDatavectro in which to store data.
ByteBuffer & evio::EvioNode::getStructureBuffer ( ByteBuffer dest,
bool  copy 
)

Get this node's entire evio structure in ByteBuffer form.

Depending on the copy argument, the returned buffer will either have a copy of or a view into the data of this node's buffer. Position and limit are set for reading.

Parameters
destByteBuffer provided to hold the retrieved evio structure.
copyif true, then use a copy of as opposed to a view into this node's buffer.
Returns
dest arg ByteBuffer containing evio structure's bytes. Position and limit are set for reading.

References evio::ByteBuffer::copyData(), and evio::ByteBuffer::limit().

Referenced by evio::RecordOutput::addEvent(), and getStructureBuffer().

std::shared_ptr< ByteBuffer > & evio::EvioNode::getStructureBuffer ( std::shared_ptr< ByteBuffer > &  dest,
bool  copy 
)

Get this node's entire evio structure in ByteBuffer form.

Depending on the copy argument, the returned buffer will either have a copy of or a view into the data of this node's buffer. Position and limit are set for reading.

Parameters
destByteBuffer provided to hold the retrieved evio structure.
copyif true, then use a copy of as opposed to a view into this node's buffer.
Returns
dest arg ByteBuffer containing evio structure's bytes. Position and limit are set for reading.

References getStructureBuffer().

uint16_t evio::EvioNode::getTag ( ) const

Get the tag of this evio structure.

Returns
tag of this evio structure
std::shared_ptr<EvioNode> evio::EvioNode::getThis ( )
inlineprotected

Referenced by clearLists(), and setData().

uint32_t evio::EvioNode::getTotalBytes ( ) const

Get the length of this evio structure including entire header in bytes.

Returns
length of this evio structure including entire header in bytes.

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

uint32_t evio::EvioNode::getType ( ) const

Get the evio type of this evio structure, not what it contains.

Call DataType#getDataType(uint32_t) on the returned value to get the object representation.

Returns
evio type of this evio structure, not what it contains

Referenced by updateLengths().

DataType evio::EvioNode::getTypeObj ( ) const

Get the evio type of this evio structure as an object.

Returns
evio type of this evio structure as an object.

References evio::DataType::getDataType().

Referenced by evio::RecordOutput::addEvent(), and toString().

bool evio::EvioNode::isEvent ( ) const

Does this object represent an event?

Returns
true if this object represents an event, else false
bool evio::EvioNode::isObsolete ( ) const

Has the data this node represents in the buffer been removed?

Returns
true if node no longer represents valid buffer data, else false.
EvioNode & evio::EvioNode::operator= ( const EvioNode src)

Assignment operator.

Parameters
srcright side object.
Returns
left side object.
bool evio::EvioNode::operator== ( const EvioNode src) const

Comparison operator.

Parameters
srcright side object.
Returns
left side object.
void evio::EvioNode::scanStructure ( std::shared_ptr< EvioNode > &  node)
static

This method recursively stores, in the given list, all the information about an evio structure's children found in the given ByteBuffer object.

It uses absolute gets so buffer's position does not change.

Parameters
nodenode being scanned

References evio::DataType::BANK, evio::DataType::getValue(), evio::DataType::isBank(), evio::DataType::isSegment(), evio::DataType::isStructure(), evio::DataType::SEGMENT, and evio::DataType::TAGSEGMENT.

Referenced by evio::EvioCompactReaderV4::addStructure().

void evio::EvioNode::setBuffer ( std::shared_ptr< ByteBuffer > &  buf)

Set the buffer.

Parameters
bufbuffer associated with this object.
void evio::EvioNode::setData ( size_t  position,
uint32_t  plc,
std::shared_ptr< ByteBuffer > &  buf,
RecordNode recNode 
)

Once this node is cleared, it may be reused and then re-initialized with this method.

Parameters
positionposition in buffer
plcplace of event in buffer (starting at 0)
bufbuffer to examine
recNodeobject holding data about header of block containing event

References evio::DataType::BANK, getThis(), and evio::DataType::getValue().

void evio::EvioNode::setData ( size_t  position,
uint32_t  plc,
size_t  recPos,
std::shared_ptr< ByteBuffer > &  buf 
)

Once this node is cleared, it may be reused and then re-initialized with this method.

Parameters
positionposition in buffer
plcplace of event in buffer (starting at 0)
recPosplace of event in containing record (bytes)
bufbuffer to examine

References evio::DataType::BANK, getThis(), and evio::DataType::getValue().

void evio::EvioNode::setObsolete ( bool  ob)

Set whether this node & descendants are now obsolete because the data they represent in the buffer has been removed.

Only for internal use.

Parameters
obtrue if node & descendants no longer represent valid buffer data, else false.
EvioNode & evio::EvioNode::shift ( int  deltaPos)

Shift the positions (pos, dataPos, and recordPos) of this node and its children by a fixed amount.

Useful, for example, when the contents of one buffer is copied into another.

Parameters
deltaPosnumber of bytes to add to existing positions.
Returns
reference to this object.
std::string evio::EvioNode::toString ( )

Get a string representation of this object.

Returns
a string representation of this object.

References getDataTypeObj(), getTypeObj(), and evio::DataType::toString().

void evio::EvioNode::updateLengths ( uint32_t  deltaLen)

Update the length of this node in the buffer and all its parent nodes as well.

For internal use only.

Parameters
deltaLenchange in length (words). Negative value reduces lengths.

References evio::DataType::ALSOBANK, evio::DataType::ALSOSEGMENT, evio::DataType::BANK, evio::ByteOrder::ENDIAN_BIG, getType(), evio::DataType::SEGMENT, and evio::DataType::TAGSEGMENT.

void evio::EvioNode::updateNum ( uint8_t  newNum)

Update, in the buffer, the num of the bank header this object represents.

Sometimes it's necessary to go back and change the num of an evio structure that's already been written. This will do that.

Parameters
newNumnew num value

References evio::DataType::ALSOBANK, evio::DataType::BANK, and evio::ByteOrder::ENDIAN_BIG.

void evio::EvioNode::updateTag ( uint16_t  newTag)

Update, in the buffer, the tag of the structure header this object represents.

Sometimes it's necessary to go back and change the tag of an evio structure that's already been written. This will do that.

Parameters
newTagnew tag value

References evio::DataType::ALSOBANK, evio::DataType::ALSOSEGMENT, evio::DataType::BANK, evio::ByteOrder::ENDIAN_BIG, evio::DataType::SEGMENT, and evio::DataType::TAGSEGMENT.

Friends And Related Function Documentation

friend class EventHeaderParser
friend
friend class EvioCompactReaderV4
friend
friend class EvioCompactReaderV6
friend
friend class Util
friend

Member Data Documentation

uint32_t evio::EvioNode::id

Local id for testing.

uint32_t evio::EvioNode::staticId = 0
static

Static id for testing.


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