Other api/dybdbi/gdaqruninfo

Previous topic

DybDbi.GFeeCableMap

Next topic

DybDbi.GDaqCalibRunInfo

This Page

Daya Bay Links

Content Skeleton

DybDbi.GDaqRunInfo

class DybDbi.GDaqRunInfo(int RunNo, int TriggerType, string RunType, int DetectorMask, string PartitionName, int SchemaVersion, int DataVersion, int BaseVersion)

Bases: DybDbi.DbiTableRow

docstring

GDaqRunInfo::GDaqRunInfo() GDaqRunInfo::GDaqRunInfo(const GDaqRunInfo& from) GDaqRunInfo::GDaqRunInfo(int RunNo, int TriggerType, string RunType, int DetectorMask, string PartitionName, int SchemaVersion, int DataVersion, int BaseVersion)

AssignTimeGate

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

Cache

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

CanL2Cache

bool GDaqRunInfo::CanL2Cache()

Close

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

Compare

bool GDaqRunInfo::Compare(const GDaqRunInfo& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GDaqRunInfo::CreateTableRow()

CurrentTimeGate

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

DoubleValueForKey

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

Fill

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

FloatValueForKey

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

GetBaseVersion

int GDaqRunInfo::GetBaseVersion()

GetDataVersion

int GDaqRunInfo::GetDataVersion()

GetDatabaseLayout

std::string GDaqRunInfo::GetDatabaseLayout()

GetDetectorMask

int GDaqRunInfo::GetDetectorMask()

GetDigest

std::string GDaqRunInfo::GetDigest()

GetFields

std::string GDaqRunInfo::GetFields()

GetPartitionName

std::string GDaqRunInfo::GetPartitionName()

GetRunNo

int GDaqRunInfo::GetRunNo()

GetRunType

std::string GDaqRunInfo::GetRunType()

GetSchemaVersion

int GDaqRunInfo::GetSchemaVersion()

GetTableDescr

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

GetTableProxy

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

GetTriggerType

int GDaqRunInfo::GetTriggerType()

GetValues

std::string GDaqRunInfo::GetValues()

IntValueForKey

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

IsA

TClass* GDaqRunInfo::IsA()

Rpt

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

Save

void GDaqRunInfo::Save()

SetBaseVersion

void GDaqRunInfo::SetBaseVersion(int BaseVersion)

SetDataVersion

void GDaqRunInfo::SetDataVersion(int DataVersion)

SetDetectorMask

void GDaqRunInfo::SetDetectorMask(int DetectorMask)

SetPartitionName

void GDaqRunInfo::SetPartitionName(string PartitionName)

SetRunNo

void GDaqRunInfo::SetRunNo(int RunNo)

SetRunType

void GDaqRunInfo::SetRunType(string RunType)

SetSchemaVersion

void GDaqRunInfo::SetSchemaVersion(int SchemaVersion)

SetTriggerType

void GDaqRunInfo::SetTriggerType(int TriggerType)

ShowMembers

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

SpecKeys

static TList* GDaqRunInfo::SpecKeys()

SpecList

static TList* GDaqRunInfo::SpecList()

SpecMap

static TMap* GDaqRunInfo::SpecMap()

Store

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

Wrt

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

aggregateno

int DbiTableRow::GetAggregateNo()

baseversion

int GDaqRunInfo::GetBaseVersion()

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

dataversion

int GDaqRunInfo::GetDataVersion()

detectormask

int GDaqRunInfo::GetDetectorMask()

digest

std::string GDaqRunInfo::GetDigest()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GDaqRunInfo::GetFields()

name

std::string GDaqRunInfo::name()

partitionname

std::string GDaqRunInfo::GetPartitionName()

runno

int GDaqRunInfo::GetRunNo()

runtype

std::string GDaqRunInfo::GetRunType()

schemaversion

int GDaqRunInfo::GetSchemaVersion()

tabledescr

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

tableproxy

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

triggertype

int GDaqRunInfo::GetTriggerType()

values

std::string GDaqRunInfo::GetValues()