Bdb packages | Design docs | Source docs | Guidelines | Recent releases

Search | Site Map .

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BdbAdminDbgMgr Class Reference
[BdbAdminTools]

#include <BdbAdminDbgMgr.hh>

List of all members.

Public Methods

 BdbAdminDbgMgr (BdbAdminDbgIOMgr *ioMgr, d_Boolean display)
virtual ~BdbAdminDbgMgr ()
BdbStatus dumpDbs2File ()
BdbStatus processDatabases (d_Boolean allDbs, const char *outFileName=0, d_Boolean showNrConts=d_False, d_Boolean showPgCounters=d_False, d_Boolean showFileSize=d_False, d_Boolean showContSize=d_False)
BdbStatus processOneDb (const char *dbName, d_Boolean printToFile=d_False, d_Boolean showNrConts=d_False, d_Boolean showPgCounters=d_False, d_Boolean showFileSize=d_False, d_Boolean showContSize=d_False)
void displayAllConts (d_Boolean showNrPagesPerCont=d_False)
void displayAllContsInOneDb (const char *name, d_Boolean showNrPagesPerCont, d_Boolean printToFile)
BdbStatus displayRegistryDbsWEP (const char *theName)
BdbStatus fixBdbPCompParam (const char *contName, const char *objName)
BdbStatus displayBdbPCompParamObjects ()
BdbStatus displayAllPageCounters (const char *outFileName)
BdbStatus fixPageCounter (int dbid)

Private Methods

void countDatabases ()
void loadDbNames (char **&theArray)
BdbStatus readPageCounter (char *&buf, int dbid, d_ULong &value)
d_ULong readFileSize (const char *thePath, const char *theHost)
BdbStatus displayBdbPCompPObjInCont (ooRef(ooContObj)&contRef)

Private Attributes

BdbAdminDbgIOMgr_ioMgr
BdbClustHAccess_locatorMgr
int _noDatabases
d_Boolean _display
d_Boolean _verbose
int dbCounter
int contCounter
Entry2Fix_entries2Fix
int _nrElems2Fix
d_ULong_allActiveDbs
d_ULong _nrActiveDbsFound
d_ULong _nrHasExtraneousActiveDbs


Constructor & Destructor Documentation

BdbAdminDbgMgr::BdbAdminDbgMgr BdbAdminDbgIOMgr   ioMgr,
d_Boolean    display
 

Definition at line 68 of file BdbAdminDbgMgr.cc.

References _locatorMgr, _noDatabases, _verbose, and d_True.

BdbAdminDbgMgr::~BdbAdminDbgMgr   [virtual]
 

Definition at line 81 of file BdbAdminDbgMgr.cc.

References _locatorMgr.


Member Function Documentation

void BdbAdminDbgMgr::countDatabases   [private]
 

Definition at line 706 of file BdbAdminDbgMgr.cc.

References BdbDomain::activeInstance(), BdbcSuccess, BdbDomainOODB::commit(), dbCounter, and BdbDomainOODB::startRead().

Referenced by displayAllConts().

void BdbAdminDbgMgr::displayAllConts d_Boolean    showNrPagesPerCont = d_False
 

Definition at line 685 of file BdbAdminDbgMgr.cc.

References countDatabases(), cout, d_True, dbCounter, displayAllContsInOneDb(), and loadDbNames().

Referenced by BdbDebugFd::run().

void BdbAdminDbgMgr::displayAllContsInOneDb const char *    name,
d_Boolean    showNrPagesPerCont,
d_Boolean    printToFile
 

Definition at line 752 of file BdbAdminDbgMgr.cc.

References _ioMgr, BdbAdminDbgIOMgr::_outFile, BdbDomain::activeInstance(), BdbcSuccess, BdbDBObj, BdbDomainOODB::commit(), cout, ooRef(), BdbAdminDbgIOMgr::openOutFile(), size, and BdbDomainOODB::startRead().

Referenced by displayAllConts(), and BdbDebugFd::run().

BdbStatus BdbAdminDbgMgr::displayAllPageCounters const char *    outFileName
 

This function displays all page counters

All reading is done inside one read transaction, it may take long

Definition at line 593 of file BdbAdminDbgMgr.cc.

References _ioMgr, _locatorMgr, BdbAdminDbgIOMgr::_outFile, BdbDomain::activeInstance(), BdbcError, BdbcRead, BdbcSuccess, BdbDBObj, BdbHandle, BdbRef, BdbDomainOODB::commit(), cout, COUT1, dbH, len, ooRef(), BdbClustHAccess::openClustHintDb(), BdbAdminDbgIOMgr::openOutFile(), and BdbDomainOODB::startRead().

