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

Creates bank index for serialized event. More...

#include <evioBankIndex.hxx>

Public Member Functions

 evioBankIndex (int maxDepth=0)
 Constructor. More...
 
 evioBankIndex (const uint32_t *buffer, int maxDepth=0)
 Constructor from buffer. More...
 
virtual ~evioBankIndex ()
 Destructor. More...
 
bool parseBuffer (const uint32_t *buffer, int maxDepth)
 Indexes buffer and fills map. More...
 
bool tagNumExists (const evioDictEntry &tn) const
 True if evioDictEntry is in map at least once. More...
 
int tagNumCount (const evioDictEntry &tn) const
 Returns count of evioDictEntry in map. More...
 
bankIndexRange getRange (const evioDictEntry &tn) const
 Returns pair of iterators defining range of equal keys in tagNumMap. More...
 
bankIndex getBankIndex (const evioDictEntry &tn) const throw (evioException)
 Returns bankIndex given evioDictEntry, throws exception if no entry found. More...
 
int getMaxDepth ()
 
template<typename T >
const T * getData (const evioDictEntry &tn, int *pLen) throw (evioException)
 Returns length and pointer to data, NULL if container bank, bad evioDictEntry or wrong data type. More...
 
template<typename T >
const T * getData (const bankIndex &bi, int *pLen) throw (evioException)
 Returns length and pointer to data, assumes valid bankIndex. More...
 

Public Attributes

bankIndexMap tagNumMap
 Holds index to one or more banks having tag/num. More...
 

Detailed Description

Creates bank index for serialized event.

Note that a given tag/num may appear more than once in event and map.

Constructor & Destructor Documentation

evioBankIndex::evioBankIndex ( int  maxDepth = 0)

Constructor.

evioBankIndex::evioBankIndex ( const uint32_t *  buffer,
int  maxDepth = 0 
)

Constructor from buffer.

Parameters
bufferEvent buffer to index

References parseBuffer().

evioBankIndex::~evioBankIndex ( )
virtual

Destructor.

Member Function Documentation

bankIndex evioBankIndex::getBankIndex ( const evioDictEntry tn) const
throw (evioException
)

Returns bankIndex given evioDictEntry, throws exception if no entry found.

Parameters
tnevioDictEntry
Returns
bankIndex for evioDictEntry
template<typename T >
const T* evio::evioBankIndex::getData ( const evioDictEntry tn,
int *  pLen 
)
throw (evioException
)
inline

Returns length and pointer to data, NULL if container bank, bad evioDictEntry or wrong data type.

Parameters
tnevioDictEntry
pLenPointer to int to receive data length, set to 0 upon error
Returns
Pointer to data, NULL on error
template<typename T >
const T* evio::evioBankIndex::getData ( const bankIndex bi,
int *  pLen 
)
throw (evioException
)
inline

Returns length and pointer to data, assumes valid bankIndex.

Parameters
bibankIndex
pLenPointer to int to receive data length, set to 0 for bad type
Returns
Pointer to data, NULL on bad type
int evio::evioBankIndex::getMaxDepth ( )
bankIndexRange evioBankIndex::getRange ( const evioDictEntry tn) const

Returns pair of iterators defining range of equal keys in tagNumMap.

Parameters
tnevioDictEntry
Returns
Pair of iterators defining range

References tagNumMap.

bool evioBankIndex::parseBuffer ( const uint32_t *  buffer,
int  maxDepth 
)

Indexes buffer and fills map.

Parameters
bufferBuffer containing serialized event
Returns
true if indexing succeeded

References evio::evioStreamParser::parse().

Referenced by evioBankIndex().

int evioBankIndex::tagNumCount ( const evioDictEntry tn) const

Returns count of evioDictEntry in map.

Parameters
tnevioDictEntry
Returns
Count of evioDictEntry in map.

References tagNumMap.

bool evioBankIndex::tagNumExists ( const evioDictEntry tn) const

True if evioDictEntry is in map at least once.

Parameters
tnevioDictEntry
Returns
true if evioDictEntry is in map

References tagNumMap.

Member Data Documentation

bankIndexMap evio::evioBankIndex::tagNumMap

Holds index to one or more banks having tag/num.

Referenced by getRange(), tagNumCount(), and tagNumExists().


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