Other api/dybdbi/gdaqrawdatafileinfo

Previous topic

DybDbi.GDaqCalibRunInfo

Next topic

DybDbi.GDbiLogEntry

This Page

Daya Bay Links

Content Skeleton

DybDbi.GDaqRawDataFileInfo

class DybDbi.GDaqRawDataFileInfo(int RunNo, int FileNo, string FileName, string StreamType, string Stream, string FileState, int FileSize, string CheckSum, string TransferState)

Bases: DybDbi.DbiTableRow

docstring

GDaqRawDataFileInfo::GDaqRawDataFileInfo() GDaqRawDataFileInfo::GDaqRawDataFileInfo(const GDaqRawDataFileInfo& from) GDaqRawDataFileInfo::GDaqRawDataFileInfo(int RunNo, int FileNo, string FileName, string StreamType, string Stream, string FileState, int FileSize, string CheckSum, string TransferState)

AssignTimeGate

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

Cache

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

CanL2Cache

bool GDaqRawDataFileInfo::CanL2Cache()

Close

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

Compare

bool GDaqRawDataFileInfo::Compare(const GDaqRawDataFileInfo& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GDaqRawDataFileInfo::CreateTableRow()

CurrentTimeGate

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

DoubleValueForKey

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

Fill

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

FloatValueForKey

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

GetCheckSum

std::string GDaqRawDataFileInfo::GetCheckSum()

GetDatabaseLayout

std::string GDaqRawDataFileInfo::GetDatabaseLayout()

GetDigest

std::string GDaqRawDataFileInfo::GetDigest()

GetFields

std::string GDaqRawDataFileInfo::GetFields()

GetFileName

std::string GDaqRawDataFileInfo::GetFileName()

GetFileNo

int GDaqRawDataFileInfo::GetFileNo()

GetFileSize

int GDaqRawDataFileInfo::GetFileSize()

GetFileState

std::string GDaqRawDataFileInfo::GetFileState()

GetRunNo

int GDaqRawDataFileInfo::GetRunNo()

GetStream

std::string GDaqRawDataFileInfo::GetStream()

GetStreamType

std::string GDaqRawDataFileInfo::GetStreamType()

GetTableDescr

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

GetTableProxy

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

GetTransferState

std::string GDaqRawDataFileInfo::GetTransferState()

GetValues

std::string GDaqRawDataFileInfo::GetValues()

IntValueForKey

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

IsA

TClass* GDaqRawDataFileInfo::IsA()

Rpt

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

Save

void GDaqRawDataFileInfo::Save()

SetCheckSum

void GDaqRawDataFileInfo::SetCheckSum(string CheckSum)

SetFileName

void GDaqRawDataFileInfo::SetFileName(string FileName)

SetFileNo

void GDaqRawDataFileInfo::SetFileNo(int FileNo)

SetFileSize

void GDaqRawDataFileInfo::SetFileSize(int FileSize)

SetFileState

void GDaqRawDataFileInfo::SetFileState(string FileState)

SetRunNo

void GDaqRawDataFileInfo::SetRunNo(int RunNo)

SetStream

void GDaqRawDataFileInfo::SetStream(string Stream)

SetStreamType

void GDaqRawDataFileInfo::SetStreamType(string StreamType)

SetTransferState

void GDaqRawDataFileInfo::SetTransferState(string TransferState)

ShowMembers

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

SpecKeys

static TList* GDaqRawDataFileInfo::SpecKeys()

SpecList

static TList* GDaqRawDataFileInfo::SpecList()

SpecMap

static TMap* GDaqRawDataFileInfo::SpecMap()

Store

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

Wrt

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

aggregateno

int DbiTableRow::GetAggregateNo()

checksum

std::string GDaqRawDataFileInfo::GetCheckSum()

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

digest

std::string GDaqRawDataFileInfo::GetDigest()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GDaqRawDataFileInfo::GetFields()

filename

std::string GDaqRawDataFileInfo::GetFileName()

fileno

int GDaqRawDataFileInfo::GetFileNo()

filesize

int GDaqRawDataFileInfo::GetFileSize()

filestate

std::string GDaqRawDataFileInfo::GetFileState()

name

std::string GDaqRawDataFileInfo::name()

runno

int GDaqRawDataFileInfo::GetRunNo()

stream

std::string GDaqRawDataFileInfo::GetStream()

streamtype

std::string GDaqRawDataFileInfo::GetStreamType()

tabledescr

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

tableproxy

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

transferstate

std::string GDaqRawDataFileInfo::GetTransferState()

values

std::string GDaqRawDataFileInfo::GetValues()