BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
UniParameter Class Reference

#include <UniParameter.h>

Collaboration diagram for UniParameter:

Public Member Functions

virtual ~UniParameter ()
int GetParameterId ()
 get parameter id of the current parameter
TString GetParameterName ()
 get parameter name of the current parameter
int GetParameterType ()
 get parameter type of the current parameter
bool GetIsArray ()
 get is array of the current parameter
int SetParameterName (TString parameter_name)
 set parameter name of the current parameter
int SetParameterType (int parameter_type)
 set parameter type of the current parameter
int SetIsArray (bool is_array)
 set is array of the current parameter
void Print ()
 print information about current parameter
virtual ~UniParameter ()
int GetParameterId ()
 get parameter id of the current parameter
TString GetParameterName ()
 get parameter name of the current parameter
int GetParameterType ()
 get parameter type of the current parameter
bool GetIsArray ()
 get is array of the current parameter
int SetParameterName (TString parameter_name)
 set parameter name of the current parameter
int SetParameterType (int parameter_type)
 set parameter type of the current parameter
int SetIsArray (bool is_array)
 set is array of the current parameter
void Print ()
 print information about current parameter

Static Public Member Functions

static UniParameter * CreateParameter (TString parameter_name, int parameter_type, bool is_array)
 add new parameter to the database
static UniParameter * GetParameter (int parameter_id)
 get parameter from the database
static UniParameter * GetParameter (TString parameter_name)
 get parameter from the database
static int CheckParameterExists (int parameter_id)
 check parameter exists in the database: 1- true, 0 - false, <0 - database operation error
static int CheckParameterExists (TString parameter_name)
 check parameter exists in the database: 1- true, 0 - false, <0 - database operation error
static int DeleteParameter (int parameter_id)
 delete parameter from the database
static int DeleteParameter (TString parameter_name)
 delete parameter from the database
static int PrintAll ()
 print all parameters
static bool CheckAndGetParameterID (TSQLServer *db_server, TString parameter_name, enumValueType enum_parameter_type, int &parameter_id)
static UniParameter * CreateParameter (TString parameter_name, int parameter_type, bool is_array)
 add new parameter to the database
static UniParameter * GetParameter (int parameter_id)
 get parameter from the database
static UniParameter * GetParameter (TString parameter_name)
 get parameter from the database
static int CheckParameterExists (int parameter_id)
 check parameter exists in the database: 1- true, 0 - false, <0 - database operation error
static int CheckParameterExists (TString parameter_name)
 check parameter exists in the database: 1- true, 0 - false, <0 - database operation error
static int DeleteParameter (int parameter_id)
 delete parameter from the database
static int DeleteParameter (TString parameter_name)
 delete parameter from the database
static int PrintAll ()
 print all parameters
static bool CheckAndGetParameterID (TSQLServer *db_server, TString parameter_name, enumValueType enum_parameter_type, int &parameter_id)

Private Member Functions

 UniParameter (UniConnection *db_connect, int parameter_id, TString parameter_name, int parameter_type, bool is_array)
 UniParameter (UniConnection *db_connect, int parameter_id, TString parameter_name, int parameter_type, bool is_array)

Private Attributes

UniConnection * connectionDB
 connection to the database
int i_parameter_id
 parameter id
TString str_parameter_name
 parameter name
int i_parameter_type
 parameter type
bool b_is_array
 is array

Detailed Description

Definition at line 21 of file UniParameter.h.

Constructor & Destructor Documentation

◆ UniParameter() [1/2]

UniParameter::UniParameter ( UniConnection * db_connect,
int parameter_id,
TString parameter_name,
int parameter_type,
bool is_array )
private

Definition at line 16 of file UniParameter.cxx.

References b_is_array, connectionDB, i_parameter_id, i_parameter_type, parameter_name, and str_parameter_name.

Referenced by CheckAndGetParameterID(), CreateParameter(), GetParameter(), and GetParameter().

Here is the caller graph for this function:

◆ ~UniParameter() [1/2]

UniParameter::~UniParameter ( )
virtual

