Other api/dybdbi/gcalibfeespec

Previous topic

DybDbi.GCalibPmtSpec

Next topic

DybDbi.GFeeCableMap

This Page

Daya Bay Links

Content Skeleton

DybDbi.GCalibFeeSpec

class DybDbi.GCalibFeeSpec(DayaBay::FeeChannelId ChannelId, int Status, double AdcPedestalHigh, double AdcPedestalHighSigma, double AdcPedestalLow, double AdcPedestalLowSigma, double AdcThresholdHigh, double AdcThresholdLow)

Bases: DybDbi.DbiTableRow

docstring

GCalibFeeSpec::GCalibFeeSpec() GCalibFeeSpec::GCalibFeeSpec(const GCalibFeeSpec& from) GCalibFeeSpec::GCalibFeeSpec(DayaBay::FeeChannelId ChannelId, int Status, double AdcPedestalHigh, double AdcPedestalHighSigma, double AdcPedestalLow, double AdcPedestalLowSigma, double AdcThresholdHigh, double AdcThresholdLow)

AssignTimeGate

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

Cache

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

CanL2Cache

bool GCalibFeeSpec::CanL2Cache()

Close

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

Compare

bool GCalibFeeSpec::Compare(const GCalibFeeSpec& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GCalibFeeSpec::CreateTableRow()

CurrentTimeGate

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

DoubleValueForKey

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

Fill

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

FloatValueForKey

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

GetAdcPedestalHigh

double GCalibFeeSpec::GetAdcPedestalHigh()

GetAdcPedestalHighSigma

double GCalibFeeSpec::GetAdcPedestalHighSigma()

GetAdcPedestalLow

double GCalibFeeSpec::GetAdcPedestalLow()

GetAdcPedestalLowSigma

double GCalibFeeSpec::GetAdcPedestalLowSigma()

GetAdcThresholdHigh

double GCalibFeeSpec::GetAdcThresholdHigh()

GetAdcThresholdLow

double GCalibFeeSpec::GetAdcThresholdLow()

GetChannelId

DayaBay::FeeChannelId GCalibFeeSpec::GetChannelId()

GetDatabaseLayout

std::string GCalibFeeSpec::GetDatabaseLayout()

GetDigest

std::string GCalibFeeSpec::GetDigest()

GetFields

std::string GCalibFeeSpec::GetFields()

GetStatus

int GCalibFeeSpec::GetStatus()

GetTableDescr

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

GetTableProxy

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

GetValues

std::string GCalibFeeSpec::GetValues()

IntValueForKey

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

IsA

TClass* GCalibFeeSpec::IsA()

Rpt

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

Save

void GCalibFeeSpec::Save()

SetAdcPedestalHigh

void GCalibFeeSpec::SetAdcPedestalHigh(double AdcPedestalHigh)

SetAdcPedestalHighSigma

void GCalibFeeSpec::SetAdcPedestalHighSigma(double AdcPedestalHighSigma)

SetAdcPedestalLow

void GCalibFeeSpec::SetAdcPedestalLow(double AdcPedestalLow)

SetAdcPedestalLowSigma

void GCalibFeeSpec::SetAdcPedestalLowSigma(double AdcPedestalLowSigma)

SetAdcThresholdHigh

void GCalibFeeSpec::SetAdcThresholdHigh(double AdcThresholdHigh)

SetAdcThresholdLow

void GCalibFeeSpec::SetAdcThresholdLow(double AdcThresholdLow)

SetChannelId

void GCalibFeeSpec::SetChannelId(DayaBay::FeeChannelId ChannelId)

SetStatus

void GCalibFeeSpec::SetStatus(int Status)

ShowMembers

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

SpecKeys

static TList* GCalibFeeSpec::SpecKeys()

SpecList

static TList* GCalibFeeSpec::SpecList()

SpecMap

static TMap* GCalibFeeSpec::SpecMap()

Store

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

Wrt

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

adcpedestalhigh

double GCalibFeeSpec::GetAdcPedestalHigh()

adcpedestalhighsigma

double GCalibFeeSpec::GetAdcPedestalHighSigma()

adcpedestallow

double GCalibFeeSpec::GetAdcPedestalLow()

adcpedestallowsigma

double GCalibFeeSpec::GetAdcPedestalLowSigma()

adcthresholdhigh

double GCalibFeeSpec::GetAdcThresholdHigh()

adcthresholdlow

double GCalibFeeSpec::GetAdcThresholdLow()

aggregateno

int DbiTableRow::GetAggregateNo()

channelid

DayaBay::FeeChannelId GCalibFeeSpec::GetChannelId()

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

digest

std::string GCalibFeeSpec::GetDigest()

extracondition

std::string DbiTableRow::GetExtraCondition()

fields

std::string GCalibFeeSpec::GetFields()

name

std::string GCalibFeeSpec::name()

status

int GCalibFeeSpec::GetStatus()

tabledescr

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

tableproxy

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

values

std::string GCalibFeeSpec::GetValues()