GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
|
Class to access ODB info from an XML ODB dump at either the begining of a run or from a seperate file.
Public Member Functions | |
TXMLOdb (char *buffer, int size=0) | |
TXMLOdb (const TXMLOdb &rhs) | |
TXMLOdb (TXMLOdb &&) noexcept=default | |
virtual | ~TXMLOdb () |
TXMLNode * | FindNode (const char *name, TXMLNode *node=nullptr) |
TXMLNode * | FindPath (const char *path, TXMLNode *node=nullptr) |
const char * | GetNodeName (TXMLNode *) |
TXMLOdb & | operator= (const TXMLOdb &)=default |
TXMLOdb & | operator= (TXMLOdb &&) noexcept=default |
std::vector< double > | ReadDoubleArray (TXMLNode *node) |
int | ReadInt (const char *path, int index=0, int defaultValue=0xffffffff) |
std::vector< int > | ReadIntArray (TXMLNode *node) |
std::vector< std::string > | ReadStringArray (TXMLNode *node) |
Public Attributes | |
TXMLDocument * | fDoc |
TXMLNode * | fOdb |
TDOMParser * | fParser |
Static Private Attributes | |
static std::array< char, 256 > | fTextBuffer |
|
explicit |
Creator, tries to open buffer as input file and parse it, if that fails, parses size bytes of the buffer.
Definition at line 12 of file TXMLOdb.cxx.
TXMLOdb::TXMLOdb | ( | const TXMLOdb & | rhs | ) |
|
defaultnoexcept |
|
virtual |
Default destructor, deletes the parser.
Definition at line 35 of file TXMLOdb.cxx.
References fParser.
TXMLNode * TXMLOdb::FindNode | ( | const char * | name, |
TXMLNode * | node = nullptr ) |
Finds node with name "name". If a node is provided this node will be used as a starting point. If the provided node is a null pointer fOdb is used instead. Returns a null pointer if the search fails.
Definition at line 41 of file TXMLOdb.cxx.
References fOdb, and GetNodeName().
Referenced by FindPath().
TXMLNode * TXMLOdb::FindPath | ( | const char * | path, |
TXMLNode * | node = nullptr ) |
Find path "path" under the provided node. If the node is a null pointer, fOdb is used instead.
Definition at line 67 of file TXMLOdb.cxx.
References FindNode(), and fOdb.
Referenced by ReadInt(), TMidasFile::SetEPICSOdb(), TMidasFile::SetFileOdb(), TMidasFile::SetGRIFFOdb(), TMidasFile::SetRunInfo(), TMidasFile::SetTIGDAQOdb(), and TMidasFile::SetTIGOdb().
const char * TXMLOdb::GetNodeName | ( | TXMLNode * | node | ) |
Returns the name of a node.
Definition at line 105 of file TXMLOdb.cxx.
References fTextBuffer.
Referenced by FindNode(), TMidasFile::SetFileOdb(), and TMidasFile::SetTIGOdb().
std::vector< double > TXMLOdb::ReadDoubleArray | ( | TXMLNode * | node | ) |
Reads and returns an array of doubles.
Definition at line 219 of file TXMLOdb.cxx.
Referenced by TMidasFile::SetGRIFFOdb(), TMidasFile::SetTIGDAQOdb(), and TMidasFile::SetTIGOdb().
int TXMLOdb::ReadInt | ( | const char * | path, |
int | index = 0, | ||
int | defaultValue = 0xffffffff ) |
tries to find the path "path", returns defaultValue if that fails, otherwise returns 0.
Definition at line 117 of file TXMLOdb.cxx.
References FindPath().
std::vector< int > TXMLOdb::ReadIntArray | ( | TXMLNode * | node | ) |
Reads and returns an array of integers.
Definition at line 127 of file TXMLOdb.cxx.
Referenced by TMidasFile::SetGRIFFOdb(), TMidasFile::SetTIGDAQOdb(), and TMidasFile::SetTIGOdb().
std::vector< std::string > TXMLOdb::ReadStringArray | ( | TXMLNode * | node | ) |
Reads and returns an array of strings.
Definition at line 169 of file TXMLOdb.cxx.
Referenced by TMidasFile::SetEPICSOdb(), TMidasFile::SetGRIFFOdb(), TMidasFile::SetTIGDAQOdb(), and TMidasFile::SetTIGOdb().
TXMLNode* TXMLOdb::fOdb |
Definition at line 42 of file TXMLOdb.h.
Referenced by TXMLOdb(), FindNode(), and FindPath().
TDOMParser* TXMLOdb::fParser |
Definition at line 41 of file TXMLOdb.h.
Referenced by TXMLOdb(), and ~TXMLOdb().
|
staticprivate |
Definition at line 54 of file TXMLOdb.h.
Referenced by GetNodeName().