|
evio
5.3
|
Represents an evio tree/event in memory. More...
#include <evioUtil.hxx>
Public Member Functions | |
| evioDOMTree () | |
| No-arg constructor creates empty tree name="evio", root node is bank with tag=0, num=0. More... | |
| evioDOMTree (evioDictionary *dictionary) | |
| Constructor creates empty tree name="evio" with dictionary, root node is bank with tag=0, num=0. More... | |
| evioDOMTree (const evioChannel &channel, const string &name="evio") | |
| Constructor fills tree from contents of evioChannel object, gets dictionary from channel. More... | |
| evioDOMTree (const evioChannel *channel, const string &name="evio") | |
| Constructor fills tree from contents of evioChannel object, gets dictionary from channel. More... | |
| evioDOMTree (const uint32_t *buf, const string &name="evio") | |
| Constructor fills tree from contents of buffer. More... | |
| evioDOMTree (evioDOMNodeP node, const string &name="evio") | |
| Constructor creates tree using node as the root node. More... | |
| evioDOMTree (uint16_t tag, uint8_t num, ContainerType cType=BANK, const string &name="evio") | |
| Constructor creates new container node as root node. More... | |
| evioDOMTree (const string &bankName, ContainerType cType=BANK, const string &name="evio") | |
| Constructor creates new container node as root node. More... | |
| evioDOMTree (evioDictEntry tn, ContainerType cType=BANK, const string &name="evio") | |
| Constructor creates new container node as root node. More... | |
| evioDOMTree (const string &bankName, evioDictionary *dictionary, ContainerType cType=BANK, const string &name="evio") | |
| virtual | ~evioDOMTree () |
| Destructor deletes root node and contents. More... | |
| void | clear () |
| Removes and deletes tree root node and all its contents. More... | |
| void | addBank (evioDOMNodeP node) |
| Makes node root if tree is empty, or adds node to root if a container. More... | |
| template<typename T > | |
| void | addBank (uint16_t tag, uint8_t num, const vector< T > &dataVec) |
| template<typename T > | |
| void | addBank (uint16_t tag, uint8_t num, const T *dataBuf, int dataLen) |
| template<typename T > | |
| void | addBank (evioDictEntry tn, const vector< T > &dataVec) |
| template<typename T > | |
| void | addBank (evioDictEntry tn, const T *dataBuf, int dataLen) |
| template<typename T > | |
| void | addBank (const string &name, const vector< T > &dataVec) |
| template<typename T > | |
| void | addBank (const string &name, const T *dataBuf, int dataLen) |
| void | addBank (uint16_t tag, uint8_t num, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const vector< uint32_t > &dataVec) |
| Creates leaf node and adds it to tree root node. More... | |
| void | addBank (uint16_t tag, uint8_t num, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const uint32_t *t, int len) |
| Creates leaf node and adds it to tree root node. More... | |
| void | addBank (evioDictEntry tn, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const vector< uint32_t > &dataVec) |
| Creates leaf node and adds it to tree root node. More... | |
| void | addBank (evioDictEntry tn, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const uint32_t *t, int len) |
| Creates leaf node and adds it to tree root node. More... | |
| void | addBank (const string &name, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const vector< uint32_t > &dataVec) |
| Creates leaf node and adds it to tree root node. More... | |
| void | addBank (const string &name, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const uint32_t *t, int len) |
| Creates leaf node and adds it to tree root node. More... | |
| evioDOMNodeP | createNode (const string &name, ContainerType cType=BANK) const |
| Creates new container node. More... | |
| template<typename T > | |
| evioDOMNodeP | createNode (const string &name, const vector< T > &tVec) const |
| template<typename T > | |
| evioDOMNodeP | createNode (const string &name, const T *t, int len) const |
| evioDOMNodeP | createNode (const string &name, const evioSerializable &o, ContainerType cType=BANK) const |
| Creates new container node. More... | |
| evioDOMNodeP | createNode (const string &name, void(*f)(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK) const |
| Creates new container node. More... | |
| template<typename T > | |
| evioDOMNodeP | createNode (const string &name, T *t, void *userArg, ContainerType cType=BANK) const |
| template<typename T > | |
| evioDOMNodeP | createNode (const string &name, T *t, void *T::*mfp(evioDOMNodeP c, void *userArg), void *userArg, ContainerType cType=BANK) const |
| evioDOMNodeP | createNode (const string &name, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const vector< uint32_t > &dataVec) const |
| Creates new composite leaf node. More... | |
| evioDOMNodeP | createNode (const string &name, uint16_t formatTag, const string &formatString, uint16_t dataTag, uint8_t dataNum, const uint32_t *t, int len) const |
| Creates new composite leaf node. More... | |
| evioDOMTree & | operator<< (evioDOMNodeP node) |
| Makes node root if tree is empty, or adds node to root if a container. More... | |
| int | getSerializedLength () const |
| Gets serialized length of tree. More... | |
| int | toEVIOBuffer (uint32_t *buf, int size) const |
| Serializes tree to buffer. More... | |
| evioDOMNodeListP | getNodeList () |
| Returns list of all nodes in tree. More... | |
| evioDOMNodeListP | getNodeList (const string &name) |
| Returns list of all nodes in tree with particular name, evioDictEntry from dictionary. More... | |
| template<class Predicate > | |
| evioDOMNodeListP | getNodeList (Predicate pred) |
| template<class Predicate > | |
| evioDOMNodeP | getFirstNode (Predicate pred) |
| template<typename T > | |
| vector< T > * | getVectorUnique () |
| template<typename T , class Predicate > | |
| vector< T > * | getVectorUnique (Predicate pred) |
| string | toString () const |
| Returns XML string listing tree contents. More... | |
| string | toString (const evioToStringConfig *config) const |
| Returns XML string listing tree contents. More... | |
| string | toString (const evioToStringConfig &config) const |
| const evioDictionary * | getDictionary () const |
| Sets dictionary to use by this tree. More... | |
| void | setDictionary (const evioDictionary *dict) |
| Sets dictionary to use by this tree. More... | |
| void | setDictionary (const evioDictionary &dict) |
| Sets dictionary to use by this tree. More... | |
Public Member Functions inherited from evio::evioStreamParserHandler | |
| virtual | ~evioStreamParserHandler () |
Public Member Functions inherited from evio::evioChannelBufferizable | |
| virtual | ~evioChannelBufferizable () |
Public Attributes | |
| evioDOMNodeP | root |
| Pointer to root node of tree. More... | |
| string | name |
| Name of tree. More... | |
| const evioDictionary * | dictionary |
| Dictionary to use for this tree. More... | |
Represents an evio tree/event in memory.
Tree root is an evioDOMNode.
| evioDOMTree::evioDOMTree | ( | ) |
No-arg constructor creates empty tree name="evio", root node is bank with tag=0, num=0.
References evio::BANK, evio::evioDOMNode::createEvioDOMNode(), evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | evioDictionary * | dict | ) |
Constructor creates empty tree name="evio" with dictionary, root node is bank with tag=0, num=0.
| dict | dictionary |
References evio::BANK, evio::evioDOMNode::createEvioDOMNode(), evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | const evioChannel & | channel, |
| const string & | name = "evio" |
||
| ) |
Constructor fills tree from contents of evioChannel object, gets dictionary from channel.
| channel | evioChannel object |
| name | Name of tree |
References dictionary, evio::evioChannel::getBuffer(), evio::evioChannel::getDictionary(), evio::evioChannel::getNoCopyBuffer(), evio::evioChannel::getRandomBuffer(), evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | const evioChannel * | channel, |
| const string & | name = "evio" |
||
| ) |
Constructor fills tree from contents of evioChannel object, gets dictionary from channel.
| channel | Pointer to evioChannel object |
| name | Name of tree |
References dictionary, evio::evioChannel::getBuffer(), evio::evioChannel::getDictionary(), evio::evioChannel::getNoCopyBuffer(), evio::evioChannel::getRandomBuffer(), evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | const uint32_t * | buf, |
| const string & | name = "evio" |
||
| ) |
Constructor fills tree from contents of buffer.
| buf | Buffer containing event |
| name | Name of tree |
References evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | evioDOMNodeP | node, |
| const string & | name = "evio" |
||
| ) |
Constructor creates tree using node as the root node.
| node | Pointer to node that becomes the root node |
| name | Name of tree |
References evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | uint16_t | tag, |
| uint8_t | num, | ||
| ContainerType | cType = BANK, |
||
| const string & | name = "evio" |
||
| ) |
Constructor creates new container node as root node.
| tag | Root node tag |
| num | Root node num |
| cType | Root node content type |
| name | Name of tree |
References evio::evioDOMNode::createEvioDOMNode(), evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | const string & | bankName, |
| ContainerType | cType = BANK, |
||
| const string & | name = "evio" |
||
| ) |
Constructor creates new container node as root node.
| tag | Root node name |
| cType | Root node content type |
| name | Name of tree |
References evio::evioDOMNode::createEvioDOMNode(), dictionary, evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), evio::evioDictEntry::getTag(), evio::evioDOMNode::parentTree, and root.
| evioDOMTree::evioDOMTree | ( | evioDictEntry | tn, |
| ContainerType | cType = BANK, |
||
| const string & | name = "evio" |
||
| ) |
Constructor creates new container node as root node.
| name | Root node evioDictEntry |
| cType | Root node content type |
| name | Name of tree |
References evio::evioDOMNode::createEvioDOMNode(), evio::evioDictEntry::getNum(), evio::evioDictEntry::getTag(), evio::evioDOMNode::parentTree, and root.
| evio::evioDOMTree::evioDOMTree | ( | const string & | bankName, |
| evioDictionary * | dictionary, | ||
| ContainerType | cType = BANK, |
||
| const string & | name = "evio" |
||
| ) |
|
virtual |
Destructor deletes root node and contents.
References evio::evioDOMNode::cutAndDelete(), and root.
| void evio::evioDOMTree::addBank | ( | const string & | name, |
| const T * | dataBuf, | ||
| int | dataLen | ||
| ) |
| void evio::evioDOMTree::addBank | ( | const string & | name, |
| const vector< T > & | dataVec | ||
| ) |
| void evioDOMTree::addBank | ( | const string & | name, |
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const uint32_t * | t, | ||
| int | len | ||
| ) |
Creates leaf node and adds it to tree root node.
| name | Leaf node name |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| t | array of uint32_t data @parem len Length of array |
References addBank(), dictionary, evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), evio::evioDictEntry::getTag(), and name.
| void evioDOMTree::addBank | ( | const string & | name, |
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const vector< uint32_t > & | dataVec | ||
| ) |
Creates leaf node and adds it to tree root node.
| name | Leaf node name |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| dataVec | vector<T> of data |
References addBank(), dictionary, evio::evioDictionary::getEntry(), evio::evioDictEntry::getNum(), evio::evioDictEntry::getTag(), and name.
| void evio::evioDOMTree::addBank | ( | evioDictEntry | tn, |
| const T * | dataBuf, | ||
| int | dataLen | ||
| ) |
| void evio::evioDOMTree::addBank | ( | evioDictEntry | tn, |
| const vector< T > & | dataVec | ||
| ) |
| void evioDOMTree::addBank | ( | evioDictEntry | tn, |
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const uint32_t * | t, | ||
| int | len | ||
| ) |
Creates leaf node and adds it to tree root node.
| tn | Leaf evioDictEntry |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| t | array of uint32_t data @parem len Length of array |
References addBank(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().
| void evioDOMTree::addBank | ( | evioDictEntry | tn, |
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const vector< uint32_t > & | dataVec | ||
| ) |
Creates leaf node and adds it to tree root node.
| tn | Leaf evioDictEntry |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| dataVec | vector<T> of data |
References addBank(), evio::evioDictEntry::getNum(), and evio::evioDictEntry::getTag().
| void evioDOMTree::addBank | ( | evioDOMNodeP | node | ) |
Makes node root if tree is empty, or adds node to root if a container.
| node | Node to add to tree |
References evio::evioDOMContainerNode::childList, evio::evioDOMNode::cut(), evio::evioDOMNode::isContainer(), evio::evioDOMNode::parent, evio::evioDOMNode::parentTree, and root.
Referenced by addBank(), and operator<<().
| void evio::evioDOMTree::addBank | ( | uint16_t | tag, |
| uint8_t | num, | ||
| const T * | dataBuf, | ||
| int | dataLen | ||
| ) |
| void evio::evioDOMTree::addBank | ( | uint16_t | tag, |
| uint8_t | num, | ||
| const vector< T > & | dataVec | ||
| ) |
| void evioDOMTree::addBank | ( | uint16_t | tag, |
| uint8_t | num, | ||
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const uint32_t * | t, | ||
| int | len | ||
| ) |
Creates leaf node and adds it to tree root node.
| tag | Node tag |
| num | Node num |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| t | array of uint32_t data @parem len Length of array |
References evio::evioDOMNode::createEvioDOMNode(), evio::evioDOMNode::isContainer(), evio::evioDOMNode::parent, evio::evioDOMNode::parentTree, and root.
| void evioDOMTree::addBank | ( | uint16_t | tag, |
| uint8_t | num, | ||
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const vector< uint32_t > & | dataVec | ||
| ) |
Creates leaf node and adds it to tree root node.
| tag | Node tag |
| num | Node num |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| dataVec | vector<T> of data |
References evio::evioDOMNode::createEvioDOMNode(), evio::evioDOMNode::isContainer(), evio::evioDOMNode::parent, evio::evioDOMNode::parentTree, and root.
| void evioDOMTree::clear | ( | ) |
Removes and deletes tree root node and all its contents.
References evio::evioDOMNode::cutAndDelete(), and root.
| evioDOMNodeP evioDOMTree::createNode | ( | const string & | nName, |
| const evioSerializable & | o, | ||
| ContainerType | cType = BANK |
||
| ) | const |
Creates new container node.
| nName | Node name |
| ContainerType | Type of container node |
References evio::evioDOMNode::createEvioDOMNode(), and dictionary.
| evioDOMNodeP evio::evioDOMTree::createNode | ( | const string & | name, |
| const T * | t, | ||
| int | len | ||
| ) | const |
| evioDOMNodeP evio::evioDOMTree::createNode | ( | const string & | name, |
| const vector< T > & | tVec | ||
| ) | const |
| evioDOMNodeP evioDOMTree::createNode | ( | const string & | nName, |
| ContainerType | cType = BANK |
||
| ) | const |
Creates new container node.
| nName | Node name |
| ContainerType | Type of container node |
References evio::evioDOMNode::createEvioDOMNode(), and dictionary.
| evioDOMNodeP evio::evioDOMTree::createNode | ( | const string & | name, |
| T * | t, | ||
| void *T::* | mfpevioDOMNodeP c, void *userArg, | ||
| void * | userArg, | ||
| ContainerType | cType = BANK |
||
| ) | const |
| evioDOMNodeP evio::evioDOMTree::createNode | ( | const string & | name, |
| T * | t, | ||
| void * | userArg, | ||
| ContainerType | cType = BANK |
||
| ) | const |
| evioDOMNodeP evioDOMTree::createNode | ( | const string & | nName, |
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const uint32_t * | t, | ||
| int | len | ||
| ) | const |
Creates new composite leaf node.
| nName | Node name |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| dataVec | Pointer to arry of uint32_t data |
| len | Length of array |
References evio::evioDOMNode::createEvioDOMNode(), and dictionary.
| evioDOMNodeP evioDOMTree::createNode | ( | const string & | nName, |
| uint16_t | formatTag, | ||
| const string & | formatString, | ||
| uint16_t | dataTag, | ||
| uint8_t | dataNum, | ||
| const vector< uint32_t > & | dataVec | ||
| ) | const |
Creates new composite leaf node.
| nName | Node name |
| formatTag | Format tag |
| formatString | Format string |
| dataTag | Data tag |
| dataNum | Data num |
| dataVec | Vector of uint32_t data |
References evio::evioDOMNode::createEvioDOMNode(), and dictionary.
| evioDOMNodeP evioDOMTree::createNode | ( | const string & | nName, |
| void(*)(evioDOMNodeP c, void *userArg) | f, | ||
| void * | userArg, | ||
| ContainerType | cType = BANK |
||
| ) | const |
Creates new container node.
| nName | Node name |
| ContainerType | Type of container node |
References evio::evioDOMNode::createEvioDOMNode(), and dictionary.
| const evioDictionary * evioDOMTree::getDictionary | ( | ) | const |
| evioDOMNodeP evio::evioDOMTree::getFirstNode | ( | Predicate | pred | ) |
| evioDOMNodeListP evioDOMTree::getNodeList | ( | ) |
Returns list of all nodes in tree.
References root.
| evioDOMNodeListP evioDOMTree::getNodeList | ( | const string & | nName | ) |
Returns list of all nodes in tree with particular name, evioDictEntry from dictionary.
| name | Name of banks to find |
References dictionary, evio::evioDictionary::getTagNumMap, and root.
| evioDOMNodeListP evio::evioDOMTree::getNodeList | ( | Predicate | pred | ) |
| int evioDOMTree::getSerializedLength | ( | ) | const |
| vector<T>* evio::evioDOMTree::getVectorUnique | ( | ) |
| vector<T>* evio::evioDOMTree::getVectorUnique | ( | Predicate | pred | ) |
| evioDOMTree & evioDOMTree::operator<< | ( | evioDOMNodeP | node | ) |
Makes node root if tree is empty, or adds node to root if a container.
| node | Node to add to root |
References addBank().
| void evioDOMTree::setDictionary | ( | const evioDictionary & | dict | ) |
| void evioDOMTree::setDictionary | ( | const evioDictionary * | dict | ) |
|
virtual |
Serializes tree to buffer.
| buf | Buffer that receives serialized tree |
| size | Size of buffer |
Implements evio::evioChannelBufferizable.
References root.
| string evioDOMTree::toString | ( | ) | const |
Returns XML string listing tree contents.
References dictionary, and root.
Referenced by toString().
| string evioDOMTree::toString | ( | const evioToStringConfig & | config | ) | const |
| config | Pointer to config Returns XML string listing tree contents. |
References toString().
| string evioDOMTree::toString | ( | const evioToStringConfig * | config | ) | const |
Returns XML string listing tree contents.
| config | Pointer to evioToStringConfig contains options that control string creation |
References dictionary, root, evio::evioToStringConfig::setDictionary(), and evio::evioToStringConfig::toStringDictionary.
| const evioDictionary* evio::evioDOMTree::dictionary |
Dictionary to use for this tree.
Referenced by addBank(), createNode(), evioDOMTree(), getDictionary(), getNodeList(), setDictionary(), and toString().
| string evio::evioDOMTree::name |
Name of tree.
Referenced by addBank().
| evioDOMNodeP evio::evioDOMTree::root |
Pointer to root node of tree.
Referenced by addBank(), clear(), evio::evioDOMNode::cut(), evioDOMTree(), getNodeList(), getSerializedLength(), toEVIOBuffer(), toString(), and ~evioDOMTree().