Get Run Configuration info by run number. The class query MySQL databe use GetRunConfig Method Only this method in class interact wich DataBase. More...
#include <HarpoRunConfig.h>
Public Member Functions | |
HarpoRunConfig () | |
virtual | ~HarpoRunConfig () |
Bool_t | GetRunConfig (Long_t nrun, const TString *dbUrl=NULL) |
Query Db for given run Only this function in class interact wich DataBase. Must be called in HarpoRawReader ONLY. More... | |
Bool_t | UpdateRunConfig () |
void | print () |
Print values of all founded fields. More... | |
void | list () |
list all filds found which his types More... | |
Bool_t | Lookup (const TString field) |
Lookup filed exist. More... | |
Bool_t | Lookup (const char *field) |
Lookup filed exist. More... | |
Bool_t | GetVal (const TString field, TString &val) |
Return value of existing field in Tstring. More... | |
Bool_t | GetVal (const char *field, TString &val) |
Return value of existing field in Tstring. More... | |
Bool_t | GetType (const TString field, TString &type) |
Return Type of field in Tstring. More... | |
Bool_t | GetType (const char *field, TString &type) |
Return Type of field in Tstring. More... | |
Long_t | GetNrun () |
Get method for run number of this record. More... | |
Private Attributes | |
Long_t | run |
Bool_t | rec_found |
dbFields | fields |
Get Run Configuration info by run number. The class query MySQL databe use GetRunConfig Method Only this method in class interact wich DataBase.
Must be called in HarpoRawReader ONLY.
The other function work with object returned by the query. It safe to use it in any plase of you code.
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"; };
dbuurl = NULL (or ) ) - use default database url dbrurl = '' (empy string) - do not use databse and fill only HarpoRunConfig.run. dburl = not empy string, my be valid database url
default: dburl = "mysql://llrharpo.in2p3.fr/harpo" You can change the defailt by defining shell varibale HARPO_DB_URL to valid database URl f.e. export HARPO_DB_URL="mysql://llrharpo01.in2p3.fr/harpo" in you bact use backup db copy on llrharpo01.
Definition at line 26 of file HarpoRunConfig.h.
|
inline |
Definition at line 30 of file HarpoRunConfig.h.
|
inlinevirtual |
Definition at line 32 of file HarpoRunConfig.h.
|
inline |
Get method for run number of this record.
Definition at line 68 of file HarpoRunConfig.h.
Bool_t HarpoRunConfig::GetRunConfig | ( | Long_t | nrun, |
const TString * | dbUrl = NULL |
||
) |
Query Db for given run Only this function in class interact wich DataBase. Must be called in HarpoRawReader ONLY.
The other function work with object returned by this query. It safe to use it in any plase of you code.
Bool_t HarpoRunConfig::GetType | ( | const TString | field, |
TString & | type | ||
) |
Return Type of field in Tstring.
Definition at line 232 of file HarpoRunConfig.cxx.
Bool_t HarpoRunConfig::GetType | ( | const char * | field, |
TString & | type | ||
) |
Return Type of field in Tstring.
Definition at line 242 of file HarpoRunConfig.cxx.
Bool_t HarpoRunConfig::GetVal | ( | const TString | field, |
TString & | val | ||
) |
Return value of existing field in Tstring.
Definition at line 217 of file HarpoRunConfig.cxx.
Bool_t HarpoRunConfig::GetVal | ( | const char * | field, |
TString & | val | ||
) |
Return value of existing field in Tstring.
Definition at line 227 of file HarpoRunConfig.cxx.
void HarpoRunConfig::list | ( | ) |
list all filds found which his types
Definition at line 183 of file HarpoRunConfig.cxx.
Bool_t HarpoRunConfig::Lookup | ( | const TString | field | ) |
Lookup filed exist.
Definition at line 207 of file HarpoRunConfig.cxx.
Bool_t HarpoRunConfig::Lookup | ( | const char * | field | ) |
Lookup filed exist.
Definition at line 212 of file HarpoRunConfig.cxx.
void HarpoRunConfig::print | ( | ) |
Print values of all founded fields.
Definition at line 194 of file HarpoRunConfig.cxx.
Bool_t HarpoRunConfig::UpdateRunConfig | ( | ) |
Update DB record based on class data Not implimented
Definition at line 249 of file HarpoRunConfig.cxx.
|
private |
Definition at line 76 of file HarpoRunConfig.h.
|
private |
Definition at line 74 of file HarpoRunConfig.h.
|
private |
Definition at line 73 of file HarpoRunConfig.h.