Other api/dybdbi/gsimpmtspec

Previous topic

DybDbi.GPhysAd

Next topic

DybDbi.GCalibPmtSpec

This Page

Daya Bay Links

Content Skeleton

DybDbi.GSimPmtSpec

class DybDbi.GSimPmtSpec(DayaBay::DetectorSensor PmtId, string Describ, double Gain, double SigmaGain, double TimeOffset, double TimeSpread, double Efficiency, double PrePulseProb, double AfterPulseProb, double DarkRate)

Bases: DybDbi.DbiTableRow

docstring

GSimPmtSpec::GSimPmtSpec() GSimPmtSpec::GSimPmtSpec(const GSimPmtSpec& from) GSimPmtSpec::GSimPmtSpec(DayaBay::DetectorSensor PmtId, string Describ, double Gain, double SigmaGain, double TimeOffset, double TimeSpread, double Efficiency, double PrePulseProb, double AfterPulseProb, double DarkRate)

AssignTimeGate

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

Cache

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

CanFixOrdering

bool GSimPmtSpec::CanFixOrdering()

CanL2Cache

bool GSimPmtSpec::CanL2Cache()

Close

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

Compare

bool GSimPmtSpec::Compare(const GSimPmtSpec& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GSimPmtSpec::CreateTableRow()

CurrentTimeGate

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

DoubleValueForKey

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

Fill

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

FloatValueForKey

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

GetAfterPulseProb

double GSimPmtSpec::GetAfterPulseProb()

GetDarkRate

double GSimPmtSpec::GetDarkRate()

GetDatabaseLayout

std::string GSimPmtSpec::GetDatabaseLayout()

GetDescrib

std::string GSimPmtSpec::GetDescrib()

GetDigest

std::string GSimPmtSpec::GetDigest()

GetEfficiency

double GSimPmtSpec::GetEfficiency()

GetFields

std::string GSimPmtSpec::GetFields()

GetGain

double GSimPmtSpec::GetGain()

GetPmtId

DayaBay::DetectorSensor GSimPmtSpec::GetPmtId()

GetPrePulseProb

double GSimPmtSpec::GetPrePulseProb()

GetSigmaGain

double GSimPmtSpec::GetSigmaGain()

GetTableDescr

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

GetTableProxy

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

GetTimeOffset

double GSimPmtSpec::GetTimeOffset()

GetTimeSpread

double GSimPmtSpec::GetTimeSpread()

GetValues

std::string GSimPmtSpec::GetValues()

IntValueForKey

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

IsA

TClass* GSimPmtSpec::IsA()

Rpt

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

Save

void GSimPmtSpec::Save()

SetAfterPulseProb

void GSimPmtSpec::SetAfterPulseProb(double AfterPulseProb)

SetDarkRate

void GSimPmtSpec::SetDarkRate(double DarkRate)

SetDescrib

void GSimPmtSpec::SetDescrib(string Describ)

SetEfficiency

void GSimPmtSpec::SetEfficiency(double Efficiency)

SetGain

void GSimPmtSpec::SetGain(double Gain)

SetPmtId

void GSimPmtSpec::SetPmtId(DayaBay::DetectorSensor PmtId)

SetPrePulseProb

void GSimPmtSpec::SetPrePulseProb(double PrePulseProb)

SetSigmaGain

void GSimPmtSpec::SetSigmaGain(double SigmaGain)

SetTimeOffset

void GSimPmtSpec::SetTimeOffset(double TimeOffset)

SetTimeSpread

void GSimPmtSpec::SetTimeSpread(double TimeSpread)

ShowMembers

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

SpecKeys

static TList* GSimPmtSpec::SpecKeys()

SpecList

static TList* GSimPmtSpec::SpecList()

SpecMap

static TMap* GSimPmtSpec::SpecMap()

Store

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

Wrt

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

afterpulseprob

double GSimPmtSpec::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 GSimPmtSpec::GetDarkRate()

databaselayout

std::string GSimPmtSpec::GetDatabaseLayout()

describ

std::string GSimPmtSpec::GetDescrib()

digest

std::string GSimPmtSpec::GetDigest()

efficiency

double GSimPmtSpec::GetEfficiency()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GSimPmtSpec::GetFields()

gain

double GSimPmtSpec::GetGain()

name

std::string GSimPmtSpec::name()

pmtid

DayaBay::DetectorSensor GSimPmtSpec::GetPmtId()

prepulseprob

double GSimPmtSpec::GetPrePulseProb()

sigmagain

double GSimPmtSpec::GetSigmaGain()

tabledescr

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

tableproxy

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

timeoffset

double GSimPmtSpec::GetTimeOffset()

timespread

double GSimPmtSpec::GetTimeSpread()

values

std::string GSimPmtSpec::GetValues()