Referenced by BdbDebugFd::run().

BdbStatus BdbAdminDbgMgr::displayBdbPCompParamObjects  
 

This function displays all containers in the clustering hint database (per one domain) which ends with "v1". In practice these are containers which contain BdbPCompParam objects. It will also print BdbPCompParam objects and their values.

If _extraConts > 500, it will ask if the value should be reset to 0. If yes, it resets chosen values inside separate update transaction.

All reading is done inside one read transaction, it may take long

Definition at line 409 of file BdbAdminDbgMgr.cc.

References _allActiveDbs, _entries2Fix, _locatorMgr, _nrActiveDbsFound, _nrElems2Fix, _nrHasExtraneousActiveDbs, BdbDomain::activeInstance(), BdbcError, BdbcSuccess, BdbDBObj, BdbHandle, BdbAdminDbgMgr::Entry2Fix::buildRef(), BdbDomainOODB::commit(), cout, d_False, d_True, dbH, displayBdbPCompPObjInCont(), len, ooRef(), BdbClustHAccess::openClustHintDb(), BdbAdminDbgMgr::Entry2Fix::print(), BdbDomainOODB::startRead(), BdbDomainOODB::startUpdate(), and theRef.

Referenced by BdbDebugFd::displayBdbPCompParamObjects().

BdbStatus BdbAdminDbgMgr::displayBdbPCompPObjInCont ooRef(ooContObj)&    contRef [private]
 

Referenced by displayBdbPCompParamObjects().

BdbStatus BdbAdminDbgMgr::displayRegistryDbsWEP const char *    theName
 

Definition at line 839 of file BdbAdminDbgMgr.cc.

References _locatorMgr, BdbDomain::activeInstance(), BdbcError, BdbContObj, BdbcRead, BdbcSuccess, BdbDBObj, BdbHandle, BdbRef, BdbDomainOODB::commitNested(), cout, dbH, BdbClustHAccess::openClustHintDb(), BdbDomainOODB::startNestedRead(), and theMap.

Referenced by BdbDebugFd::run().

BdbStatus BdbAdminDbgMgr::dumpDbs2File  
 

The function iterates over all databases in the federation and stores database names in an ascii file. It puts a readlock on the federation.

Definition at line 96 of file BdbAdminDbgMgr.cc.

References _display, _ioMgr, _noDatabases, BdbAdminDbgIOMgr::_outFile, _verbose, BdbDomain::activeInstance(), BdbcError, BdbcSuccess, BdbDomainOODB::commit(), cout, COUT1, d_False, BdbAdminDbgIOMgr::openFile_AllDbNames(), and BdbDomainOODB::startRead().

Referenced by BdbDebugFd::run(), and runFromArguments().

BdbStatus BdbAdminDbgMgr::fixBdbPCompParam const char *    contName,
const char *    objName
 

Definition at line 364 of file BdbAdminDbgMgr.cc.

References _locatorMgr, BdbDomain::activeInstance(), BdbcError, BdbcSuccess, BdbRef, BdbDomainOODB::commit(), cout, BdbClustHAccess::locatePCompParamObj(), and BdbDomainOODB::startUpdate().

Referenced by BdbDebugFd::run().

BdbStatus BdbAdminDbgMgr::fixPageCounter int    dbid
 

Definition at line 291 of file BdbAdminDbgMgr.cc.

References _locatorMgr, BdbDomain::activeInstance(), BdbcError, BdbcSuccess, BdbRef, BdbDomainOODB::commit(), cout, BdbClustHAccess::locateDbPageCounter(), and BdbDomainOODB::startUpdate().

Referenced by processOneDb(), and BdbDebugFd::run().

void BdbAdminDbgMgr::loadDbNames char **&    theArray [private]
 

Definition at line 728 of file BdbAdminDbgMgr.cc.

References BdbDomain::activeInstance(), BdbcSuccess, BdbDomainOODB::commit(), dbCounter, and BdbDomainOODB::startRead().

Referenced by displayAllConts().

BdbStatus BdbAdminDbgMgr::processDatabases d_Boolean    allDbs,
const char *    outFileName = 0,
d_Boolean    showNrConts = d_False,
d_Boolean    showPgCounters = d_False,
d_Boolean    showFileSize = d_False,
d_Boolean    showContSize = d_False
 

The function processes databases (all or selected).

