Generated on Fri Mar 20 12:35:18 2009 for cpsp-2.3.1 by doxygen 1.5.5

cpsp::HCoreDatabaseFILE Class Reference

#include <HCoreDatabaseFILE.hh>

Inheritance diagram for cpsp::HCoreDatabaseFILE:

Detailed Description

The HCoreDatabaseFILE provides an interface to a textfile based H-core database.

It handles the access to HCore objects from the database.

Definition at line 40 of file HCoreDatabaseFILE.hh.


Public Member Functions

virtual unsigned int getActCoreSize ()
virtual unsigned int getActMaxHHcontacts ()
virtual unsigned int getActMinHHcontacts ()
virtual bool getNextCore (HCore &toFill)
 HCoreDatabaseFILE (const HCoreDatabaseFILE &toCopy)
 HCoreDatabaseFILE (const std::string &dbRootPath)
virtual bool initCoreAccess (const biu::LatticeDescriptor &latDescr, const unsigned int size, const unsigned int minContacts=0, const unsigned int maxContacts=UINT_MAX-2)
virtual bool isConnected () const
virtual void setActMinHHcontacts (const unsigned int minContacts)
virtual ~HCoreDatabaseFILE ()

Protected Attributes

std::ifstream * actFile
int actFileHHcontInd
std::string actFileNamePref
intVec actHHcontacts
unsigned int coreSize
const std::string DBROOTPATH
unsigned int maxHH
unsigned int minHH

Data Structures

class  ExcEOF

Constructor & Destructor Documentation

cpsp::HCoreDatabaseFILE::HCoreDatabaseFILE ( const std::string &  dbRootPath  ) 

Definition at line 53 of file HCoreDatabaseFILE.cc.

cpsp::HCoreDatabaseFILE::HCoreDatabaseFILE ( const HCoreDatabaseFILE toCopy  ) 

Definition at line 62 of file HCoreDatabaseFILE.cc.

cpsp::HCoreDatabaseFILE::~HCoreDatabaseFILE (  )  [virtual]

Definition at line 69 of file HCoreDatabaseFILE.cc.


Member Function Documentation

virtual unsigned int cpsp::HCoreDatabaseFILE::getActCoreSize (  )  [inline, virtual]

Returns the core size of the HCore objects returned by getNextCore().

Implements cpsp::HCoreDatabase.

Definition at line 80 of file HCoreDatabaseFILE.hh.

virtual unsigned int cpsp::HCoreDatabaseFILE::getActMaxHHcontacts (  )  [inline, virtual]

Returns the maximal number of contacts of the HCore objects returned by getNextCore().

Implements cpsp::HCoreDatabase.

Definition at line 94 of file HCoreDatabaseFILE.hh.

virtual unsigned int cpsp::HCoreDatabaseFILE::getActMinHHcontacts (  )  [inline, virtual]

Returns the minimal number of contacts of the HCore objects returned by getNextCore().

Implements cpsp::HCoreDatabase.

Definition at line 84 of file HCoreDatabaseFILE.hh.

bool cpsp::HCoreDatabaseFILE::getNextCore ( HCore toFill  )  [virtual]

Fills succesively all HCore objects in the ranges given by initAccess(...) in descending order according to the number of contacts.

Returns:
returns whether or not filling was successfull and if the filled HCore toFill is valid or not.

Implements cpsp::HCoreDatabase.

Definition at line 187 of file HCoreDatabaseFILE.cc.

bool cpsp::HCoreDatabaseFILE::initCoreAccess ( const biu::LatticeDescriptor &  latDescr,
const unsigned int  size,
const unsigned int  minContacts = 0,
const unsigned int  maxContacts = UINT_MAX-2 
) [virtual]

Initializes the database access to control the HCore objects returned by getNextCore()

Returns:
== true if the initialization was successfull

Implements cpsp::HCoreDatabase.

Definition at line 83 of file HCoreDatabaseFILE.cc.

virtual bool cpsp::HCoreDatabaseFILE::isConnected (  )  const [inline, virtual]

Returns whether or not the database is connected and open for access.

Implements cpsp::HCoreDatabase.

Definition at line 98 of file HCoreDatabaseFILE.hh.

virtual void cpsp::HCoreDatabaseFILE::setActMinHHcontacts ( const unsigned int  minContacts  )  [inline, virtual]

Sets the minimal number of contacts of the HCore objects returned by getNextCore().

Implements cpsp::HCoreDatabase.

Definition at line 88 of file HCoreDatabaseFILE.hh.


Field Documentation

std::ifstream* cpsp::HCoreDatabaseFILE::actFile [protected]

current file stream the data is read from

Definition at line 49 of file HCoreDatabaseFILE.hh.

contact index of the current file stream in actEnergies

Definition at line 51 of file HCoreDatabaseFILE.hh.

the filename of the current file streams without energy und postfix

Definition at line 50 of file HCoreDatabaseFILE.hh.

handles available contacts for the current coreSize

Definition at line 48 of file HCoreDatabaseFILE.hh.

unsigned int cpsp::HCoreDatabaseFILE::coreSize [protected]

the size of the currently selected HCores

Definition at line 44 of file HCoreDatabaseFILE.hh.

const std::string cpsp::HCoreDatabaseFILE::DBROOTPATH [protected]

the root path of the database files

Definition at line 46 of file HCoreDatabaseFILE.hh.

unsigned int cpsp::HCoreDatabaseFILE::maxHH [protected]

HH-contact limits for HCore selection.

Definition at line 45 of file HCoreDatabaseFILE.hh.

unsigned int cpsp::HCoreDatabaseFILE::minHH [protected]

Definition at line 45 of file HCoreDatabaseFILE.hh.


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