ECCE @ EIC 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< intrid_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

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

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 = "" 
)

remove records which is NOT used for reconstruction. Records with insert timeafter min_save_time will be preserved

Definition at line 1282 of file PgPostBankBackupManager.cc.

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

References G4InuclParticleNames::ap, e, g4zmq::exit(), flog(), PHTimeServer::timer::get(), PHTimeServer::get(), PgPostApplication::getConnection(), PHTimeStamp::getTics(), PgPostBankBackupLog::Init(), PgPostApplication::instance(), it, PgPostBankBackupLog::kOptDelete, PgPostBankBackupLog::Log(), PHTimer::print_stat(), PHTimer::restart(), PHTimer::stop(), and verbosity.

+ Here is the call graph for this function:

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 G4InuclParticleNames::ap, g4zmq::exit(), PgPostApplication::getConnection(), 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 G4InuclParticleNames::ap, g4zmq::exit(), PgPostApplication::getConnection(), 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 
)

dump databse to text

Definition at line 1166 of file PgPostBankBackupManager.cc.

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

References G4InuclParticleNames::ap, c, g4zmq::exit(), PgPostApplication::getConnection(), PgPostCalBank::getEntry(), PgPostCalBank::getLength(), HashPdbCalChan(), PgPostBankBackupLog::Init(), PgPostApplication::instance(), PgPostBankBackupLog::kOptDump, PgPostBankBackupLog::Log(), PdbCalChan::print(), and verbosity.

+ Here is the call graph for this function:

int PgPostBankBackupManager::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.

Definition at line 854 of file PgPostBankBackupManager.cc.

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

References G4InuclParticleNames::ap, g4zmq::exit(), f, PHTimeServer::timer::get(), PHTimeServer::get(), PgPostApplication::getConnection(), getTotalRowCount(), PgPostBankBackupLog::Init(), PgPostApplication::instance(), PgPostBankBackupLog::kOptBackup2File, PgPostBankBackupLog::kOptFailed, PgPostBankBackupLog::kOptSuccess, PgPostBankBackupLog::Log(), PHTimer::print_stat(), PHTimer::restart(), SQLResultSet2BackupStorage(), PHTimer::stop(), and verbosity.

+ Here is the call graph for this function:

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 G4InuclParticleNames::ap, deleteSQLStatement(), g4zmq::exit(), PgPostApplication::getConnection(), PgPostApplication::instance(), 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

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 G4InuclParticleNames::ap, PgPostApplication::getConnection(), PgPostApplication::instance(), 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 G4InuclParticleNames::ap, PgPostApplication::getConnection(), PgPostApplication::instance(), 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 b, and 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 G4InuclParticleNames::ap, PgPostApplication::getConnection(), PgPostApplication::instance(), and verbosity.

Referenced by commit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 commitAllBankfromTFile().

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: