Other api/dybdbi/gfeecablemap

Previous topic

DybDbi.GCalibFeeSpec

Next topic

DybDbi.GDaqRunInfo

This Page

Daya Bay Links

Content Skeleton

DybDbi.GFeeCableMap

class DybDbi.GFeeCableMap(DayaBay::FeeChannelId FeeChannelId, string FeeChannelDesc, DayaBay::FeeHardwareId FeeHardwareId, string ChanHrdwDesc, DayaBay::DetectorSensor SensorId, string SensorDesc, DayaBay::PmtHardwareId PmtHardwareId, string PmtHrdwDesc)

Bases: DybDbi.DbiTableRow

Data members of instances of the generated class use specialized types, which are specified for each field by the codetype column.

codetype API ref defined code2db
DayaBay::FeeChannelId DybDbi.FeeChannelId conventions:Electronics.h .fullPackedData()
DayaBay::FeeHardwareId DybDbi.FeeHardwareId conventions:Hardware.h .id()
DayaBay::DetectorSensor DybDbi.DetectorSensor conventions:Detectors.h .fullPackedData()
DayaBay::PmtHardwareId DybDbi.PmtHardwareId conventions:Hardware.h .id()

This usage is mirrored in the ctor/getters/setters of the generated class. As these cannot be directly stored into the DB, conversions are performed on writing and reading.

On writing to DB the code2db defined call is used to convert the specialized type into integers that can be persisted in the DB. On reading from the DB the one argument codetype ctors are used to convert the persisted integer back into the specialized types.

GFeeCableMap::GFeeCableMap() GFeeCableMap::GFeeCableMap(const GFeeCableMap& from) GFeeCableMap::GFeeCableMap(DayaBay::FeeChannelId FeeChannelId, string FeeChannelDesc, DayaBay::FeeHardwareId FeeHardwareId, string ChanHrdwDesc, DayaBay::DetectorSensor SensorId, string SensorDesc, DayaBay::PmtHardwareId PmtHardwareId, string PmtHrdwDesc)

AssignTimeGate

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

Cache

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

CanL2Cache

bool GFeeCableMap::CanL2Cache()

Close

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

Compare

bool GFeeCableMap::Compare(const GFeeCableMap& that)

classmethod Create(*args, **kwargs)

Provide pythonic instance creation classmethod:

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

DbiTableRow* GFeeCableMap::CreateTableRow()

CurrentTimeGate

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

DoubleValueForKey

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

Fill

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

FloatValueForKey

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

GetChanHrdwDesc

std::string GFeeCableMap::GetChanHrdwDesc()

GetDatabaseLayout

std::string GFeeCableMap::GetDatabaseLayout()

GetDigest

std::string GFeeCableMap::GetDigest()

GetFeeChannelDesc

std::string GFeeCableMap::GetFeeChannelDesc()

GetFeeChannelId

DayaBay::FeeChannelId GFeeCableMap::GetFeeChannelId()

GetFeeHardwareId

DayaBay::FeeHardwareId GFeeCableMap::GetFeeHardwareId()

GetFields

std::string GFeeCableMap::GetFields()

GetPmtHardwareId

DayaBay::PmtHardwareId GFeeCableMap::GetPmtHardwareId()

GetPmtHrdwDesc

std::string GFeeCableMap::GetPmtHrdwDesc()

GetSensorDesc

std::string GFeeCableMap::GetSensorDesc()

GetSensorId

DayaBay::DetectorSensor GFeeCableMap::GetSensorId()

GetTableDescr

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

GetTableProxy

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

GetValues

std::string GFeeCableMap::GetValues()

IntValueForKey

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

IsA

TClass* GFeeCableMap::IsA()

Rpt

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

Save

void GFeeCableMap::Save()

SetChanHrdwDesc

void GFeeCableMap::SetChanHrdwDesc(string ChanHrdwDesc)

SetFeeChannelDesc

void GFeeCableMap::SetFeeChannelDesc(string FeeChannelDesc)

SetFeeChannelId

void GFeeCableMap::SetFeeChannelId(DayaBay::FeeChannelId FeeChannelId)

SetFeeHardwareId

void GFeeCableMap::SetFeeHardwareId(DayaBay::FeeHardwareId FeeHardwareId)

SetPmtHardwareId

void GFeeCableMap::SetPmtHardwareId(DayaBay::PmtHardwareId PmtHardwareId)

SetPmtHrdwDesc

void GFeeCableMap::SetPmtHrdwDesc(string PmtHrdwDesc)

SetSensorDesc

void GFeeCableMap::SetSensorDesc(string SensorDesc)

SetSensorId

void GFeeCableMap::SetSensorId(DayaBay::DetectorSensor SensorId)

ShowMembers

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

SpecKeys

static TList* GFeeCableMap::SpecKeys()

SpecList

static TList* GFeeCableMap::SpecList()

SpecMap

static TMap* GFeeCableMap::SpecMap()

Store

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

Wrt

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

aggregateno

int DbiTableRow::GetAggregateNo()

chanhrdwdesc

std::string GFeeCableMap::GetChanHrdwDesc()

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

digest

std::string GFeeCableMap::GetDigest()

extracondition

std::string DbiTableRow::GetExtraCondition()

feechanneldesc

std::string GFeeCableMap::GetFeeChannelDesc()

feechannelid

DayaBay::FeeChannelId GFeeCableMap::GetFeeChannelId()

feehardwareid

DayaBay::FeeHardwareId GFeeCableMap::GetFeeHardwareId()

fields

std::string GFeeCableMap::GetFields()

name

std::string GFeeCableMap::name()

pmthardwareid

DayaBay::PmtHardwareId GFeeCableMap::GetPmtHardwareId()

pmthrdwdesc

std::string GFeeCableMap::GetPmtHrdwDesc()

sensordesc

std::string GFeeCableMap::GetSensorDesc()

sensorid

DayaBay::DetectorSensor GFeeCableMap::GetSensorId()

tabledescr

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

tableproxy

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

values

std::string GFeeCableMap::GetValues()