|
| | DBLink (DB *db, std::string tblname, std::string index, int currentRun=1) |
| |
| | ~DBLink () |
| |
| std::string | GetName () const |
| |
| std::string | GetIndex () const |
| |
| void | SetCurrentRun (int runNumber) |
| |
| int | GetI (const std::string &name) |
| |
| double | GetD (const std::string &name) |
| |
| std::string | GetS (const std::string &name) |
| |
| bool | GetZ (const std::string &name) |
| |
| std::vector< int > | GetIArray (const std::string &name) |
| |
| std::vector< float > | GetFArrayFromD (const std::string &name) |
| |
|
std::vector< float > | DArrayToFArray (const std::vector< double > &input) |
| |
| std::vector< double > | GetDArray (const std::string &name) |
| |
| std::vector< std::string > | GetSArray (const std::string &name) |
| |
| std::vector< bool > | GetZArray (const std::string &name) |
| |
| json::Value | GetJSON (const std::string &name) |
| |
| template<class T > |
| T | Get (const std::string &fieldname) |
| |
|
void | Unlink () |
| |
◆ DBLink()
| DBLink::DBLink |
( |
DB * |
db, |
|
|
std::string |
tblname, |
|
|
std::string |
index, |
|
|
int |
currentRun = 1 |
|
) |
| |
Create a new link to a table.
- Parameters
-
| db | Pointer to database which created this link. When the link is destroyed, the database will be notified. |
| tblname | Name of table |
| index | Index of table |
| currentRun | Run number to use for validity range checking |
◆ ~DBLink()
Destroy link.
When this object is destroyed, it will call DB::RemoveLink() on the database which created it.
◆ Get()
template<class T >
| T DBLink::Get |
( |
const std::string & |
fieldname | ) |
|
Get the value of a field from the table, including plane precedence rules.
- Parameters
-
| T | C++ data type for field |
| fieldname | Name of field |
◆ GetD()
| double DBLink::GetD |
( |
const std::string & |
name | ) |
|
Retrieve double field.
- Exceptions
-
◆ GetDArray()
| std::vector< double > DBLink::GetDArray |
( |
const std::string & |
name | ) |
|
Retrieve double array field.
- Exceptions
-
◆ GetFArrayFromD()
| std::vector< float > DBLink::GetFArrayFromD |
( |
const std::string & |
name | ) |
|
Retrieve float array field.
- Exceptions
-
◆ GetI()
| int DBLink::GetI |
( |
const std::string & |
name | ) |
|
Retrieve integer field.
- Exceptions
-
◆ GetIArray()
| std::vector< int > DBLink::GetIArray |
( |
const std::string & |
name | ) |
|
Retrieve integer array field.
- Exceptions
-
◆ GetIndex()
| std::string RAT::DBLink::GetIndex |
( |
| ) |
const |
|
inline |
Get index of table this link points to.
◆ GetJSON()
| json::Value DBLink::GetJSON |
( |
const std::string & |
name | ) |
|
Retrieve raw JSON value.
- Exceptions
-
◆ GetName()
| std::string RAT::DBLink::GetName |
( |
| ) |
const |
|
inline |
Get name of table this link points to.
◆ GetS()
| std::string DBLink::GetS |
( |
const std::string & |
name | ) |
|
Retrieve string field.
- Exceptions
-
◆ GetSArray()
| std::vector< std::string > DBLink::GetSArray |
( |
const std::string & |
name | ) |
|
Retrieve string array field.
- Exceptions
-
◆ GetZ()
| bool DBLink::GetZ |
( |
const std::string & |
name | ) |
|
Retrieve bool field.
- Exceptions
-
◆ GetZArray()
| std::vector< bool > DBLink::GetZArray |
( |
const std::string & |
name | ) |
|
Retrieve bool array field.
- Exceptions
-
◆ SetCurrentRun()
| void RAT::DBLink::SetCurrentRun |
( |
int |
runNumber | ) |
|
|
inline |
Set the current run number for fetching run-specific tables from the server
◆ currentRun
| int RAT::DBLink::currentRun |
|
protected |
◆ db
Pointer to DB which created this link.
◆ index
| std::string RAT::DBLink::index |
|
protected |
Index of table this link refers to
◆ tblname
| std::string RAT::DBLink::tblname |
|
protected |
Name of table this link refers to.
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/db/include/RAT/DBLink.hh
- /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/db/src/DBLink.cc