HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
HarpoDB Class Reference

Harpo Database access class. The class query MySQL database. Deal with (single !) Harpo Database and it tables Remote access to mysql server via ssh ssh -L 3306:llrharpo.in2p3.fr:3306 llrgate01.in2p3.fr mysql access mysql -h 127.0.0.1 -u reader -p harpo reco access: ADD to .cfg rundb: { dburl = "mysql://127.0.0.1/harpo"; dbuser = "reader"; dbpasswd = "ro"; }; TMYSQLxxx res == NULL -> query error res->GetRowCount() == 0 -> ok for command without ruturn (NO SELECT) More...

#include <HarpoDB.h>

Public Member Functions

 HarpoDB ()
 
virtual ~HarpoDB ()
 
Bool_t Open (const TString *DbUrl=NULL)
 
Bool_t Close ()
 
Bool_t GetTable (const TString name, HarpoDBTable *table)
 
Bool_t GetTable (const TString name, HarpoDBTable &table)
 
Bool_t ExecQuery (const TString sql, dbResults *list=NULL)
 
void list ()
 
TList * GetListOfTables ()
 

Static Public Member Functions

static void SetUser (TString u, TString p)
 
static void SetDBUrl (const TString &DbUrl)
 
static TSQLServer * GetDBServer ()
 
static const char * GetDBName ()
 

Private Attributes

TList * fTables
 

Static Private Attributes

static TSQLServer * db = (TSQLServer *) NULL
 
static TString dbUrl = TString("mysql://llrharpo.in2p3.fr/harpo")
 
static TString dbuser = TString("reader")
 
static TString dbpw = TString("ro")
 

Detailed Description

Harpo Database access class. The class query MySQL database. Deal with (single !) Harpo Database and it tables Remote access to mysql server via ssh ssh -L 3306:llrharpo.in2p3.fr:3306 llrgate01.in2p3.fr mysql access mysql -h 127.0.0.1 -u reader -p harpo reco access: ADD to .cfg rundb: { dburl = "mysql://127.0.0.1/harpo"; dbuser = "reader"; dbpasswd = "ro"; }; TMYSQLxxx res == NULL -> query error res->GetRowCount() == 0 -> ok for command without ruturn (NO SELECT)

Definition at line 112 of file HarpoDB.h.

Constructor & Destructor Documentation

HarpoDB::HarpoDB ( )
inline

Definition at line 115 of file HarpoDB.h.

virtual HarpoDB::~HarpoDB ( )
inline

Definition at line 116 of file HarpoDB.h.

Member Function Documentation

Bool_t HarpoDB::Close ( )

Definition at line 111 of file HarpoDB.cxx.

Here is the caller graph for this function:

Bool_t HarpoDB::ExecQuery ( const TString  sql,
dbResults list = NULL 
)

Definition at line 170 of file HarpoDB.cxx.

Here is the caller graph for this function:

const char * HarpoDB::GetDBName ( )
static

Definition at line 55 of file HarpoDB.cxx.

static TSQLServer* HarpoDB::GetDBServer ( )
inlinestatic

Definition at line 133 of file HarpoDB.h.

Here is the caller graph for this function:

TList* HarpoDB::GetListOfTables ( )
inline

Definition at line 130 of file HarpoDB.h.

Bool_t HarpoDB::GetTable ( const TString  name,
HarpoDBTable table 
)
inline

Definition at line 122 of file HarpoDB.h.

Here is the caller graph for this function:

Bool_t HarpoDB::GetTable ( const TString  name,
HarpoDBTable table 
)

Definition at line 127 of file HarpoDB.cxx.

Here is the call graph for this function:

void HarpoDB::list ( )

Definition at line 65 of file HarpoDB.cxx.

Here is the caller graph for this function:

Bool_t HarpoDB::Open ( const TString *  DbUrl = NULL)

Definition at line 77 of file HarpoDB.cxx.

Here is the caller graph for this function:

static void HarpoDB::SetDBUrl ( const TString &  DbUrl)
inlinestatic

Definition at line 119 of file HarpoDB.h.

void HarpoDB::SetUser ( TString  u,
TString  p 
)
static

Definition at line 60 of file HarpoDB.cxx.

Here is the caller graph for this function:

Field Documentation

TSQLServer * HarpoDB::db = (TSQLServer *) NULL
staticprivate

Definition at line 137 of file HarpoDB.h.

TString HarpoDB::dbpw = TString("ro")
staticprivate

Definition at line 140 of file HarpoDB.h.

TString HarpoDB::dbUrl = TString("mysql://llrharpo.in2p3.fr/harpo")
staticprivate

Definition at line 138 of file HarpoDB.h.

TString HarpoDB::dbuser = TString("reader")
staticprivate

Definition at line 139 of file HarpoDB.h.

TList* HarpoDB::fTables
private

Definition at line 141 of file HarpoDB.h.


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