Other api/dybdbi/gdbilogentry

Previous topic

DybDbi.GDaqRawDataFileInfo

Next topic

DybDbi.GDcsAdTemp

This Page

Daya Bay Links

Content Skeleton

DybDbi.GDbiLogEntry

class DybDbi.GDbiLogEntry

Bases: genDbi.DbiLogEntry

GDbiLogEntry::GDbiLogEntry()

Cache

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

Close

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

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GDbiLogEntry::CreateTableRow()

DoubleValueForKey

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

FloatValueForKey

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

GetDigest

std::string GDbiLogEntry::GetDigest()

GetFields

std::string GDbiLogEntry::GetFields()

GetTableProxy

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

GetValues

std::string GDbiLogEntry::GetValues()

IntValueForKey

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

IsA

TClass* GDbiLogEntry::IsA()

Rpt

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

Save

void GDbiLogEntry::Save()

ShowMembers

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

Wrt

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

aggregateno

int DbiLogEntry::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 DbiLogEntry::GetDatabaseLayout()

digest

std::string GDbiLogEntry::GetDigest()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GDbiLogEntry::GetFields()

hostname

std::string& DbiLogEntry::GetHostName()

lognumseqno

int DbiLogEntry::GetLogNumSeqNo()

logseqnomax

int DbiLogEntry::GetLogSeqNoMax()

logseqnomin

int DbiLogEntry::GetLogSeqNoMin()

logtablename

std::string& DbiLogEntry::GetLogTableName()

name

std::string GDbiLogEntry::name()

processname

std::string& DbiLogEntry::GetProcessName()

reason

std::string& DbiLogEntry::GetReason()

servername

std::string& DbiLogEntry::GetServerName()

simmask

int DbiLogEntry::GetSimMask()

sitemask

int DbiLogEntry::GetSiteMask()

subsite

int DbiLogEntry::GetSubSite()

tableproxy

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

task

int DbiLogEntry::GetTask()

updatetime

TimeStamp DbiLogEntry::GetUpdateTime()

username

std::string& DbiLogEntry::GetUserName()

values

std::string GDbiLogEntry::GetValues()