Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PgPostBankBackupManager Class Reference

PgPostBankBackupManager. More...

#include <coresoftware/blob/master/offline/database/pdbcal/pg/PgPostBankBackupManager.h>

+ Collaboration diagram for PgPostBankBackupManager:

Public Types

typedef std::vector< int > rid_list_t
 list of int
 

Public Member Functions

 PgPostBankBackupManager (const std::string &Tag="")
 
virtual ~PgPostBankBackupManager ()
 
bool isRIdExist (const std::string &bankName, int rid)
 check whether an record with certain rid already there
 
int getTotalRowCount (const std::string &bankName)
 total row counts
 
rid_list_t getListOfRId (const std::string &bankName, const std::string &condition="")
 list rid in a bank
 
PgPostBankBackupStoragefetchBank (const std::string &bankName, int rid)
 
bool commit (PgPostBankBackupStorage *bs)
 
int commitAllBankfromTFile (const std::string &in_file)
 TFile -> Database for official operation use.
 
int fetchBank2TFile (const std::string &bankName, const rid_list_t &rid_list, const std::string &out_file)
 Database -> TFile for official operation use.
 
int fetchAllBank2TFile (const std::string &bankName, const std::string &record_selection, const std::string &out_file_base, int splitting_limit=100000)
 Database -> TFile for all all records satisifying record_selection.
 
void dumpTable (const std::string &bankName, std::ostream &out)
 dump databse to text
 
int CleanTable (const std::string &bankName, const PHTimeStamp &min_preserve_time=PHTimeStamp::PHFarFuture, const bool do_delete=false, const std::string &log_file_name="")
 
virtual void Verbosity (const int ival)
 Sets the verbosity of this module (0 by default=quiet).
 
virtual int Verbosity () const
 Gets the verbosity of this module.
 

Static Public Member Functions

static std::string getBankBaseName (const std::string &bank_classname)
 
static void deleteSQLStatement (TSQLStatement *stmt)
 clear list of TSQLStatement
 
static void deleteODBCPreparedStatement (TSQLPreparedStatement *stmt)
 clear list of TSQLStatement
 
static ULong_t HashPdbCalChan (const PdbCalChan &c)
 Hash the object.
 

Protected Member Functions

PgPostBankBackupStorageSQLResultSet2BackupStorage (TSQLResultSet *rs, const std::string &table_name)
 

Protected Attributes

int verbosity
 The verbosity level. 0 means not verbose at all.
 
std::string tag
 

Detailed Description

PgPostBankBackupManager.

Definition at line 31 of file PgPostBankBackupManager.h.

View newest version in sPHENIX GitHub at line 31 of file PgPostBankBackupManager.h

Member Typedef Documentation

typedef std::vector<int> PgPostBankBackupManager::rid_list_t

list of int

Definition at line 38 of file PgPostBankBackupManager.h.

View newest version in sPHENIX GitHub at line 38 of file PgPostBankBackupManager.h

Constructor & Destructor Documentation

PgPostBankBackupManager::PgPostBankBackupManager ( const std::string &  Tag = "")

Definition at line 55 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 55 of file PgPostBankBackupManager.cc

References tag.

PgPostBankBackupManager::~PgPostBankBackupManager ( )
virtual

Definition at line 69 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 69 of file PgPostBankBackupManager.cc

Member Function Documentation

int PgPostBankBackupManager::CleanTable ( const std::string &  bankName,
const PHTimeStamp min_preserve_time = PHTimeStamp::PHFarFuture,
const bool  do_delete = false,
const std::string &  log_file_name = "" 
)
bool PgPostBankBackupManager::commit ( PgPostBankBackupStorage bs)
int PgPostBankBackupManager::commitAllBankfromTFile ( const std::string &  in_file)
void PgPostBankBackupManager::deleteODBCPreparedStatement ( TSQLPreparedStatement stmt)
static

clear list of TSQLStatement

Definition at line 113 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 113 of file PgPostBankBackupManager.cc

References assert, con, PgPostApplication::getConnection(), TSQLConnection::GetListOfStatements(), and PgPostApplication::instance().

Referenced by commit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PgPostBankBackupManager::deleteSQLStatement ( TSQLStatement stmt)
static

clear list of TSQLStatement

Definition at line 73 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 73 of file PgPostBankBackupManager.cc

References con, PgPostApplication::getConnection(), TSQLConnection::GetListOfStatements(), and PgPostApplication::instance().

Referenced by fetchBank().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void PgPostBankBackupManager::dumpTable ( const std::string &  bankName,
std::ostream &  out 
)
int PgPostBankBackupManager::fetchAllBank2TFile ( const std::string &  bankName,
const std::string &  record_selection,
const std::string &  out_file_base,
int  splitting_limit = 100000 
)
PgPostBankBackupStorage * PgPostBankBackupManager::fetchBank ( const std::string &  bankName,
int  rid 
)

Build PgPostBankBackupStorage from one database entry using code should delete the returned object

