Other api/dybdbi/gdaqcalibruninfo

Previous topic

DybDbi.GDaqRunInfo

Next topic

DybDbi.GDaqRawDataFileInfo

This Page

Daya Bay Links

Content Skeleton

DybDbi.GDaqCalibRunInfo

class DybDbi.GDaqCalibRunInfo(const GDaqCalibRunInfo& from)

Bases: DybDbi.DbiTableRow

Calibration run information recorded in DAQ database from IS/ACU This information can also be accessed from raw data file recorded as

References:

GDaqCalibRunInfo::GDaqCalibRunInfo() GDaqCalibRunInfo::GDaqCalibRunInfo(const GDaqCalibRunInfo& from)

AssignTimeGate

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

Cache

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

CanL2Cache

bool GDaqCalibRunInfo::CanL2Cache()

Close

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

Compare

bool GDaqCalibRunInfo::Compare(const GDaqCalibRunInfo& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GDaqCalibRunInfo::CreateTableRow()

CurrentTimeGate

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

DoubleValueForKey

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

Fill

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

FloatValueForKey

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

GetAdNo

int GDaqCalibRunInfo::GetAdNo()

GetDatabaseLayout

std::string GDaqCalibRunInfo::GetDatabaseLayout()

GetDetectorId

int GDaqCalibRunInfo::GetDetectorId()

GetDigest

std::string GDaqCalibRunInfo::GetDigest()

GetDuration

int GDaqCalibRunInfo::GetDuration()

GetFields

std::string GDaqCalibRunInfo::GetFields()

GetHomeA

int GDaqCalibRunInfo::GetHomeA()

GetHomeB

int GDaqCalibRunInfo::GetHomeB()

GetHomeC

int GDaqCalibRunInfo::GetHomeC()

GetLedFreq

int GDaqCalibRunInfo::GetLedFreq()

GetLedNumber1

int GDaqCalibRunInfo::GetLedNumber1()

GetLedNumber2

int GDaqCalibRunInfo::GetLedNumber2()

GetLedPulseSep

int GDaqCalibRunInfo::GetLedPulseSep()

GetLedVoltage1

int GDaqCalibRunInfo::GetLedVoltage1()

GetLedVoltage2

int GDaqCalibRunInfo::GetLedVoltage2()

GetLtbMode

int GDaqCalibRunInfo::GetLtbMode()

GetRunNo

int GDaqCalibRunInfo::GetRunNo()

GetSourceIdA

int GDaqCalibRunInfo::GetSourceIdA()

GetSourceIdB

int GDaqCalibRunInfo::GetSourceIdB()

GetSourceIdC

int GDaqCalibRunInfo::GetSourceIdC()

GetTableDescr

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

GetTableProxy

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

GetValues

std::string GDaqCalibRunInfo::GetValues()

GetZPositionA

int GDaqCalibRunInfo::GetZPositionA()

GetZPositionB

int GDaqCalibRunInfo::GetZPositionB()

GetZPositionC

int GDaqCalibRunInfo::GetZPositionC()

IntValueForKey

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

IsA

TClass* GDaqCalibRunInfo::IsA()

Rpt

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

Save

void GDaqCalibRunInfo::Save()

SetAdNo

void GDaqCalibRunInfo::SetAdNo(int AdNo)

SetDetectorId

void GDaqCalibRunInfo::SetDetectorId(int DetectorId)

SetDuration

void GDaqCalibRunInfo::SetDuration(int Duration)

SetHomeA

void GDaqCalibRunInfo::SetHomeA(int HomeA)

SetHomeB

void GDaqCalibRunInfo::SetHomeB(int HomeB)

SetHomeC

void GDaqCalibRunInfo::SetHomeC(int HomeC)

SetLedFreq

void GDaqCalibRunInfo::SetLedFreq(int LedFreq)

SetLedNumber1

void GDaqCalibRunInfo::SetLedNumber1(int LedNumber1)

SetLedNumber2

void GDaqCalibRunInfo::SetLedNumber2(int LedNumber2)

SetLedPulseSep

void GDaqCalibRunInfo::SetLedPulseSep(int LedPulseSep)

SetLedVoltage1

void GDaqCalibRunInfo::SetLedVoltage1(int LedVoltage1)

SetLedVoltage2

void GDaqCalibRunInfo::SetLedVoltage2(int LedVoltage2)

SetLtbMode

void GDaqCalibRunInfo::SetLtbMode(int LtbMode)

SetRunNo

void GDaqCalibRunInfo::SetRunNo(int RunNo)

SetSourceIdA

void GDaqCalibRunInfo::SetSourceIdA(int SourceIdA)

SetSourceIdB

void GDaqCalibRunInfo::SetSourceIdB(int SourceIdB)

SetSourceIdC

void GDaqCalibRunInfo::SetSourceIdC(int SourceIdC)

SetZPositionA

void GDaqCalibRunInfo::SetZPositionA(int ZPositionA)

SetZPositionB

void GDaqCalibRunInfo::SetZPositionB(int ZPositionB)

SetZPositionC

void GDaqCalibRunInfo::SetZPositionC(int ZPositionC)

ShowMembers

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

SpecKeys

static TList* GDaqCalibRunInfo::SpecKeys()

SpecList

static TList* GDaqCalibRunInfo::SpecList()

SpecMap

static TMap* GDaqCalibRunInfo::SpecMap()

Store

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

Wrt

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

adno

int GDaqCalibRunInfo::GetAdNo()

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

detectorid

int GDaqCalibRunInfo::GetDetectorId()

digest

std::string GDaqCalibRunInfo::GetDigest()

duration

int GDaqCalibRunInfo::GetDuration()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GDaqCalibRunInfo::GetFields()

homea

int GDaqCalibRunInfo::GetHomeA()

homeb

int GDaqCalibRunInfo::GetHomeB()

homec

int GDaqCalibRunInfo::GetHomeC()

ledfreq

int GDaqCalibRunInfo::GetLedFreq()

lednumber1

int GDaqCalibRunInfo::GetLedNumber1()

lednumber2

int GDaqCalibRunInfo::GetLedNumber2()

ledpulsesep

int GDaqCalibRunInfo::GetLedPulseSep()

ledvoltage1

int GDaqCalibRunInfo::GetLedVoltage1()

ledvoltage2

int GDaqCalibRunInfo::GetLedVoltage2()

ltbmode

int GDaqCalibRunInfo::GetLtbMode()

name

std::string GDaqCalibRunInfo::name()

runno

int GDaqCalibRunInfo::GetRunNo()

sourceida

int GDaqCalibRunInfo::GetSourceIdA()

sourceidb

int GDaqCalibRunInfo::GetSourceIdB()

sourceidc

int GDaqCalibRunInfo::GetSourceIdC()

tabledescr

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

tableproxy

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

values

std::string GDaqCalibRunInfo::GetValues()

zpositiona

int GDaqCalibRunInfo::GetZPositionA()

zpositionb

int GDaqCalibRunInfo::GetZPositionB()

zpositionc

int GDaqCalibRunInfo::GetZPositionC()