Functions | |
def | calculateSpecificLumi |
def | filltofiles |
output methods#### More... | |
def | getFillFromDB |
def | getFillFromFile |
def | getSpecificLumi |
def | lastcompleteFill |
def | listfilldir |
def | specificlumiTofile |
Variables | |
string | action = 'store' |
string | allfillname = 'allfills.txt' |
tuple | allfillsFromDB = lumiCalcAPI.fillInRange(schema,fillmin=minfillnum,fillmax=maxfillnum,amodetag=options.amodetag) |
list | amodetagChoices = [ "PROTPHYS","IONPHYS",'PAPHYS' ] |
choices = amodetagChoices, | |
tuple | dataidmap = revisionDML.dataIdsByTagId(session.nominalSchema(),datatagid,runlist=runlist,withcomment=False) |
datatagname = options.datatag | |
string | default = 'frontier://LumiCalc/CMS_LUMI_PROD' |
dictionary | filldata = {} |
list | fillstoprocess = [] |
string | help = 'connect string to lumiDB,optional' |
tuple | lastcompletedFill = lastcompleteFill(os.path.join(options.inputdir,'runtofill_dqm.txt')) |
int | MAXFILL = 9999 |
maxfillnum = options.maxfill | |
int | MINFILL = 1800 |
minfillnum = options.minfill | |
int | normid = 0 |
tuple | normmap = normDML.normIdByType(session.nominalSchema(),lumitype='HF',defaultonly=True) |
string | normname = 'NONE' |
dictionary | normvalueDict = {} |
tuple | options = parser.parse_args() |
tuple | parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description = "specific lumi",formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
## Main ProgramMore... | |
tuple | processedfills = listfilldir(options.outputdir) |
tuple | reqfillmax = max(fillstoprocess) |
tuple | reqfillmin = min(fillstoprocess) |
required = False, | |
tuple | runlist = lumiCalcAPI.runList(session.nominalSchema(),options.fillnum,runmin=None,runmax=None,fillmin=reqfillmin,fillmax=reqfillmax,startT=None,stopT=None,l1keyPattern=None,hltkeyPattern=None,amodetag=options.amodetag,nominalEnergy=None,energyFlut=None,requiretrg=False,requirehlt=False) |
tuple | schema = session.nominalSchema() |
tuple | session = svc.openSession(isReadOnly=True,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')]) |
tuple | svc = sessionManager.sessionManager(options.connect,authpath=options.authpath,debugON=options.debug) |
query DB for all fills and compare with allfills.txt if found newer fills, store in mem fill number reprocess anyway the last 1 fill in the dir redo specific lumi for all marked fills More... | |
type = int, | |
list | xingAlgoChoices = [ "OCC1","OCC2","ET"] |
def specificLumi.calculateSpecificLumi | ( | lumi, | |
lumierr, | |||
beam1intensity, | |||
beam1intensityerr, | |||
beam2intensity, | |||
beam2intensityerr | |||
) |
calculate specific lumi input: instlumi, instlumierror,beam1intensity,beam1intensityerror,beam2intensity,beam2intensityerror output (specific lumi value,specific lumi error)
Definition at line 74 of file specificLumi.py.
Referenced by getSpecificLumi().
def specificLumi.filltofiles | ( | allfills, | |
runsperfill, | |||
runtimes, | |||
dirname | |||
) |
output methods####
write runnumber:starttime map per fill to files
Definition at line 121 of file specificLumi.py.
def specificLumi.getFillFromDB | ( | schema, | |
fillnum | |||
) |
output: {run:starttime}
Definition at line 22 of file specificLumi.py.
References python.multivaluedict.dict, lumiCalcAPI.fillrunMap(), and lumiCalcAPI.runsummary().
Referenced by getSpecificLumi().
def specificLumi.getFillFromFile | ( | fillnum, | |
inputdir | |||
) |
parse fill_xxx.txt files in the input directory for runs, starttime in the fill input: fillnumber, input dir output: {run:tarttime}
Definition at line 89 of file specificLumi.py.
def specificLumi.getSpecificLumi | ( | schema, | |
fillnum, | |||
inputdir, | |||
dataidmap, | |||
normmap, | |||
xingMinLum = 0.0 , |
|||
amodetag = 'PROTPHYS' , |
|||
bxAlgo = 'OCC1' |
|||
) |
specific lumi in 1e-30 (ub-1s-1) unit lumidetail occlumi in 1e-27 1309_lumi_401_CMS.txt time(in seconds since January 1,2011,00:00:00 UTC) stab(fraction of time spent in stable beams for this time bin) l(lumi in Hz/ub) dl(point-to-point error on lumi in Hz/ub) sl(specific lumi in Hz/ub) dsl(error on specific lumi) 20800119.0 1 -0.889948 0.00475996848729 0.249009 0.005583287562 -0.68359 6.24140208607 0.0 0.0 0.0 0.0 0.0 0.0 0.0383576 0.00430892097862 0.0479095 0.00430892097862 66.6447 4.41269758764 0.0 0.0 0.0 result [(time,beamstatusfrac,lumi,lumierror,speclumi,speclumierror)]
Definition at line 240 of file specificLumi.py.
References python.multivaluedict.append(), calculateSpecificLumi(), lumiCalcAPI.deliveredLumiForIds(), python.multivaluedict.dict, getFillFromDB(), bookConverter.max, and lumiCalcAPI.runsummaryMap().
def specificLumi.lastcompleteFill | ( | infile | ) |
parse infile to find LASTCOMPLETEFILL input: input file name output: last completed fill number
Definition at line 57 of file specificLumi.py.
def specificLumi.listfilldir | ( | indir | ) |
list all fills contained in the given dir input: indir output: [fill]
Definition at line 36 of file specificLumi.py.
def specificLumi.specificlumiTofile | ( | fillnum, | |
filldata, | |||
outdir | |||
) |
Definition at line 137 of file specificLumi.py.
References python.multivaluedict.append(), python.multivaluedict.map(), bookConverter.max, and CommonUtil.transposed().
string specificLumi.action = 'store' |
Definition at line 328 of file specificLumi.py.
string specificLumi.allfillname = 'allfills.txt' |
Definition at line 20 of file specificLumi.py.
tuple specificLumi.allfillsFromDB = lumiCalcAPI.fillInRange(schema,fillmin=minfillnum,fillmax=maxfillnum,amodetag=options.amodetag) |
Definition at line 417 of file specificLumi.py.
list specificLumi.amodetagChoices = [ "PROTPHYS","IONPHYS",'PAPHYS' ] |
Definition at line 324 of file specificLumi.py.
specificLumi.choices = amodetagChoices, |
Definition at line 365 of file specificLumi.py.
tuple specificLumi.dataidmap = revisionDML.dataIdsByTagId(session.nominalSchema(),datatagid,runlist=runlist,withcomment=False) |
Definition at line 452 of file specificLumi.py.
specificLumi.datatagname = options.datatag |
Definition at line 449 of file specificLumi.py.
string specificLumi.default = 'frontier://LumiCalc/CMS_LUMI_PROD' |
Definition at line 331 of file specificLumi.py.
tuple specificLumi.filldata = {} |
Definition at line 440 of file specificLumi.py.
list specificLumi.fillstoprocess = [] |
Definition at line 409 of file specificLumi.py.
string specificLumi.help = 'connect string to lumiDB,optional' |
Definition at line 330 of file specificLumi.py.
tuple specificLumi.lastcompletedFill = lastcompleteFill(os.path.join(options.inputdir,'runtofill_dqm.txt')) |
Definition at line 419 of file specificLumi.py.
int specificLumi.MAXFILL = 9999 |
Definition at line 19 of file specificLumi.py.
specificLumi.maxfillnum = options.maxfill |
Definition at line 410 of file specificLumi.py.
int specificLumi.MINFILL = 1800 |
Definition at line 18 of file specificLumi.py.
specificLumi.minfillnum = options.minfill |
Definition at line 411 of file specificLumi.py.
tuple specificLumi.normid = 0 |
Definition at line 461 of file specificLumi.py.
tuple specificLumi.normmap = normDML.normIdByType(session.nominalSchema(),lumitype='HF',defaultonly=True) |
Definition at line 466 of file specificLumi.py.
tuple specificLumi.normname = 'NONE' |
Definition at line 460 of file specificLumi.py.
tuple specificLumi.normvalueDict = {} |
Definition at line 462 of file specificLumi.py.
tuple specificLumi.options = parser.parse_args() |
Definition at line 397 of file specificLumi.py.
tuple specificLumi.parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description = "specific lumi",formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
Definition at line 323 of file specificLumi.py.
tuple specificLumi.processedfills = listfilldir(options.outputdir) |
Definition at line 418 of file specificLumi.py.
tuple specificLumi.reqfillmax = max(fillstoprocess) |
Definition at line 445 of file specificLumi.py.
tuple specificLumi.reqfillmin = min(fillstoprocess) |
Definition at line 444 of file specificLumi.py.
specificLumi.required = False, |
Definition at line 329 of file specificLumi.py.
tuple specificLumi.runlist = lumiCalcAPI.runList(session.nominalSchema(),options.fillnum,runmin=None,runmax=None,fillmin=reqfillmin,fillmax=reqfillmax,startT=None,stopT=None,l1keyPattern=None,hltkeyPattern=None,amodetag=options.amodetag,nominalEnergy=None,energyFlut=None,requiretrg=False,requirehlt=False) |
Definition at line 447 of file specificLumi.py.
tuple specificLumi.schema = session.nominalSchema() |
Definition at line 416 of file specificLumi.py.
tuple specificLumi.session = svc.openSession(isReadOnly=True,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')]) |
Definition at line 407 of file specificLumi.py.
tuple specificLumi.svc = sessionManager.sessionManager(options.connect,authpath=options.authpath,debugON=options.debug) |
query DB for all fills and compare with allfills.txt if found newer fills, store in mem fill number reprocess anyway the last 1 fill in the dir redo specific lumi for all marked fills
Definition at line 406 of file specificLumi.py.
specificLumi.type = int, |
Definition at line 351 of file specificLumi.py.
Definition at line 325 of file specificLumi.py.