LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "DBFolder.h"
Public Member Functions | |
DBFolder (const std::string &name, const std::string &url, const std::string &url2, const std::string &tag="", bool useqlite=false, bool testmode=false) | |
virtual | ~DBFolder () |
int | GetNamedChannelData (DBChannelID_t channel, const std::string &name, bool &data) |
int | GetNamedChannelData (DBChannelID_t channel, const std::string &name, long &data) |
int | GetNamedChannelData (DBChannelID_t channel, const std::string &name, double &data) |
int | GetNamedChannelData (DBChannelID_t channel, const std::string &name, std::string &data) |
const std::string & | URL () const |
const std::string & | FolderName () const |
const std::string & | Tag () const |
const IOVTimeStamp & | CachedStart () const |
const IOVTimeStamp & | CachedEnd () const |
bool | UpdateData (DBTimeStamp_t raw_time) |
void | GetSQLiteData (int t, DBDataset &data) const |
int | GetChannelList (std::vector< DBChannelID_t > &channels) const |
void | DumpDataset (const DBDataset &data) const |
bool | CompareDataset (const DBDataset &data1, const DBDataset &data2) const |
Private Member Functions | |
void | GetRow (DBChannelID_t channel) |
size_t | GetColumn (const std::string &name) const |
bool | IsValid (const IOVTimeStamp &time) const |
Private Attributes | |
std::string | fURL |
std::string | fURL2 |
std::string | fFolderName |
std::string | fTag |
bool | fUseSQLite |
bool | fTestMode |
std::string | fSQLitePath |
int | fMaximumTimeout |
DBDataset | fCache |
int | fCachedRowNumber |
DBChannelID_t | fCachedChannel |
DBDataset::DBRow | fCachedRow |
Definition at line 15 of file DBFolder.h.
lariov::DBFolder::DBFolder | ( | const std::string & | name, |
const std::string & | url, | ||
const std::string & | url2, | ||
const std::string & | tag = "" , |
||
bool | useqlite = false , |
||
bool | testmode = false |
||
) |
Definition at line 19 of file DBFolder.cxx.
References fCachedChannel, fCachedRowNumber, fFolderName, fMaximumTimeout, fSQLitePath, fTag, fTestMode, fURL, fURL2, and fUseSQLite.
|
virtual |
Definition at line 72 of file DBFolder.cxx.
|
inline |
Definition at line 37 of file DBFolder.h.
References CompareDataset(), DumpDataset(), lariov::DBDataset::endTime(), fCache, GetChannelList(), GetColumn(), GetRow(), GetSQLiteData(), and UpdateData().
|
inline |
Definition at line 771 of file DBFolder.cxx.
References lariov::DBDataset::beginTime(), lariov::DBDataset::channels(), col, lariov::DBDataset::colNames(), lariov::DBDataset::colTypes(), lariov::DBDataset::data(), lariov::IOVTimeStamp::DBStamp(), lariov::DBDataset::DBRow::getDoubleData(), lariov::DBDataset::DBRow::getLongData(), lariov::DBDataset::getRow(), lariov::DBDataset::DBRow::getStringData(), lariov::DBDataset::ncols(), lariov::DBDataset::nrows(), and r.
Referenced by CachedEnd(), and UpdateData().
void lariov::DBFolder::DumpDataset | ( | const DBDataset & | data | ) | const |
Definition at line 714 of file DBFolder.cxx.
References lariov::DBDataset::beginTime(), col, lariov::DBDataset::colNames(), lariov::DBDataset::colTypes(), lariov::IOVTimeStamp::DBStamp(), lariov::DBDataset::endTime(), lariov::DBDataset::DBRow::getDoubleData(), lariov::DBDataset::DBRow::getLongData(), lariov::DBDataset::getRow(), lariov::DBDataset::DBRow::getStringData(), ncols, lariov::DBDataset::ncols(), lariov::DBDataset::nrows(), and value.
Referenced by CachedEnd().
|
inline |
int lariov::DBFolder::GetChannelList | ( | std::vector< DBChannelID_t > & | channels | ) | const |
Definition at line 212 of file DBFolder.cxx.
References lariov::DBDataset::channels(), and fCache.
Referenced by CachedEnd().
|
private |
Definition at line 250 of file DBFolder.cxx.
References col, fCache, and lariov::DBDataset::getColNumber().
Referenced by CachedEnd(), and GetNamedChannelData().
int lariov::DBFolder::GetNamedChannelData | ( | DBChannelID_t | channel, |
const std::string & | name, | ||
bool & | data | ||
) |
Definition at line 76 of file DBFolder.cxx.
References col, fCachedRow, GetColumn(), lariov::DBDataset::DBRow::getLongData(), GetRow(), and value.
int lariov::DBFolder::GetNamedChannelData | ( | DBChannelID_t | channel, |
const std::string & | name, | ||
long & | data | ||
) |
Definition at line 97 of file DBFolder.cxx.
References col, fCachedRow, GetColumn(), lariov::DBDataset::DBRow::getLongData(), and GetRow().
int lariov::DBFolder::GetNamedChannelData | ( | DBChannelID_t | channel, |
const std::string & | name, | ||
double & | data | ||
) |
Definition at line 119 of file DBFolder.cxx.
References col, fCachedRow, GetColumn(), lariov::DBDataset::DBRow::getDoubleData(), and GetRow().
int lariov::DBFolder::GetNamedChannelData | ( | DBChannelID_t | channel, |
const std::string & | name, | ||
std::string & | data | ||
) |
Definition at line 141 of file DBFolder.cxx.
References col, fCachedRow, GetColumn(), GetRow(), and lariov::DBDataset::DBRow::getStringData().
|
private |
Definition at line 221 of file DBFolder.cxx.
References fCache, fCachedChannel, fCachedRow, fCachedRowNumber, lariov::DBDataset::DBRow::getLongData(), lariov::DBDataset::getRow(), lariov::DBDataset::getRowNumber(), lariov::DBDataset::DBRow::isValid(), and util::to_string().
Referenced by CachedEnd(), and GetNamedChannelData().
void lariov::DBFolder::GetSQLiteData | ( | int | t, |
DBDataset & | data | ||
) | const |
Definition at line 351 of file DBFolder.cxx.
References col, fFolderName, fSQLitePath, fTag, lariov::IOVTimeStamp::MaxTimeStamp(), ncols, value, and util::values().
Referenced by CachedEnd(), and UpdateData().
|
inlineprivate |
Definition at line 53 of file DBFolder.h.
References lariov::DBDataset::beginTime(), lariov::DBDataset::endTime(), and fCache.
Referenced by UpdateData().
|
inline |
bool lariov::DBFolder::UpdateData | ( | DBTimeStamp_t | raw_time | ) |
Definition at line 267 of file DBFolder.cxx.
References CompareDataset(), lariov::IOVTimeStamp::DBStamp(), lariov::TimeStampDecoder::DecodeTimeStamp(), fCache, fCachedChannel, fCachedRow, fCachedRowNumber, fFolderName, fMaximumTimeout, fSQLitePath, fTag, fTestMode, fURL, fURL2, GetSQLiteData(), IsValid(), and util::to_string().
Referenced by CachedEnd().
|
inline |
|
private |
Definition at line 72 of file DBFolder.h.
Referenced by CachedEnd(), CachedStart(), GetChannelList(), GetColumn(), GetRow(), IsValid(), and UpdateData().
|
private |
Definition at line 77 of file DBFolder.h.
Referenced by DBFolder(), GetRow(), and UpdateData().
|
private |
Definition at line 78 of file DBFolder.h.
Referenced by GetNamedChannelData(), GetRow(), and UpdateData().
|
private |
Definition at line 76 of file DBFolder.h.
Referenced by DBFolder(), GetRow(), and UpdateData().
|
private |
Definition at line 63 of file DBFolder.h.
Referenced by DBFolder(), FolderName(), GetSQLiteData(), and UpdateData().
|
private |
Definition at line 68 of file DBFolder.h.
Referenced by DBFolder(), and UpdateData().
|
private |
Definition at line 67 of file DBFolder.h.
Referenced by DBFolder(), GetSQLiteData(), and UpdateData().
|
private |
Definition at line 64 of file DBFolder.h.
Referenced by DBFolder(), GetSQLiteData(), Tag(), and UpdateData().
|
private |
Definition at line 66 of file DBFolder.h.
Referenced by DBFolder(), and UpdateData().
|
private |
Definition at line 61 of file DBFolder.h.
Referenced by DBFolder(), UpdateData(), and URL().
|
private |
Definition at line 62 of file DBFolder.h.
Referenced by DBFolder(), and UpdateData().
|
private |
Definition at line 65 of file DBFolder.h.
Referenced by DBFolder().