/search.css" rel="stylesheet" type="text/css"/> /search.js">
Classes | |
class | CFConf |
class | CompareVrb |
class | Vrec |
class | Vrb |
Functions | |
def | parse_cfg |
def | pydigest_ |
Variables | |
tuple | log = logging.getLogger(__name__) |
string | cfconf = 'test' |
tuple | cfc = CFConf("cfconf.cfg",cfconf, parse_cfg ) |
tuple | cv = CompareVrb() |
tuple | kls = getattr(DybDbi, d['kln'] ) |
tuple | vrb = Vrb(kls, d['task'], offseq=d['offseq'] ) |
tuple | vrec = vrb.offseq_(0) |
tuple | vrec_ = Vrec(vrec) |
def DybDbi::vrb::parse_cfg | ( | val | ) |
Parse config like the below into dict:: [mig20120820] src = GCalibPmtHighGainPariah -1 27877 6533 tgt = GCalibPmtFineGain 1 1410 6533
Definition at line 13 of file vrb.py.
00014 : 00015 """ 00016 Parse config like the below into dict:: 00017 00018 [mig20120820] 00019 src = GCalibPmtHighGainPariah -1 27877 6533 00020 tgt = GCalibPmtFineGain 1 1410 6533 00021 00022 """ 00023 bits = val.split(' ') ; assert len(bits) == 4, "unexpected fields in value %s %s " % (repr(bits), val) 00024 return dict(kln=bits[0],task=int(bits[1]),offseq=int(bits[2]),count=int(bits[3])) 00025
def DybDbi::vrb::pydigest_ | ( | rpt, | |
first = 0 |
|||
) |
:param first: index of first column to include in digest The default `first=0` duplicates the C++ `rpt.digest`. The python version can in addition restrict the comparison to ignore columns. The vals are strings like:: 67241993 20.937 0.203 6.333 0.94 67241994 18.892 0.146 5.217 1.03 Thus using a `first=1` allows digest content comparisons between tables using sensorid and channelid keys
Definition at line 54 of file vrb.py.
00055 : 00056 """ 00057 :param first: index of first column to include in digest 00058 00059 The default `first=0` duplicates the C++ `rpt.digest`. 00060 The python version can in addition restrict the comparison to ignore columns. 00061 00062 The vals are strings like:: 00063 00064 67241993 20.937 0.203 6.333 0.94 00065 67241994 18.892 0.146 5.217 1.03 00066 00067 Thus using a `first=1` allows digest content 00068 comparisons between tables using sensorid and channelid keys 00069 00070 """ 00071 from ROOT import TMD5 00072 md5 = TMD5() 00073 for i,r in enumerate(rpt): 00074 vals = " ".join(r.values.split(" ")[first:]) 00075 if i == 0: 00076 log.debug(vals) 00077 md5.Update(vals, len(vals)) 00078 md5.Final() 00079 return md5.AsString() 00080
tuple DybDbi::vrb::log = logging.getLogger(__name__) |
string DybDbi::vrb::cfconf = 'test' |
tuple DybDbi::vrb::cfc = CFConf("cfconf.cfg",cfconf, parse_cfg ) |
tuple DybDbi::vrb::cv = CompareVrb() |
tuple DybDbi::vrb::kls = getattr(DybDbi, d['kln'] ) |
list DybDbi::vrb::vrb = Vrb(kls, d['task'], offseq=d['offseq'] ) |
tuple DybDbi::vrb::vrec = vrb.offseq_(0) |
tuple DybDbi::vrb::vrec_ = Vrec(vrec) |