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

#include <OnlMon/blob/main/onlmondatabase/OnlMonDBodbc.h>

+ Inheritance diagram for OnlMonDBodbc:
+ Collaboration diagram for OnlMonDBodbc:

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 > &timestp, 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
 

Detailed Description

Definition at line 17 of file OnlMonDBodbc.h.

View newest version in sPHENIX GitHub at line 17 of file OnlMonDBodbc.h

Constructor & Destructor Documentation

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.

OnlMonDBodbc::~OnlMonDBodbc ( )
virtual

Definition at line 45 of file OnlMonDBodbc.cc.

View newest version in sPHENIX GitHub at line 45 of file OnlMonDBodbc.cc

References con.

Member Function Documentation

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

void OnlMonDBodbc::Dump ( odbc::ResultSet rs) const
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().

+ Here is the call graph for this function:

int OnlMonDBodbc::GetConnection ( )
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().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References dbname, dbowner, dbpasswd, and table.

Member Data Documentation

std::string OnlMonDBodbc::dbname
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().

std::string OnlMonDBodbc::dbowner
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().

std::string OnlMonDBodbc::dbpasswd
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().

std::string OnlMonDBodbc::table
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().


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