Definition at line 31 of file UniParameter.cxx.

References connectionDB.

◆ UniParameter() [2/2]

UniParameter::UniParameter ( UniConnection * db_connect,
int parameter_id,
TString parameter_name,
int parameter_type,
bool is_array )
private

References parameter_name.

◆ ~UniParameter() [2/2]

virtual UniParameter::~UniParameter ( )
virtual

Member Function Documentation

◆ CheckAndGetParameterID() [1/2]

bool UniParameter::CheckAndGetParameterID ( TSQLServer * db_server,
TString parameter_name,
enumValueType enum_parameter_type,
int & parameter_id )
static

Definition at line 495 of file UniParameter.cxx.

References TString::Format(), TSQLStatement::GetInt(), TSQLStatement::NextResultRow(), parameter_name, TSQLStatement::Process(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Referenced by UniDetectorParameter::CreateDetectorParameter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckAndGetParameterID() [2/2]

bool UniParameter::CheckAndGetParameterID ( TSQLServer * db_server,
TString parameter_name,
enumValueType enum_parameter_type,
int & parameter_id )
static

References UniParameter(), and parameter_name.

Here is the call graph for this function:

◆ CheckParameterExists() [1/4]

int UniParameter::CheckParameterExists ( int parameter_id)
static

Definition at line 203 of file UniParameter.cxx.

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

Referenced by move_field_2_parameter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckParameterExists() [2/4]

int UniParameter::CheckParameterExists ( int parameter_id)
static

◆ CheckParameterExists() [3/4]

int UniParameter::CheckParameterExists ( TString parameter_name)
static

Definition at line 243 of file UniParameter.cxx.

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

Here is the call graph for this function:

◆ CheckParameterExists() [4/4]

int UniParameter::CheckParameterExists ( TString parameter_name)
static

References parameter_name.

◆ CreateParameter() [1/2]

UniParameter * UniParameter::CreateParameter ( TString parameter_name,
int parameter_type,
bool is_array )
static

Definition at line 38 of file UniParameter.cxx.

References UniParameter(), TString::Format(), TSQLStatement::GetInt(), UniConnection::GetSQLServer(), TSQLStatement::NextIteration(), TSQLStatement::NextResultRow(), UniConnection::Open(), parameter_name, TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetString(), TSQLServer::Statement(), and TSQLStatement::StoreResult().

Referenced by create_new_parameter(), and move_field_2_parameter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateParameter() [2/2]

UniParameter * UniParameter::CreateParameter ( TString parameter_name,
int parameter_type,
bool is_array )
static

References UniParameter(), and parameter_name.

Here is the call graph for this function:

◆ DeleteParameter() [1/4]

int UniParameter::DeleteParameter ( int parameter_id)
static

Definition at line 283 of file UniParameter.cxx.

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

Referenced by delete_Tof1_INL(), and delete_Tof1_mapping().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeleteParameter() [2/4]

int UniParameter::DeleteParameter ( int parameter_id)
static

◆ DeleteParameter() [3/4]

int UniParameter::DeleteParameter ( TString parameter_name)
static

Definition at line 313 of file UniParameter.cxx.

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

Here is the call graph for this function:

◆ DeleteParameter() [4/4]

int UniParameter::DeleteParameter ( TString parameter_name)
static

References parameter_name.

◆ GetIsArray() [1/2]

bool UniParameter::GetIsArray ( )
inline

Definition at line 75 of file UniParameter.h.

References b_is_array.

◆ GetIsArray() [2/2]

bool UniParameter::GetIsArray ( )
inline

Definition at line 75 of file UniParameter.h.

References b_is_array.

◆ GetParameter() [1/4]

UniParameter * UniParameter::GetParameter ( int parameter_id)
static

Definition at line 103 of file UniParameter.cxx.

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

Referenced by UniDetectorParameter::GetParameterName(), and UniDetectorParameter::GetParameterType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetParameter() [2/4]

UniParameter * UniParameter::GetParameter ( int parameter_id)
static

References UniParameter().

Here is the call graph for this function:

◆ GetParameter() [3/4]

UniParameter * UniParameter::GetParameter ( TString parameter_name)
static

Definition at line 153 of file UniParameter.cxx.

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

Here is the call graph for this function:

◆ GetParameter() [4/4]

UniParameter * UniParameter::GetParameter ( TString parameter_name)
static

References UniParameter(), and parameter_name.

Here is the call graph for this function:

◆ GetParameterId() [1/2]

int UniParameter::GetParameterId ( )
inline

Definition at line 69 of file UniParameter.h.

References i_parameter_id.

◆ GetParameterId() [2/2]

int UniParameter::GetParameterId ( )
inline

Definition at line 69 of file UniParameter.h.

References i_parameter_id.

◆ GetParameterName() [1/2]

TString UniParameter::GetParameterName ( )
inline

Definition at line 71 of file UniParameter.h.

References str_parameter_name.

Referenced by UniDetectorParameter::GetParameterName().

Here is the caller graph for this function:

◆ GetParameterName() [2/2]

TString UniParameter::GetParameterName ( )
inline

Definition at line 71 of file UniParameter.h.

References str_parameter_name.

◆ GetParameterType() [1/2]

int UniParameter::GetParameterType ( )
inline

Definition at line 73 of file UniParameter.h.

References i_parameter_type.

Referenced by UniDetectorParameter::GetParameterType().

Here is the caller graph for this function:

◆ GetParameterType() [2/2]

int UniParameter::GetParameterType ( )
inline

Definition at line 73 of file UniParameter.h.

References i_parameter_type.

◆ Print() [1/2]

void UniParameter::Print ( )

Definition at line 485 of file UniParameter.cxx.

References b_is_array, i_parameter_id, i_parameter_type, and str_parameter_name.

◆ Print() [2/2]

void UniParameter::Print ( )

◆ PrintAll() [1/2]

int UniParameter::PrintAll ( )
static

Definition at line 343 of file UniParameter.cxx.

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

Here is the call graph for this function:

◆ PrintAll() [2/2]

int UniParameter::PrintAll ( )
static

◆ SetIsArray() [1/2]

int UniParameter::SetIsArray ( bool is_array)

Definition at line 452 of file UniParameter.cxx.

References b_is_array, connectionDB, TString::Format(), i_parameter_id, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), and TSQLServer::Statement().

Here is the call graph for this function:

◆ SetIsArray() [2/2]

int UniParameter::SetIsArray ( bool is_array)

◆ SetParameterName() [1/2]

int UniParameter::SetParameterName ( TString parameter_name)

Definition at line 388 of file UniParameter.cxx.

References connectionDB, TString::Format(), i_parameter_id, TSQLStatement::NextIteration(), parameter_name, TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetString(), TSQLServer::Statement(), and str_parameter_name.

Here is the call graph for this function:

◆ SetParameterName() [2/2]

int UniParameter::SetParameterName ( TString parameter_name)

References parameter_name.

◆ SetParameterType() [1/2]

int UniParameter::SetParameterType ( int parameter_type)

Definition at line 420 of file UniParameter.cxx.

References connectionDB, TString::Format(), i_parameter_id, i_parameter_type, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), and TSQLServer::Statement().

Here is the call graph for this function:

◆ SetParameterType() [2/2]

int UniParameter::SetParameterType ( int parameter_type)

Member Data Documentation

◆ b_is_array

bool UniParameter::b_is_array
private

Definition at line 35 of file UniParameter.h.

Referenced by UniParameter(), GetIsArray(), Print(), and SetIsArray().

◆ connectionDB

UniConnection * UniParameter::connectionDB
private

◆ i_parameter_id

int UniParameter::i_parameter_id
private

◆ i_parameter_type

int UniParameter::i_parameter_type
private

Definition at line 33 of file UniParameter.h.

Referenced by UniParameter(), GetParameterType(), Print(), and SetParameterType().

◆ str_parameter_name

TString UniParameter::str_parameter_name
private

Definition at line 31 of file UniParameter.h.

Referenced by UniParameter(), GetParameterName(), Print(), and SetParameterName().


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