#include <DatabaseUtil.h>
Public Member Functions | |
DatabaseUtil (fhicl::ParameterSet const &pset) | |
void | reconfigure (fhicl::ParameterSet const &pset) |
int | GetLifetimeFromDB (int run, double &lftime_real) |
int | GetTriggerOffsetFromDB (int run, double &T0_real) |
int | GetTemperatureFromDB (int run, double &temp_real) |
int | GetEfieldValuesFromDB (int run, std::vector< double > &efield) |
int | GetPOTFromDB (int run, long double &POT) |
UBChannelMap_t | GetUBChannelMap (int data_taking_timestamp=-1, int swizzling_timestamp=-1) |
UBChannelReverseMap_t | GetUBChannelReverseMap (int data_taking_timestamp=-1, int swizzling_timestamp=-1) |
int | SelectFieldByName (std::vector< std::string > &value, const char *field, const char *condition, const char *table) |
std::vector< std::string > & | split (const std::string &s, char delim, std::vector< std::string > &elems) |
bool | ToughErrorTreatment () const |
bool | ShouldConnect () const |
Private Member Functions | |
int | SelectSingleFieldByQuery (std::vector< std::string > &value, const char *query) |
int | Connect (int conn_wait=0) |
int | DisConnect () |
void | LoadUBChannelMap (int data_taking_timestamp=-1, int swizzling_timestamp=-1) |
Private Attributes | |
char | connection_str [200] |
PGconn * | conn |
std::string | fDBHostName |
std::string | fDBName |
std::string | fDBUser |
std::string | fTableName |
int | fPort |
std::string | fPassword |
bool | fToughErrorTreatment |
bool | fShouldConnect |
UBChannelMap_t | fChannelMap |
UBChannelReverseMap_t | fChannelReverseMap |
Definition at line 52 of file DatabaseUtil.h.
util::DatabaseUtil::DatabaseUtil | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 19 of file DatabaseUtil.cc.
|
private |
Definition at line 28 of file DatabaseUtil.cc.
|
private |
Definition at line 57 of file DatabaseUtil.cc.
int util::DatabaseUtil::GetEfieldValuesFromDB | ( | int | run, |
std::vector< double > & | efield | ||
) |
Definition at line 191 of file DatabaseUtil.cc.
int util::DatabaseUtil::GetLifetimeFromDB | ( | int | run, |
double & | lftime_real | ||
) |
Definition at line 234 of file DatabaseUtil.cc.
int util::DatabaseUtil::GetPOTFromDB | ( | int | run, |
long double & | POT | ||
) |
Definition at line 277 of file DatabaseUtil.cc.
int util::DatabaseUtil::GetTemperatureFromDB | ( | int | run, |
double & | temp_real | ||
) |
Definition at line 170 of file DatabaseUtil.cc.
int util::DatabaseUtil::GetTriggerOffsetFromDB | ( | int | run, |
double & | T0_real | ||
) |
Definition at line 255 of file DatabaseUtil.cc.
UBChannelMap_t util::DatabaseUtil::GetUBChannelMap | ( | int | data_taking_timestamp = -1 , |
int | swizzling_timestamp = -1 |
||
) |
Definition at line 381 of file DatabaseUtil.cc.
UBChannelReverseMap_t util::DatabaseUtil::GetUBChannelReverseMap | ( | int | data_taking_timestamp = -1 , |
int | swizzling_timestamp = -1 |
||
) |
Definition at line 386 of file DatabaseUtil.cc.
|
private |
Definition at line 300 of file DatabaseUtil.cc.
void util::DatabaseUtil::reconfigure | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 70 of file DatabaseUtil.cc.
int util::DatabaseUtil::SelectFieldByName | ( | std::vector< std::string > & | value, |
const char * | field, | ||
const char * | condition, | ||
const char * | table | ||
) |
Definition at line 215 of file DatabaseUtil.cc.
|
private |
Definition at line 110 of file DatabaseUtil.cc.
|
inline |
Definition at line 70 of file DatabaseUtil.h.
std::vector< std::string > & util::DatabaseUtil::split | ( | const std::string & | s, |
char | delim, | ||
std::vector< std::string > & | elems | ||
) |
Definition at line 393 of file DatabaseUtil.cc.
|
inline |
Definition at line 69 of file DatabaseUtil.h.
|
private |
Definition at line 79 of file DatabaseUtil.h.
|
private |
Definition at line 77 of file DatabaseUtil.h.
|
private |
Definition at line 89 of file DatabaseUtil.h.
|
private |
Definition at line 90 of file DatabaseUtil.h.
|
private |
Definition at line 80 of file DatabaseUtil.h.
|
private |
Definition at line 81 of file DatabaseUtil.h.
|
private |
Definition at line 82 of file DatabaseUtil.h.
|
private |
Definition at line 85 of file DatabaseUtil.h.
|
private |
Definition at line 84 of file DatabaseUtil.h.
|
private |
Definition at line 87 of file DatabaseUtil.h.
|
private |
Definition at line 83 of file DatabaseUtil.h.
|
private |
Definition at line 86 of file DatabaseUtil.h.