Parameters
[in]bankNamecan be bank name (e.g. calib.fvtx.alignment) or pSQL table name (e.g. calibfvtxalignment)

Build PgPostBankBackupStorage from one database entry using code should delete the returned object

Definition at line 327 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 327 of file PgPostBankBackupManager.cc

References con, TSQLConnection::CreateStatement(), deleteSQLStatement(), TSQLStatement::ExecuteQuery(), PgPostApplication::getConnection(), PgPostApplication::instance(), TSQLResultSet::Next(), SQLResultSet2BackupStorage(), Verbosity(), and verbosity.

Referenced by fetchBank2TFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PgPostBankBackupManager::fetchBank2TFile ( const std::string &  bankName,
const rid_list_t rid_list,
const std::string &  out_file 
)

Database -> TFile for official operation use.

Database -> TFile.

Definition at line 799 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 799 of file PgPostBankBackupManager.cc

References f, fetchBank(), PgPostBankBackupStorage::isValid(), it, PgPostBankBackupStorage::Print(), and Verbosity().

+ Here is the call graph for this function:

std::string PgPostBankBackupManager::getBankBaseName ( const std::string &  bank_classname)
static

Definition at line 1039 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 1039 of file PgPostBankBackupManager.cc

References prefix.

Referenced by SQLResultSet2BackupStorage().

+ Here is the caller graph for this function:

PgPostBankBackupManager::rid_list_t PgPostBankBackupManager::getListOfRId ( const std::string &  bankName,
const std::string &  condition = "" 
)

list rid in a bank

Definition at line 1128 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 1128 of file PgPostBankBackupManager.cc

References assert, con, TSQLConnection::CreateStatement(), TSQLStatement::ExecuteQuery(), PgPostApplication::getConnection(), TSQLResultSet::GetInt(), PgPostApplication::instance(), TSQLResultSet::Next(), and verbosity.

Referenced by commitAllBankfromTFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int PgPostBankBackupManager::getTotalRowCount ( const std::string &  bankName)

total row counts

Definition at line 1099 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 1099 of file PgPostBankBackupManager.cc

References assert, con, TSQLConnection::CreateStatement(), TSQLStatement::ExecuteQuery(), PgPostApplication::getConnection(), TSQLResultSet::GetInt(), PgPostApplication::instance(), TSQLResultSet::Next(), and verbosity.

Referenced by fetchAllBank2TFile().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ULong_t PgPostBankBackupManager::HashPdbCalChan ( const PdbCalChan c)
static

Hash the object.

Definition at line 1262 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 1262 of file PgPostBankBackupManager.cc

References assert, KFPMath::b, and Acts::PhysicalConstants::c.

Referenced by dumpTable().

+ Here is the caller graph for this function:

bool PgPostBankBackupManager::isRIdExist ( const std::string &  bankName,
int  rid 
)

check whether an record with certain rid already there

Definition at line 1070 of file PgPostBankBackupManager.cc.

View newest version in sPHENIX GitHub at line 1070 of file PgPostBankBackupManager.cc

References assert, con, TSQLConnection::CreateStatement(), TSQLStatement::ExecuteQuery(), PgPostApplication::getConnection(), PgPostApplication::instance(), TSQLResultSet::Next(), and verbosity.

Referenced by commit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PgPostBankBackupStorage * PgPostBankBackupManager::SQLResultSet2BackupStorage ( TSQLResultSet rs,
const std::string &  table_name 
)
protected
virtual void PgPostBankBackupManager::Verbosity ( const int  ival)
inlinevirtual

Sets the verbosity of this module (0 by default=quiet).

Definition at line 89 of file PgPostBankBackupManager.h.

View newest version in sPHENIX GitHub at line 89 of file PgPostBankBackupManager.h

References verbosity.

virtual int PgPostBankBackupManager::Verbosity ( ) const
inlinevirtual

Gets the verbosity of this module.

Definition at line 96 of file PgPostBankBackupManager.h.

View newest version in sPHENIX GitHub at line 96 of file PgPostBankBackupManager.h

References verbosity.

Referenced by commit(), commitAllBankfromTFile(), fetchBank(), and fetchBank2TFile().

+ Here is the caller graph for this function:

Member Data Documentation

std::string PgPostBankBackupManager::tag
protected

Definition at line 123 of file PgPostBankBackupManager.h.

View newest version in sPHENIX GitHub at line 123 of file PgPostBankBackupManager.h

Referenced by CleanTable(), commitAllBankfromTFile(), dumpTable(), fetchAllBank2TFile(), and PgPostBankBackupManager().

int PgPostBankBackupManager::verbosity
protected

The verbosity level. 0 means not verbose at all.

Definition at line 121 of file PgPostBankBackupManager.h.

View newest version in sPHENIX GitHub at line 121 of file PgPostBankBackupManager.h

Referenced by CleanTable(), commit(), commitAllBankfromTFile(), dumpTable(), fetchAllBank2TFile(), fetchBank(), getListOfRId(), getTotalRowCount(), isRIdExist(), SQLResultSet2BackupStorage(), and Verbosity().


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