Definition at line 144 of file BdbAdminDbgMgr.cc.

References BdbAdminDbgIOMgr::_inFile, _ioMgr, BdbAdminDbgIOMgr::_outFile, BdbcError, BdbcSuccess, cout, COUT1, d_True, BdbAdminDbgIOMgr::openFile_DbNames(), BdbAdminDbgIOMgr::openOutFile(), and processOneDb().

Referenced by BdbDebugFd::processDatabases().

BdbStatus BdbAdminDbgMgr::processOneDb const char *    dbName,
d_Boolean    printToFile = d_False,
d_Boolean    showNrConts = d_False,
d_Boolean    showPgCounters = d_False,
d_Boolean    showFileSize = d_False,
d_Boolean    showContSize = d_False
 

The function processes one database It can be called independently.

Definition at line 202 of file BdbAdminDbgMgr.cc.

References _ioMgr, BdbAdminDbgIOMgr::_outFile, BdbDomain::activeInstance(), BdbcError, BdbcSuccess, BdbDomainOODB::commit(), cout, fixPageCounter(), ooRef(), readFileSize(), readPageCounter(), size, and BdbDomainOODB::startRead().

Referenced by processDatabases().

d_ULong BdbAdminDbgMgr::readFileSize const char *    thePath,
const char *    theHost
[private]
 

Definition at line 331 of file BdbAdminDbgMgr.cc.

References cout.

Referenced by processOneDb().

BdbStatus BdbAdminDbgMgr::readPageCounter char *&    buf,
int    dbid,
d_ULong   value
[private]
 

Definition at line 313 of file BdbAdminDbgMgr.cc.

References _locatorMgr, BdbcError, BdbcSuccess, BdbRef, and BdbClustHAccess::locateDbPageCounter().

Referenced by processOneDb().


Member Data Documentation

d_ULong* BdbAdminDbgMgr::_allActiveDbs [private]
 

Definition at line 77 of file BdbAdminDbgMgr.hh.

Referenced by displayBdbPCompParamObjects().

d_Boolean BdbAdminDbgMgr::_display [private]
 

Definition at line 68 of file BdbAdminDbgMgr.hh.

Referenced by dumpDbs2File().

Entry2Fix* BdbAdminDbgMgr::_entries2Fix [private]
 

Definition at line 74 of file BdbAdminDbgMgr.hh.

Referenced by displayBdbPCompParamObjects().

BdbAdminDbgIOMgr* BdbAdminDbgMgr::_ioMgr [private]
 

Definition at line 63 of file BdbAdminDbgMgr.hh.

Referenced by displayAllContsInOneDb(), displayAllPageCounters(), dumpDbs2File(), processDatabases(), and processOneDb().

BdbClustHAccess* BdbAdminDbgMgr::_locatorMgr [private]
 

Definition at line 64 of file BdbAdminDbgMgr.hh.

Referenced by BdbAdminDbgMgr(), displayAllPageCounters(), displayBdbPCompParamObjects(), displayRegistryDbsWEP(), fixBdbPCompParam(), fixPageCounter(), readPageCounter(), and ~BdbAdminDbgMgr().

int BdbAdminDbgMgr::_noDatabases [private]
 

Definition at line 66 of file BdbAdminDbgMgr.hh.

Referenced by BdbAdminDbgMgr(), and dumpDbs2File().

d_ULong BdbAdminDbgMgr::_nrActiveDbsFound [private]
 

Definition at line 78 of file BdbAdminDbgMgr.hh.

Referenced by displayBdbPCompParamObjects().

int BdbAdminDbgMgr::_nrElems2Fix [private]
 

Definition at line 75 of file BdbAdminDbgMgr.hh.

Referenced by displayBdbPCompParamObjects().

d_ULong BdbAdminDbgMgr::_nrHasExtraneousActiveDbs [private]
 

Definition at line 80 of file BdbAdminDbgMgr.hh.

Referenced by displayBdbPCompParamObjects().

d_Boolean BdbAdminDbgMgr::_verbose [private]
 

Definition at line 69 of file BdbAdminDbgMgr.hh.

Referenced by BdbAdminDbgMgr(), and dumpDbs2File().

int BdbAdminDbgMgr::contCounter [private]
 

Definition at line 72 of file BdbAdminDbgMgr.hh.

int BdbAdminDbgMgr::dbCounter [private]
 

Definition at line 71 of file BdbAdminDbgMgr.hh.

Referenced by countDatabases(), displayAllConts(), and loadDbNames().


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

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: October 04, 2002