Public Member Functions | Protected Attributes
ibis::part::barrel Class Reference

To read a list of variables at the same time. More...

#include <part.h>

Inheritance diagram for ibis::part::barrel:
ibis::math::barrel ibis::part::vault

List of all members.

Public Member Functions

 barrel (const ibis::part *t=0)
virtual long close ()
 Close all open files.
const ibis::columngetColumn (uint32_t i) const
void getNullMask (ibis::bitvector &mask) const
virtual long open (const ibis::part *t=0)
 Open all data files.
virtual long read ()
 Read one value for each variable.
virtual long seek (uint32_t pos)
 Move the file pointers to the posth record.
uint32_t tell () const
virtual ~barrel ()
 Destructor closes the open files.

Protected Attributes

const ibis::part_tbl
std::vector< const ibis::column * > cols
std::vector< int > fdes
uint32_t position
std::vector
< ibis::fileManager::storage * > 
stores

Detailed Description

To read a list of variables at the same time.

This implementation opens each data file and read the values from the files one at a time.


Member Function Documentation

long ibis::part::barrel::open ( const ibis::part t = 0) [virtual]

Open all data files.

If the data files are on disk, then attempt to read the content through ibis::fileManager::getFile first.

If that fails, open the data file and so that each value can be read one at a time. If the data files are not on disk, it invokes the function getRawData to get a pointer to the raw data in memory. Upon successful completion, it returns 0, otherwise it returns a negative value to indicate error conditions.

The argument t may be left as nil if the barrel object was initialized with a valid pointer to the ibis::part object.

Reimplemented in ibis::part::vault.

References ibis::fileManager::storage::beginUse(), ibis::part::currentDataDir(), FASTBIT_DIRSEP, ibis::part::getColumn(), ibis::column::getRawData(), ibis::gVerbose, ibis::fileManager::instance(), ibis::part::name(), ibis::column::name(), and UnixOpen.

Referenced by ibis::part::calculate(), ibis::part::doScan(), and ibis::part::evaluateJoin().

long ibis::part::barrel::read ( ) [virtual]

Read one value for each variable.

Read the variable values from the current record.

All values are internally stored as doubles.

Reimplemented in ibis::part::vault.

References ibis::BYTE, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::gVerbose, ibis::INT, ibis::LONG, ibis::OID, ibis::SHORT, ibis::TEXT, ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.

Referenced by ibis::part::calculate(), ibis::part::doScan(), and ibis::part::evaluateJoin().

long ibis::part::barrel::seek ( uint32_t  pos) [virtual]

Move the file pointers to the posth record.

Seek to the position of the specified record for all variables.

Return 0 for success and other integer for error.

Reimplemented in ibis::part::vault.

Referenced by ibis::part::calculate(), ibis::part::doScan(), and ibis::part::evaluateJoin().


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

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive