BmnRoot 26.10.0-233-gb9bbe585
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
ElogAttachment Class Reference

ElogAttachment.h Class for the table: attachment_. More...

#include <ElogAttachment.h>

Collaboration diagram for ElogAttachment:

Public Member Functions

virtual ~ElogAttachment ()
int GetRecordId ()
 get record id of the current attachment
int GetAttachmentNumber ()
 get attachment number of the current attachment
TString GetFilePath ()
 get file path of the current attachment
int SetRecordId (int record_id)
 set record id of the current attachment
int SetAttachmentNumber (int attachment_number)
 set attachment number of the current attachment
int SetFilePath (TString file_path)
 set file path of the current attachment
void Print ()
 print information about current attachment

Static Public Member Functions

static ElogAttachment * CreateAttachment (int record_id, int attachment_number, TString file_path)
 add new attachment to the database
static ElogAttachment * GetAttachment (int record_id, int attachment_number)
 get attachment from the database
static ElogAttachment * GetAttachment (TString file_path)
 get attachment from the database
static int CheckAttachmentExists (int record_id, int attachment_number)
 check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
static int CheckAttachmentExists (TString file_path)
 check attachment exists in the database: 1- true, 0 - false, <0 - database operation error
static int DeleteAttachment (int record_id, int attachment_number)
 delete attachment from the database
static int DeleteAttachment (TString file_path)
 delete attachment from the database
static int PrintAll ()
 print all attachments

Private Member Functions

 ElogAttachment (ElogConnection *db_connect, int record_id, int attachment_number, TString file_path)

Private Attributes

ElogConnection * connectionDB
 connection to the database
int i_record_id
 record id
int i_attachment_number
 attachment number
TString str_file_path
 file path

Detailed Description

Definition at line 17 of file ElogAttachment.h.

Constructor & Destructor Documentation

◆ ElogAttachment()

ElogAttachment::ElogAttachment ( ElogConnection * db_connect,
int record_id,
int attachment_number,
TString file_path )
private

Definition at line 16 of file ElogAttachment.cxx.

References connectionDB, i_attachment_number, i_record_id, and str_file_path.

Referenced by CreateAttachment(), GetAttachment(), and GetAttachment().

Here is the caller graph for this function:

◆ ~ElogAttachment()

ElogAttachment::~ElogAttachment ( )
virtual

Definition at line 26 of file ElogAttachment.cxx.

References connectionDB.

Member Function Documentation

◆ CheckAttachmentExists() [1/2]

int ElogAttachment::CheckAttachmentExists ( int record_id,
int attachment_number )
static

Definition at line 167 of file ElogAttachment.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:

◆ CheckAttachmentExists() [2/2]

int ElogAttachment::CheckAttachmentExists ( TString file_path)
static

Definition at line 207 of file ElogAttachment.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:

◆ CreateAttachment()

ElogAttachment * ElogAttachment::CreateAttachment ( int record_id,
int attachment_number,
TString file_path )
static

Definition at line 33 of file ElogAttachment.cxx.

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

Here is the call graph for this function:

◆ DeleteAttachment() [1/2]

int ElogAttachment::DeleteAttachment ( int record_id,
int attachment_number )
static

Definition at line 247 of file ElogAttachment.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:

◆ DeleteAttachment() [2/2]

int ElogAttachment::DeleteAttachment ( TString file_path)
static

Definition at line 278 of file ElogAttachment.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:

◆ GetAttachment() [1/2]

ElogAttachment * ElogAttachment::GetAttachment ( int record_id,
int attachment_number )
static

Definition at line 71 of file ElogAttachment.cxx.

References ElogAttachment(), 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:

◆ GetAttachment() [2/2]

ElogAttachment * ElogAttachment::GetAttachment ( TString file_path)
static

Definition at line 119 of file ElogAttachment.cxx.

References ElogAttachment(), 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:

◆ GetAttachmentNumber()

int ElogAttachment::GetAttachmentNumber ( )
inline

Definition at line 61 of file ElogAttachment.h.

References i_attachment_number.

◆ GetFilePath()

TString ElogAttachment::GetFilePath ( )
inline

Definition at line 63 of file ElogAttachment.h.

References str_file_path.

◆ GetRecordId()

int ElogAttachment::GetRecordId ( )
inline

Definition at line 59 of file ElogAttachment.h.

References i_record_id.

◆ Print()

void ElogAttachment::Print ( )

Definition at line 451 of file ElogAttachment.cxx.

References i_attachment_number, i_record_id, and str_file_path.

◆ PrintAll()

int ElogAttachment::PrintAll ( )
static

Definition at line 308 of file ElogAttachment.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:

◆ SetAttachmentNumber()

int ElogAttachment::SetAttachmentNumber ( int attachment_number)

Definition at line 384 of file ElogAttachment.cxx.

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

Here is the call graph for this function:

◆ SetFilePath()

int ElogAttachment::SetFilePath ( TString file_path)

Definition at line 417 of file ElogAttachment.cxx.

References connectionDB, TString::Format(), i_attachment_number, i_record_id, TSQLStatement::NextIteration(), TSQLStatement::Process(), TSQLStatement::SetInt(), TSQLStatement::SetString(), TSQLServer::Statement(), and str_file_path.

Here is the call graph for this function:

◆ SetRecordId()

int ElogAttachment::SetRecordId ( int record_id)

Definition at line 351 of file ElogAttachment.cxx.

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

Here is the call graph for this function:

Member Data Documentation

◆ connectionDB

ElogConnection* ElogAttachment::connectionDB
private

◆ i_attachment_number

int ElogAttachment::i_attachment_number
private

◆ i_record_id

int ElogAttachment::i_record_id
private

◆ str_file_path

TString ElogAttachment::str_file_path
private

Definition at line 29 of file ElogAttachment.h.

Referenced by ElogAttachment(), GetFilePath(), Print(), and SetFilePath().


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