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

#include <OnlMon/blob/main/onlmonserver/OnlMonStatusDB.h>

+ Collaboration diagram for OnlMonStatusDB:

Public Member Functions

 OnlMonStatusDB (const std::string &tablename="onlmonstatus")
 
virtual ~OnlMonStatusDB ()
 
int CheckAndCreateTable ()
 
int CheckAndCreateMonitor (const std::string &name)
 
int UpdateStatus (const std::string &name, const int runnumber, const int status)
 
int FindAndInsertRunNum (const int runnumber)
 
int findRunNumInDB (const int runno)
 

Private Member Functions

int GetConnection ()
 

Private Attributes

std::string dbname = "OnlMonDB"
 
std::string dbowner = "phnxrc"
 
std::string dbpasswd = ""
 
std::string table
 

Detailed Description

Definition at line 6 of file OnlMonStatusDB.h.

View newest version in sPHENIX GitHub at line 6 of file OnlMonStatusDB.h

Constructor & Destructor Documentation

OnlMonStatusDB::OnlMonStatusDB ( const std::string &  tablename = "onlmonstatus")

Definition at line 14 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 14 of file OnlMonStatusDB.cc

OnlMonStatusDB::~OnlMonStatusDB ( )
virtual

Definition at line 19 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 19 of file OnlMonStatusDB.cc

References con.

Member Function Documentation

int OnlMonStatusDB::CheckAndCreateMonitor ( const std::string &  name)

Definition at line 74 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 74 of file OnlMonStatusDB.cc

References CheckAndCreateTable(), runCondor_beamspot::cmd, odbc::Connection::createStatement(), Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), odbc::ResultSet::findColumn(), odbc::SQLException::getMessage(), and table.

Referenced by UpdateStatus().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnlMonStatusDB::CheckAndCreateTable ( )

Definition at line 25 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 25 of file OnlMonStatusDB.cc

References runCondor_beamspot::cmd, odbc::Connection::createStatement(), Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::Statement::executeUpdate(), GetConnection(), odbc::SQLException::getMessage(), gtest_output_test::message, odbc::ResultSet::next(), and table.

Referenced by CheckAndCreateMonitor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnlMonStatusDB::FindAndInsertRunNum ( const int  runnumber)

Definition at line 125 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 125 of file OnlMonStatusDB.cc

References runCondor_beamspot::cmd, odbc::Connection::createStatement(), Acts::UnitConstants::e, odbc::Statement::executeUpdate(), findRunNumInDB(), GetConnection(), odbc::SQLException::getMessage(), and table.

Referenced by UpdateStatus().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnlMonStatusDB::findRunNumInDB ( const int  runno)

Definition at line 154 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 154 of file OnlMonStatusDB.cc

References runCondor_beamspot::cmd, odbc::Connection::createStatement(), Acts::UnitConstants::e, odbc::Statement::executeQuery(), odbc::ResultSet::getInt(), odbc::SQLException::getMessage(), odbc::ResultSet::next(), runnumber, and table.

Referenced by FindAndInsertRunNum().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnlMonStatusDB::GetConnection ( )
private

Definition at line 240 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 240 of file OnlMonStatusDB.cc

References con, dbname, dbowner, dbpasswd, Acts::UnitConstants::e, odbc::DriverManager::getConnection(), and odbc::SQLException::getMessage().

Referenced by CheckAndCreateTable(), and FindAndInsertRunNum().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int OnlMonStatusDB::UpdateStatus ( const std::string &  name,
const int  runnumber,
const int  status 
)

Definition at line 195 of file OnlMonStatusDB.cc.

View newest version in sPHENIX GitHub at line 195 of file OnlMonStatusDB.cc

References CheckAndCreateMonitor(), runCondor_beamspot::cmd, odbc::Connection::createStatement(), Acts::UnitConstants::e, odbc::Statement::executeUpdate(), FindAndInsertRunNum(), odbc::SQLException::getMessage(), runnumber, and table.

Referenced by OnlMonServer::SetSubsystemRunStatus(), and OnlMonServer::SetSubsystemStatus().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::string OnlMonStatusDB::dbname = "OnlMonDB"
private

Definition at line 19 of file OnlMonStatusDB.h.

View newest version in sPHENIX GitHub at line 19 of file OnlMonStatusDB.h

Referenced by GetConnection().

std::string OnlMonStatusDB::dbowner = "phnxrc"
private

Definition at line 20 of file OnlMonStatusDB.h.

View newest version in sPHENIX GitHub at line 20 of file OnlMonStatusDB.h

Referenced by GetConnection().

std::string OnlMonStatusDB::dbpasswd = ""
private

Definition at line 21 of file OnlMonStatusDB.h.

View newest version in sPHENIX GitHub at line 21 of file OnlMonStatusDB.h

Referenced by GetConnection().

std::string OnlMonStatusDB::table
private

Definition at line 22 of file OnlMonStatusDB.h.

View newest version in sPHENIX GitHub at line 22 of file OnlMonStatusDB.h

Referenced by CheckAndCreateMonitor(), CheckAndCreateTable(), FindAndInsertRunNum(), findRunNumInDB(), and UpdateStatus().


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