Analysis Software
Documentation for sPHENIX simulation software
|
#include <OnlMon/blob/main/onlmondatabase/OnlMonDBodbc.h>
Public Member Functions | |
OnlMonDBodbc (const std::string &tablename) | |
virtual | ~OnlMonDBodbc () |
void | Dump () |
int | Info (const char *tablename=nullptr) |
int | CreateTable () |
int | CheckAndCreateTable (const std::map< const std::string, OnlMonDBVar * > &varmap) |
int | DropTable (const std::string &name) |
void | identify () const |
int | AddRow (const time_t ticks, const int runnumber, const std::map< const std::string, OnlMonDBVar * > &varmap) |
int | GetVar (const time_t begin, const time_t end, const std::string &varname, std::vector< time_t > ×tp, std::vector< int > &runnumber, std::vector< float > &var, std::vector< float > &varerr) |
Public Member Functions inherited from OnlMonBase | |
OnlMonBase (const std::string &name="NONE") | |
virtual | ~OnlMonBase () |
const std::string | Name () const |
void | Name (const std::string &name) |
virtual void | Verbosity (const int i) |
virtual int | Verbosity () const |
Private Member Functions | |
void | Dump (odbc::ResultSet *rs) const |
int | GetConnection () |
Private Attributes | |
std::string | dbname |
std::string | dbowner |
std::string | dbpasswd |
std::string | table |
Additional Inherited Members | |
Protected Attributes inherited from OnlMonBase | |
std::string | ThisName |
int | verbosity = 0 |
Definition at line 17 of file OnlMonDBodbc.h.
View newest version in sPHENIX GitHub at line 17 of file OnlMonDBodbc.h
OnlMonDBodbc::OnlMonDBodbc | ( | const std::string & | tablename | ) |
Definition at line 33 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 33 of file OnlMonDBodbc.cc
References table, and Acts::Test::transform.
|
virtual |
Definition at line 45 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 45 of file OnlMonDBodbc.cc
References con.
int OnlMonDBodbc::AddRow | ( | const time_t | ticks, |
const int | runnumber, | ||
const std::map< const std::string, OnlMonDBVar * > & | varmap | ||
) |
Definition at line 320 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 320 of file OnlMonDBodbc.cc
References addvarname, release::app, runCondor_beamspot::cmd, odbc::Connection::createStatement(), Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), GetConnection(), odbc::ResultSet::getFloat(), odbc::ResultSet::getInt(), odbc::SQLException::getMessage(), odbc::ResultSet::getTimestamp(), j, MINUTESINTERVAL, odbc::ResultSet::next(), printf(), runnumber, odbc::Timestamp::setTime(), table, odbc::Timestamp::toString(), and odbc::ResultSet::wasNull().
Referenced by OnlMonDB::DBcommit(), and OnlMonDB::DBcommitTest().
int OnlMonDBodbc::CheckAndCreateTable | ( | const std::map< const std::string, OnlMonDBVar * > & | varmap | ) |
Definition at line 102 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 102 of file OnlMonDBodbc.cc
References addvarname, runCondor_beamspot::cmd, odbc::Connection::createStatement(), CreateTable(), DEFAULTCOLUMNS, Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), odbc::ResultSetMetaData::getColumnCount(), odbc::ResultSetMetaData::getColumnName(), GetConnection(), odbc::SQLException::getMessage(), odbc::ResultSet::getMetaData(), i, j, table, Acts::Test::transform, and OnlMonBase::verbosity.
Referenced by OnlMonDB::DBInit().
int OnlMonDBodbc::CreateTable | ( | ) |
Definition at line 51 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 51 of file OnlMonDBodbc.cc
References runCondor_beamspot::cmd, odbc::Connection::createStatement(), Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), GetConnection(), odbc::SQLException::getMessage(), odbc::ResultSet::next(), table, and OnlMonBase::verbosity.
Referenced by CheckAndCreateTable().
int OnlMonDBodbc::DropTable | ( | const std::string & | name | ) |
Definition at line 178 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 178 of file OnlMonDBodbc.cc
References runCondor_beamspot::cmd, odbc::Connection::createStatement(), odbc::Statement::executeUpdate(), odbc::Connection::getCatalog(), GetConnection(), odbc::DatabaseMetaData::getDatabaseProductVersion(), odbc::Connection::getMetaData(), perf_headwind::name, and Acts::Test::transform.
void OnlMonDBodbc::Dump | ( | ) |
Definition at line 199 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 199 of file OnlMonDBodbc.cc
References runCondor_beamspot::cmd, odbc::Connection::createStatement(), odbc::Statement::executeQuery(), GetConnection(), and table.
|
private |
Definition at line 216 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 216 of file OnlMonDBodbc.cc
References DEFAULTCOLUMNS, Acts::UnitConstants::e, odbc::ResultSet::first(), odbc::ResultSetMetaData::getColumnCount(), odbc::ResultSetMetaData::getColumnName(), odbc::ResultSet::getFloat(), odbc::ResultSet::getInt(), odbc::SQLException::getMessage(), odbc::ResultSet::getMetaData(), odbc::ResultSet::getTimestamp(), i, OnlMonBase::Name(), odbc::ResultSet::next(), and odbc::ResultSet::wasNull().
|
private |
Definition at line 610 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 610 of file OnlMonDBodbc.cc
References con, dbname, dbowner, dbpasswd, Acts::UnitConstants::e, odbc::DriverManager::getConnection(), odbc::SQLException::getMessage(), and printf().
Referenced by AddRow(), CheckAndCreateTable(), CreateTable(), DropTable(), Dump(), GetVar(), and Info().
int OnlMonDBodbc::GetVar | ( | const time_t | begin, |
const time_t | end, | ||
const std::string & | varname, | ||
std::vector< time_t > & | timestp, | ||
std::vector< int > & | runnumber, | ||
std::vector< float > & | var, | ||
std::vector< float > & | varerr | ||
) |
Definition at line 506 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 506 of file OnlMonDBodbc.cc
References addvarname, runCondor_beamspot::cmd, odbc::Connection::createStatement(), DBNOCON, DBNOENTRIES, Acts::UnitConstants::e, odbc::Statement::executeQuery(), GetConnection(), odbc::ResultSet::getFloat(), odbc::ResultSet::getInt(), odbc::SQLException::getMessage(), odbc::Timestamp::getTime(), odbc::ResultSet::getTimestamp(), index, odbc::ResultSet::next(), table, odbc::Timestamp::toString(), and odbc::ResultSet::wasNull().
Referenced by OnlMonDB::GetVar().
void OnlMonDBodbc::identify | ( | ) | const |
Definition at line 311 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 311 of file OnlMonDBodbc.cc
int OnlMonDBodbc::Info | ( | const char * | tablename = nullptr | ) |
Definition at line 251 of file OnlMonDBodbc.cc.
View newest version in sPHENIX GitHub at line 251 of file OnlMonDBodbc.cc
References runCondor_beamspot::cmd, odbc::Connection::createStatement(), odbc::Statement::executeQuery(), odbc::DatabaseMetaData::getCatalogTerm(), odbc::ResultSetMetaData::getColumnCount(), GetConnection(), odbc::DatabaseMetaData::getDatabaseProductVersion(), odbc::DatabaseMetaData::getDriverName(), odbc::ResultSet::getFloat(), odbc::ResultSet::getInt(), odbc::Connection::getMetaData(), odbc::ResultSet::getMetaData(), odbc::ResultSet::getRow(), odbc::DatabaseMetaData::getSchemaTerm(), odbc::ResultSet::getString(), odbc::DatabaseMetaData::getTables(), odbc::DatabaseMetaData::getTableTerm(), odbc::DatabaseMetaData::getTableTypes(), odbc::DatabaseMetaData::getUserName(), OnlMonBase::Name(), perf_headwind::name, odbc::ResultSet::next(), and Acts::Test::transform.
|
private |
Definition at line 34 of file OnlMonDBodbc.h.
View newest version in sPHENIX GitHub at line 34 of file OnlMonDBodbc.h
Referenced by GetConnection(), and identify().
|
private |
Definition at line 35 of file OnlMonDBodbc.h.
View newest version in sPHENIX GitHub at line 35 of file OnlMonDBodbc.h
Referenced by GetConnection(), and identify().
|
private |
Definition at line 36 of file OnlMonDBodbc.h.
View newest version in sPHENIX GitHub at line 36 of file OnlMonDBodbc.h
Referenced by GetConnection(), and identify().
|
private |
Definition at line 37 of file OnlMonDBodbc.h.
View newest version in sPHENIX GitHub at line 37 of file OnlMonDBodbc.h
Referenced by AddRow(), CheckAndCreateTable(), CreateTable(), Dump(), GetVar(), identify(), and OnlMonDBodbc().