BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
ElogStatus Class Reference

/home/gertsen/bmnroot/database/elog_db/ElogStatus.h Class for the table: status_ More...

#include <ElogStatus.h>

Collaboration diagram for ElogStatus:

Public Member Functions

virtual ~ElogStatus ()
int GetStatusId ()
 get status id of the current status
TString GetStatusText ()
 get status text of the current status
int SetStatusText (TString status_text)
 set status text of the current status
void Print ()
 print information about current status

Static Public Member Functions

static ElogStatus * CreateStatus (TString status_text)
 add new status to the database
static ElogStatus * GetStatus (int status_id)
 get status from the database
static ElogStatus * GetStatus (TString status_text)
 get status from the database
static int CheckStatusExists (int status_id)
 check status exists in the database: 1- true, 0 - false, <0 - database operation error
static int CheckStatusExists (TString status_text)
 check status exists in the database: 1- true, 0 - false, <0 - database operation error
static int DeleteStatus (int status_id)
 delete status from the database
static int DeleteStatus (TString status_text)
 delete status from the database
static int PrintAll ()
 print all statuss

Private Member Functions

 ElogStatus (ElogConnection *db_connect, int status_id, TString status_text)

Private Attributes

ElogConnection * connectionDB
 connection to the database
int i_status_id
 status id
TString str_status_text
 status text

Detailed Description

Definition at line 18 of file ElogStatus.h.

Constructor & Destructor Documentation

◆ ElogStatus()

ElogStatus::ElogStatus ( ElogConnection * db_connect,
int status_id,
TString status_text )
private

Definition at line 16 of file ElogStatus.cxx.

References connectionDB, i_status_id, and str_status_text.

Referenced by CreateStatus(), GetStatus(), and GetStatus().

Here is the caller graph for this function:

◆ ~ElogStatus()

ElogStatus::~ElogStatus ( )
virtual

Definition at line 25 of file ElogStatus.cxx.

References connectionDB.

Member Function Documentation

◆ CheckStatusExists() [1/2]

int ElogStatus::CheckStatusExists ( int status_id)
static

Definition at line 182 of file ElogStatus.cxx.

References TString::Format(), ElogConnection::GetSQLServer(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ CheckStatusExists() [2/2]

int ElogStatus::CheckStatusExists ( TString status_text)
static

Definition at line 222 of file ElogStatus.cxx.

References TString::Data(), TString::Format(), ElogConnection::GetSQLServer(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ CreateStatus()

ElogStatus * ElogStatus::CreateStatus ( TString status_text)
static

Definition at line 32 of file ElogStatus.cxx.

References ElogStatus(), TString::Format(), TSQLStatement::GetInt(), ElogConnection::GetSQLServer(), TSQLStatement::NextIteration(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLStatement::SetString(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ DeleteStatus() [1/2]

int ElogStatus::DeleteStatus ( int status_id)
static

Definition at line 262 of file ElogStatus.cxx.

References TString::Format(), ElogConnection::GetSQLServer(), TSQLStatement::NextIteration(), ElogConnection::Open(), TSQLStatement::Process(), TSQLStatement::SetInt(), and TSQLServer::Statement().

Here is the call graph for this function:

◆ DeleteStatus() [2/2]

int ElogStatus::DeleteStatus ( TString status_text)
static

Definition at line 292 of file ElogStatus.cxx.

References TString::Format(), ElogConnection::GetSQLServer(), TSQLStatement::NextIteration(), ElogConnection::Open(), TSQLStatement::Process(), TSQLStatement::SetString(), and TSQLServer::Statement().

Here is the call graph for this function:

◆ GetStatus() [1/2]

ElogStatus * ElogStatus::GetStatus ( int status_id)
static

Definition at line 90 of file ElogStatus.cxx.

References ElogStatus(), TString::Format(), TSQLStatement::GetInt(), ElogConnection::GetSQLServer(), TSQLStatement::GetString(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ GetStatus() [2/2]

ElogStatus * ElogStatus::GetStatus ( TString status_text)
static

Definition at line 136 of file ElogStatus.cxx.

References ElogStatus(), TString::Data(), TString::Format(), TSQLStatement::GetInt(), ElogConnection::GetSQLServer(), TSQLStatement::GetString(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ GetStatusId()

int ElogStatus::GetStatusId ( )
inline

Definition at line 58 of file ElogStatus.h.

References i_status_id.

◆ GetStatusText()

TString ElogStatus::GetStatusText ( )
inline

Definition at line 60 of file ElogStatus.h.

References str_status_text.

◆ Print()

void ElogStatus::Print ( )

Definition at line 396 of file ElogStatus.cxx.

References i_status_id, and str_status_text.

◆ PrintAll()

int ElogStatus::PrintAll ( )
static

Definition at line 322 of file ElogStatus.cxx.

References TString::Format(), TSQLStatement::GetInt(), ElogConnection::GetSQLServer(), TSQLStatement::GetString(), TSQLStatement::NextResultRow(), ElogConnection::Open(), TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Here is the call graph for this function:

◆ SetStatusText()

int ElogStatus::SetStatusText ( TString status_text)

Definition at line 363 of file ElogStatus.cxx.

References connectionDB, TString::Format(), i_status_id, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetString(), TSQLServer::Statement(), and str_status_text.

Here is the call graph for this function:

Member Data Documentation

◆ connectionDB

ElogConnection* ElogStatus::connectionDB
private

Definition at line 23 of file ElogStatus.h.

Referenced by ElogStatus(), ~ElogStatus(), and SetStatusText().

◆ i_status_id

int ElogStatus::i_status_id
private

Definition at line 26 of file ElogStatus.h.

Referenced by ElogStatus(), GetStatusId(), Print(), and SetStatusText().

◆ str_status_text

TString ElogStatus::str_status_text
private

Definition at line 28 of file ElogStatus.h.

Referenced by ElogStatus(), GetStatusText(), Print(), and SetStatusText().


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