BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
BDSMySQLWrapper Class Reference

Wrapper for mysql file handling. More...

#include <BDSMySQLWrapper.hh>

Collaboration diagram for BDSMySQLWrapper:
Collaboration graph

Public Member Functions

 BDSMySQLWrapper (const G4String &SQLFileName)
 
std::vector< BDSMySQLTable * > ConstructTable ()
 
G4int GetComponentN ()
 

Data Fields

std::vector< BDSMySQLTable * > table
 

Private Member Functions

void ReadLine ()
 
void RemoveCommentsFromLine (std::string &value)
 
void RemoveQuotesFromLine (std::string &value)
 
void RemoveWhitespace (std::string &)
 
void RemoveWhitespace (G4String &)
 
void TokenizeLine ()
 
void BeginTokens ()
 
bool NextToken ()
 
bool NextInputToken ()
 
bool EndTokens ()
 
std::string Token ()
 
bool EndOfLine ()
 
bool EmptyToken ()
 
void ProceedToEndOfLine ()
 
G4int ParseComponent ()
 
void Create ()
 
void CreateDatabase ()
 
void CreateTable ()
 
void Insert ()
 
void InsertInto ()
 
void Values ()
 

Private Attributes

std::ifstream ifs
 
G4String CurrentTableName
 
G4String InsertTableName
 
G4int ComponentN
 
G4int tableN
 
std::vector< std::string > _tokens
 
std::vector< std::string >::iterator _tokens_iter
 
std::string _currentLine
 
bool _startOfFile
 

Detailed Description

Wrapper for mysql file handling.

Author
John Carter

Definition at line 48 of file BDSMySQLWrapper.hh.

Constructor & Destructor Documentation

◆ BDSMySQLWrapper()

BDSMySQLWrapper::BDSMySQLWrapper ( const G4String &  SQLFileName)
explicit

Definition at line 38 of file BDSMySQLWrapper.cc.

◆ ~BDSMySQLWrapper()

BDSMySQLWrapper::~BDSMySQLWrapper ( )

Definition at line 56 of file BDSMySQLWrapper.cc.

Member Function Documentation

◆ BeginTokens()

void BDSMySQLWrapper::BeginTokens ( )
private

Definition at line 249 of file BDSMySQLWrapper.cc.

◆ ConstructTable()

std::vector< BDSMySQLTable * > BDSMySQLWrapper::ConstructTable ( )

Definition at line 59 of file BDSMySQLWrapper.cc.

◆ Create()

void BDSMySQLWrapper::Create ( )
private

Definition at line 195 of file BDSMySQLWrapper.cc.

◆ CreateDatabase()

void BDSMySQLWrapper::CreateDatabase ( )
private

Definition at line 150 of file BDSMySQLWrapper.cc.

◆ CreateTable()

void BDSMySQLWrapper::CreateTable ( )
private

Definition at line 153 of file BDSMySQLWrapper.cc.

◆ EmptyToken()

bool BDSMySQLWrapper::EmptyToken ( )
private

Definition at line 275 of file BDSMySQLWrapper.cc.

◆ EndOfLine()

bool BDSMySQLWrapper::EndOfLine ( )
private

Definition at line 270 of file BDSMySQLWrapper.cc.

◆ EndTokens()

bool BDSMySQLWrapper::EndTokens ( )
private

Definition at line 265 of file BDSMySQLWrapper.cc.

◆ GetComponentN()

G4int BDSMySQLWrapper::GetComponentN ( )
inline

Definition at line 56 of file BDSMySQLWrapper.hh.

◆ Insert()

void BDSMySQLWrapper::Insert ( )
private

Definition at line 205 of file BDSMySQLWrapper.cc.

◆ InsertInto()

void BDSMySQLWrapper::InsertInto ( )
private

Definition at line 213 of file BDSMySQLWrapper.cc.

◆ NextInputToken()

bool BDSMySQLWrapper::NextInputToken ( )
private

Definition at line 253 of file BDSMySQLWrapper.cc.

◆ NextToken()

bool BDSMySQLWrapper::NextToken ( )
private

Definition at line 113 of file BDSMySQLWrapper.cc.

◆ ParseComponent()

G4int BDSMySQLWrapper::ParseComponent ( )
private

Definition at line 136 of file BDSMySQLWrapper.cc.

◆ ProceedToEndOfLine()

void BDSMySQLWrapper::ProceedToEndOfLine ( )
private

Definition at line 285 of file BDSMySQLWrapper.cc.

◆ ReadLine()

void BDSMySQLWrapper::ReadLine ( )
private

Definition at line 298 of file BDSMySQLWrapper.cc.

◆ RemoveCommentsFromLine()

void BDSMySQLWrapper::RemoveCommentsFromLine ( std::string &  value)
private

Definition at line 314 of file BDSMySQLWrapper.cc.

◆ RemoveQuotesFromLine()

void BDSMySQLWrapper::RemoveQuotesFromLine ( std::string &  value)
private

Definition at line 321 of file BDSMySQLWrapper.cc.

◆ RemoveWhitespace() [1/2]

void BDSMySQLWrapper::RemoveWhitespace ( G4String &  val)
private

Definition at line 327 of file BDSMySQLWrapper.cc.

◆ RemoveWhitespace() [2/2]

void BDSMySQLWrapper::RemoveWhitespace ( std::string &  val)
private

Definition at line 333 of file BDSMySQLWrapper.cc.

◆ Token()

std::string BDSMySQLWrapper::Token ( )
private

Definition at line 280 of file BDSMySQLWrapper.cc.

◆ TokenizeLine()

void BDSMySQLWrapper::TokenizeLine ( )
private

Definition at line 68 of file BDSMySQLWrapper.cc.

◆ Values()

void BDSMySQLWrapper::Values ( )
private

Definition at line 220 of file BDSMySQLWrapper.cc.

Field Documentation

◆ _currentLine

std::string BDSMySQLWrapper::_currentLine
private

Definition at line 98 of file BDSMySQLWrapper.hh.

◆ _startOfFile

bool BDSMySQLWrapper::_startOfFile
private

Definition at line 99 of file BDSMySQLWrapper.hh.

◆ _tokens

std::vector<std::string> BDSMySQLWrapper::_tokens
private

Definition at line 78 of file BDSMySQLWrapper.hh.

◆ _tokens_iter

std::vector<std::string>::iterator BDSMySQLWrapper::_tokens_iter
private

Definition at line 79 of file BDSMySQLWrapper.hh.

◆ ComponentN

G4int BDSMySQLWrapper::ComponentN
private

Definition at line 68 of file BDSMySQLWrapper.hh.

◆ CurrentTableName

G4String BDSMySQLWrapper::CurrentTableName
private

Definition at line 66 of file BDSMySQLWrapper.hh.

◆ ifs

std::ifstream BDSMySQLWrapper::ifs
private

Definition at line 64 of file BDSMySQLWrapper.hh.

◆ InsertTableName

G4String BDSMySQLWrapper::InsertTableName
private

Definition at line 67 of file BDSMySQLWrapper.hh.

◆ table

std::vector<BDSMySQLTable*> BDSMySQLWrapper::table

Definition at line 58 of file BDSMySQLWrapper.hh.

◆ tableN

G4int BDSMySQLWrapper::tableN
private

Definition at line 70 of file BDSMySQLWrapper.hh.


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