Other api/dybdbi/gcalibpmtspec

Previous topic

DybDbi.GSimPmtSpec

Next topic

DybDbi.GCalibFeeSpec

This Page

Daya Bay Links

Content Skeleton

DybDbi.GCalibPmtSpec

class DybDbi.GCalibPmtSpec(int PmtId, string Describ, int Status, double SpeHigh, double SigmaSpeHigh, double SpeLow, double TimeOffset, double TimeSpread, double Efficiency, double PrePulseProb, double AfterPulseProb, double DarkRate)

Bases: DybDbi.DbiTableRow

docstring

GCalibPmtSpec::GCalibPmtSpec() GCalibPmtSpec::GCalibPmtSpec(const GCalibPmtSpec& from) GCalibPmtSpec::GCalibPmtSpec(int PmtId, string Describ, int Status, double SpeHigh, double SigmaSpeHigh, double SpeLow, double TimeOffset, double TimeSpread, double Efficiency, double PrePulseProb, double AfterPulseProb, double DarkRate)

AssignTimeGate

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

Cache

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

CanL2Cache

bool GCalibPmtSpec::CanL2Cache()

Close

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

Compare

bool GCalibPmtSpec::Compare(const GCalibPmtSpec& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GCalibPmtSpec::CreateTableRow()

CurrentTimeGate

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

DoubleValueForKey

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

Fill

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

FloatValueForKey

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

GetAfterPulseProb

double GCalibPmtSpec::GetAfterPulseProb()

GetDarkRate

double GCalibPmtSpec::GetDarkRate()

GetDatabaseLayout

std::string GCalibPmtSpec::GetDatabaseLayout()

GetDescrib

std::string GCalibPmtSpec::GetDescrib()

GetDigest

std::string GCalibPmtSpec::GetDigest()

GetEfficiency

double GCalibPmtSpec::GetEfficiency()

GetFields

std::string GCalibPmtSpec::GetFields()

GetPmtId

int GCalibPmtSpec::GetPmtId()

GetPrePulseProb

double GCalibPmtSpec::GetPrePulseProb()

GetSigmaSpeHigh

double GCalibPmtSpec::GetSigmaSpeHigh()

GetSpeHigh

double GCalibPmtSpec::GetSpeHigh()

GetSpeLow

double GCalibPmtSpec::GetSpeLow()

GetStatus

int GCalibPmtSpec::GetStatus()

GetTableDescr

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

GetTableProxy

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

GetTimeOffset

double GCalibPmtSpec::GetTimeOffset()

GetTimeSpread

double GCalibPmtSpec::GetTimeSpread()

GetValues

std::string GCalibPmtSpec::GetValues()

IntValueForKey

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

IsA

TClass* GCalibPmtSpec::IsA()

Rpt

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

Save

void GCalibPmtSpec::Save()

SetAfterPulseProb

void GCalibPmtSpec::SetAfterPulseProb(double AfterPulseProb)

SetDarkRate

void GCalibPmtSpec::SetDarkRate(double DarkRate)

SetDescrib

void GCalibPmtSpec::SetDescrib(string Describ)

SetEfficiency

void GCalibPmtSpec::SetEfficiency(double Efficiency)

SetPmtId

void GCalibPmtSpec::SetPmtId(int PmtId)

SetPrePulseProb

void GCalibPmtSpec::SetPrePulseProb(double PrePulseProb)

SetSigmaSpeHigh

void GCalibPmtSpec::SetSigmaSpeHigh(double SigmaSpeHigh)

SetSpeHigh

void GCalibPmtSpec::SetSpeHigh(double SpeHigh)

SetSpeLow

void GCalibPmtSpec::SetSpeLow(double SpeLow)

SetStatus

void GCalibPmtSpec::SetStatus(int Status)

SetTimeOffset

void GCalibPmtSpec::SetTimeOffset(double TimeOffset)

SetTimeSpread

void GCalibPmtSpec::SetTimeSpread(double TimeSpread)

ShowMembers

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

SpecKeys

static TList* GCalibPmtSpec::SpecKeys()

SpecList

static TList* GCalibPmtSpec::SpecList()

SpecMap

static TMap* GCalibPmtSpec::SpecMap()

Store

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

Wrt

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

afterpulseprob

double GCalibPmtSpec::GetAfterPulseProb()

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
darkrate

double GCalibPmtSpec::GetDarkRate()

databaselayout

std::string GCalibPmtSpec::GetDatabaseLayout()

describ

std::string GCalibPmtSpec::GetDescrib()

digest

std::string GCalibPmtSpec::GetDigest()

efficiency

double GCalibPmtSpec::GetEfficiency()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GCalibPmtSpec::GetFields()

name

std::string GCalibPmtSpec::name()

pmtid

int GCalibPmtSpec::GetPmtId()

prepulseprob

double GCalibPmtSpec::GetPrePulseProb()

sigmaspehigh

double GCalibPmtSpec::GetSigmaSpeHigh()

spehigh

double GCalibPmtSpec::GetSpeHigh()

spelow

double GCalibPmtSpec::GetSpeLow()

status

int GCalibPmtSpec::GetStatus()

tabledescr

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

tableproxy

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

timeoffset

double GCalibPmtSpec::GetTimeOffset()

timespread

double GCalibPmtSpec::GetTimeSpread()

values

std::string GCalibPmtSpec::GetValues()