10 #define DATABASEUTIL_H 24 UBDaqID(
int _crate,
int _card,
int _channel ) :
34 if (this->crate == rhs.
crate &&
35 this->card == rhs.
card &&
36 this->channel < rhs.
channel) is_less=
true;
37 else if (this->crate == rhs.
crate &&
38 this->card < rhs.
card) is_less=
true;
39 else if (this->crate < rhs.
crate) is_less=
true;
58 int GetLifetimeFromDB(
int run,
double &lftime_real);
59 int GetTriggerOffsetFromDB(
int run,
double &T0_real);
60 int GetTemperatureFromDB(
int run,
double &temp_real);
61 int GetEfieldValuesFromDB(
int run,std::vector<double> &efield);
62 int GetPOTFromDB(
int run,
long double &POT);
63 UBChannelMap_t GetUBChannelMap(
int data_taking_timestamp = -1 ,
int swizzling_timestamp = -1 );
64 UBChannelReverseMap_t GetUBChannelReverseMap(
int data_taking_timestamp = -1 ,
int swizzling_timestamp = -1 );
66 int SelectFieldByName(std::vector<std::string> &
value,
const char * field,
const char * condition,
const char * table);
74 int SelectSingleFieldByQuery(std::vector<std::string> &value,
const char *
query);
75 int Connect(
int conn_wait=0);
77 char connection_str[200];
91 void LoadUBChannelMap(
int data_taking_timestamp = -1 ,
int swizzling_timestamp = -1 );
Namespace for general, non-LArSoft-specific utilities.
const bool operator<(const UBDaqID &rhs) const
bool fToughErrorTreatment
virtual void reconfigure(fhicl::ParameterSet const &pset)
#define DECLARE_ART_SERVICE(svc, scope)
UBDaqID(int _crate, int _card, int _channel)
bool ToughErrorTreatment() const
std::map< UBDaqID, UBLArSoftCh_t > UBChannelMap_t
bool ShouldConnect() const
void split(std::string const &s, char c, OutIter dest)
std::map< UBLArSoftCh_t, UBDaqID > UBChannelReverseMap_t
query_result< Args... > query(sqlite3 *db, std::string const &ddl)
UBChannelReverseMap_t fChannelReverseMap
UBChannelMap_t fChannelMap