#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 20 of file DatabaseUtil_service.cc.
|
private |
Definition at line 29 of file DatabaseUtil_service.cc.
|
private |
Definition at line 58 of file DatabaseUtil_service.cc.
int util::DatabaseUtil::GetEfieldValuesFromDB | ( | int | run, |
std::vector< double > & | efield | ||
) |
Definition at line 192 of file DatabaseUtil_service.cc.
int util::DatabaseUtil::GetLifetimeFromDB | ( | int | run, |
double & | lftime_real | ||
) |
Definition at line 235 of file DatabaseUtil_service.cc.
int util::DatabaseUtil::GetPOTFromDB | ( | int | run, |
long double & | POT | ||
) |
Definition at line 278 of file DatabaseUtil_service.cc.
int util::DatabaseUtil::GetTemperatureFromDB | ( | int | run, |
double & | temp_real | ||
) |
Definition at line 171 of file DatabaseUtil_service.cc.
int util::DatabaseUtil::GetTriggerOffsetFromDB | ( | int | run, |
double & | T0_real | ||
) |
Definition at line 256 of file DatabaseUtil_service.cc.
UBChannelMap_t util::DatabaseUtil::GetUBChannelMap | ( | int | data_taking_timestamp = -1 , |
int | swizzling_timestamp = -1 |
||
) |
Definition at line 382 of file DatabaseUtil_service.cc.
UBChannelReverseMap_t util::DatabaseUtil::GetUBChannelReverseMap | ( | int | data_taking_timestamp = -1 , |
int | swizzling_timestamp = -1 |
||
) |
Definition at line 387 of file DatabaseUtil_service.cc.
|
private |
Definition at line 301 of file DatabaseUtil_service.cc.
void util::DatabaseUtil::reconfigure | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 71 of file DatabaseUtil_service.cc.
int util::DatabaseUtil::SelectFieldByName | ( | std::vector< std::string > & | value, |
const char * | field, | ||
const char * | condition, | ||
const char * | table | ||
) |
Definition at line 216 of file DatabaseUtil_service.cc.
|
private |
Definition at line 111 of file DatabaseUtil_service.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 394 of file DatabaseUtil_service.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.