Other api/dybdbi/gdcsadtemp

Previous topic

DybDbi.GDbiLogEntry

Next topic

DybDbi.GDcsPmtHv

This Page

Daya Bay Links

Content Skeleton

DybDbi.GDcsAdTemp

class DybDbi.GDcsAdTemp(float Temp1, float Temp2, float Temp3, float Temp4)

Bases: DybDbi.DbiTableRow

AD Temperature monitoring table:

mysql> describe DcsAdTemp  ;
+-------------+---------+------+-----+---------+----------------+
| Field       | Type    | Null | Key | Default | Extra          |
+-------------+---------+------+-----+---------+----------------+
| SEQNO       | int(11) | NO   | PRI |         |                | 
| ROW_COUNTER | int(11) | NO   | PRI | NULL    | auto_increment | 
| Temp_PT1    | float   | YES  |     | NULL    |                | 
| Temp_PT2    | float   | YES  |     | NULL    |                | 
| Temp_PT3    | float   | YES  |     | NULL    |                | 
| Temp_PT4    | float   | YES  |     | NULL    |                | 
+-------------+---------+------+-----+---------+----------------+
6 rows in set (0.08 sec)

DBI read must explicitly give: Site, SubSite/DetectoId DBI write must explicitly give: SiteMask, SubSite

GDcsAdTemp::GDcsAdTemp() GDcsAdTemp::GDcsAdTemp(const GDcsAdTemp& from) GDcsAdTemp::GDcsAdTemp(float Temp1, float Temp2, float Temp3, float Temp4)

AssignTimeGate

static void GDcsAdTemp::AssignTimeGate(Int_t seconds, char* alternateName = 0)

Cache

static DbiCache* GDcsAdTemp::Cache(char* alternateName = 0)

CanL2Cache

bool GDcsAdTemp::CanL2Cache()

Close

static void GDcsAdTemp::Close(char* filepath = 0l)

Compare

bool GDcsAdTemp::Compare(const GDcsAdTemp& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

i = GTableName.Create( AttributeName=100. , ... ) 
CreateTableRow

DbiTableRow* GDcsAdTemp::CreateTableRow()

CurrentTimeGate

static int GDcsAdTemp::CurrentTimeGate(char* alternateName = 0)

DoubleValueForKey

double GDcsAdTemp::DoubleValueForKey(char* key, double defval = -0x00000000000000001)

Fill

void GDcsAdTemp::Fill(DbiResultSet& rs, DbiValidityRec* vrec)

FloatValueForKey

float GDcsAdTemp::FloatValueForKey(char* key, float defval = -0x00000000000000001)

GetDatabaseLayout

std::string GDcsAdTemp::GetDatabaseLayout()

GetDigest

std::string GDcsAdTemp::GetDigest()

GetFields

std::string GDcsAdTemp::GetFields()

GetTableDescr

static std::string GDcsAdTemp::GetTableDescr(char* alternateName = 0)

GetTableProxy

static DbiTableProxy& GDcsAdTemp::GetTableProxy(char* alternateName = 0)

GetTemp1

float GDcsAdTemp::GetTemp1()

GetTemp2

float GDcsAdTemp::GetTemp2()

GetTemp3

float GDcsAdTemp::GetTemp3()

GetTemp4

float GDcsAdTemp::GetTemp4()

GetValues

std::string GDcsAdTemp::GetValues()

IntValueForKey

int GDcsAdTemp::IntValueForKey(char* key, int defval = -0x00000000000000001)

IsA

TClass* GDcsAdTemp::IsA()

Rpt

static DbiRpt<GDcsAdTemp>* GDcsAdTemp::Rpt(char* ctx = GDcsAdTemp::MetaRctx)

Save

void GDcsAdTemp::Save()

SetTemp1

void GDcsAdTemp::SetTemp1(float Temp1)

SetTemp2

void GDcsAdTemp::SetTemp2(float Temp2)

SetTemp3

void GDcsAdTemp::SetTemp3(float Temp3)

SetTemp4

void GDcsAdTemp::SetTemp4(float Temp4)

ShowMembers

void GDcsAdTemp::ShowMembers(TMemberInspector&, char*)

SpecKeys

static TList* GDcsAdTemp::SpecKeys()

SpecList

static TList* GDcsAdTemp::SpecList()

SpecMap

static TMap* GDcsAdTemp::SpecMap()

Store

void GDcsAdTemp::Store(DbiOutRowStream& ors, DbiValidityRec* vrec)

Wrt

static DbiWrt<GDcsAdTemp>* GDcsAdTemp::Wrt(char* ctx = GDcsAdTemp::MetaWctx)

aggregateno

int DbiTableRow::GetAggregateNo()

classmethod csv_check(path, **kwargs)

Check the validity of CSV file and correspondence with CSV fields and DBI attributes:

from DybDbi import GCalibPmtSpec
GCalibPmtSpec.csv_check( "$DBWRITERROOT/share/DYB_%s_AD1.txt" % "SAB", afterPulse="AfterPulseProb", sigmaSpe="SigmaSpeHigh", prePulse="PrePulseProb", description="Describ" ) 

Manual mapping is required if field names do not match DBI attribute names (primitive case insensitive auto mapping is applied to avoid the need for tedious full mapping).

classmethod csv_compare(path, **kwargs)

compare entries in CSV file with those found in DB

classmethod csv_export(path, **kwargs)

Export the result of a default context DBI query as a CSV file

Parameters:
  • path – path of output file
  • fieldnames – optionally specifiy the field order with a list of fieldnames

Note

make the output more human readable with regular column widths

classmethod csv_import(path, **kwargs)

Import CSV file into Database Using default writer context for now

ContextRange::ContextRange(const int siteMask, const int simMask, const TimeStamp& tstart, const TimeStamp& tend)

ql> select * from CalibPmtSpecVld ; +——-+———————+———————+———-+———+———+——+————-+———————+———————+ | SEQNO | TIMESTART | TIMEEND | SITEMASK | SIMMASK | SUBSITE | TASK | AGGREGATENO | VERSIONDATE | INSERTDATE | +——-+———————+———————+———-+———+———+——+————-+———————+———————+ | 26 | 2011-01-22 08:15:17 | 2020-12-30 16:00:00 | 127 | 1 | 0 | 0 | -1 | 2011-01-22 08:15:17 | 2011-02-25 08:10:15 | | 18 | 2010-06-21 07:49:24 | 2038-01-19 03:14:07 | 32 | 1 | 1 | 0 | -1 | 2010-06-21 15:50:24 | 2010-07-19 12:49:29 |

HMM... Better to make this a classmethod on the writer rather than the Row class... OR do not shrinkwrap .. just leave as example
databaselayout

std::string GDcsAdTemp::GetDatabaseLayout()

digest

std::string GDcsAdTemp::GetDigest()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GDcsAdTemp::GetFields()

name

std::string GDcsAdTemp::name()

tabledescr

static std::string GDcsAdTemp::GetTableDescr(char* alternateName = 0)

tableproxy

static DbiTableProxy& GDcsAdTemp::GetTableProxy(char* alternateName = 0)

temp1

float GDcsAdTemp::GetTemp1()

temp2

float GDcsAdTemp::GetTemp2()

temp3

float GDcsAdTemp::GetTemp3()

temp4

float GDcsAdTemp::GetTemp4()

values

std::string GDcsAdTemp::GetValues()