evio::evioBankIndex Class Reference

Creates bank index for serialized event. More...

#include <evioBankIndex.hxx>

List of all members.

Public Member Functions

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

Public Attributes

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

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:
buffer Event buffer to index

References parseBuffer().

evioBankIndex::~evioBankIndex (  )  [virtual]

Destructor.


Member Function Documentation

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

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

Parameters:
tn tagNum
Returns:
bankIndex for tagNum
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:
bi bankIndex
pLen Pointer to int to receive data length, set to 0 for bad type
Returns:
Pointer to data, NULL on bad type
template<typename T >
const T* evio::evioBankIndex::getData ( const tagNum tn,
int *  pLen 
) throw (evioException) [inline]

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

Parameters:
tn tagNum
pLen Pointer to int to receive data length, set to 0 upon error
Returns:
Pointer to data, NULL on error

References tagNumMap.

int evio::evioBankIndex::getMaxDepth (  ) 
bankIndexRange evioBankIndex::getRange ( const tagNum tn  )  const

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

Parameters:
tn tagNum
Returns:
Pair of iterators defining range

References tagNumMap.

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

Indexes buffer and fills map.

Parameters:
buffer Buffer containing serialized event
Returns:
true if indexing succeeded

References evio::evioStreamParser::parse().

Referenced by evioBankIndex().

int evioBankIndex::tagNumCount ( const tagNum tn  )  const

Returns count of tagNum in map.

Parameters:
tn tagNum
Returns:
Count of tagNum in map.

References tagNumMap.

bool evioBankIndex::tagNumExists ( const tagNum tn  )  const

True if tagNum is in map at least once.

Parameters:
tn tagNum
Returns:
true if tagNum is in map

References tagNumMap.


Member Data Documentation

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

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


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

Generated on 4 Feb 2014 for evio by  doxygen 1.6.1