CMS 3D CMS Logo

Functions | Variables

lumiCalc2 Namespace Reference

Functions

def parseInputFiles

Variables

string action = 'store_true'
list allowedActions = ['overview', 'delivered', 'recorded', 'lumibyls','lumibylsXing']
list amodetagChoices = [ "PROTPHYS","IONPHYS",'PAPHYS' ]
list beamChoices = ['PROTPHYS','IONPHYS','PAPHYS']
list beamModeChoices = [ "stable"]
tuple c = checkforupdate.checkforupdate()
 choices = amodetagChoices,
 ls filter
list cmsswWorkingBase = os.environ['CMSSW_BASE']
tuple dataidmap = revisionDML.dataIdsByTagId(session.nominalSchema(),datatagid,runlist=rruns,withcomment=False)
 datatagname = options.datatag
 check datatag #############################################################
string default = 'frontier://LumiCalc/CMS_LUMI_PROD'
 arg to select exact hltpath or pattern
string dest = 'withoutNorm'
 switches
tuple GrunsummaryData = lumiCalcAPI.runsummaryMap(session.nominalSchema(),irunlsdict)
 ls level #
string help = 'command actions'
 basic arguments
 hltname = options.hltpath
 hltpat = None
list iresults = []
dictionary irunlsdict = {}
 check run/ls list
tuple lute = lumiTime.lumiTime()
int normid = 0
tuple normmap = normDML.normIdByType(session.nominalSchema(),lumitype='HF',defaultonly=True)
string normname = 'NONE'
 check normtag and get norm values if required
dictionary normvalueDict = {}
tuple options = parser.parse_args()
 outfile = options.outputfile
tuple parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description = "Lumi Calculation",formatter_class=argparse.ArgumentDefaultsHelpFormatter)
 ######################## ## ## ################## ## ## ## ## Main Program ## ## ## ## ################## ## ## ######################## ##
 pbeammode = None
 reqfillmax = None
 reqfillmin = None
 reqHlt = False
 reqrunmax = None
 reqrunmin = None
 reqtimemax = None
tuple reqtimemaxT = lute.StrToDatetime(reqtimemax,customfm='%m/%d/%y %H:%M:%S')
 reqtimemin = None
tuple reqtimeminT = lute.StrToDatetime(reqtimemin,customfm='%m/%d/%y %H:%M:%S')
 reqTrg = False
 required = False,
 arg to select exact run and ls
tuple result = lumiCalcAPI.deliveredLumiForIds(session.nominalSchema(),irunlsdict,dataidmap,runsummaryMap=GrunsummaryData,beamstatusfilter=pbeammode,timeFilter=timeFilter,normmap=normvalueDict,lumitype='HF')
list rruns = []
tuple runlist = lumiCalcAPI.runList(session.nominalSchema(),options.fillnum,runmin=reqrunmin,runmax=reqrunmax,fillmin=reqfillmin,fillmax=reqfillmax,startT=reqtimemin,stopT=reqtimemax,l1keyPattern=None,hltkeyPattern=None,amodetag=options.amodetag,nominalEnergy=options.beamenergy,energyFlut=options.beamfluctuation,requiretrg=False,requirehlt=False)
tuple session = svc.openSession(isReadOnly=True,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')])
tuple svc
 pre-check option compatibility
list thiscmmd = sys.argv[0]
list timeFilter = [None,None]
 type = int,
 global scale factor
string updateversion = 'NONE'
tuple updateversionList = c.checkforupdate(workingversion,isverbose=False)
string workingversion = 'UNKNOWN'
 check working environment
list xingAlgoChoices = [ "OCC1","OCC2","ET"]

Function Documentation

def lumiCalc2::parseInputFiles (   inputfilename)
output ({run:[cmsls,cmsls,...]},[[resultlines]])

Definition at line 15 of file lumiCalc2.py.

00016                                   :
00017     '''
00018     output ({run:[cmsls,cmsls,...]},[[resultlines]])
00019     '''
00020     selectedrunlsInDB={}
00021     resultlines=[]
00022     p=inputFilesetParser.inputFilesetParser(inputfilename)
00023     runlsbyfile=p.runsandls()
00024     selectedProcessedRuns=p.selectedRunsWithresult()
00025     selectedNonProcessedRuns=p.selectedRunsWithoutresult()
00026     resultlines=p.resultlines()
00027     for runinfile in selectedNonProcessedRuns:
00028         selectedrunlsInDB[runinfile]=runlsbyfile[runinfile]
00029     return (selectedrunlsInDB,resultlines)


Variable Documentation

string lumiCalc2::action = 'store_true'

Definition at line 168 of file lumiCalc2.py.

list lumiCalc2::allowedActions = ['overview', 'delivered', 'recorded', 'lumibyls','lumibylsXing']

Definition at line 40 of file lumiCalc2.py.

list lumiCalc2::amodetagChoices = [ "PROTPHYS","IONPHYS",'PAPHYS' ]

Definition at line 42 of file lumiCalc2.py.

list lumiCalc2::beamChoices = ['PROTPHYS','IONPHYS','PAPHYS']

Definition at line 13 of file lumiCalc2.py.

list lumiCalc2::beamModeChoices = [ "stable"]

Definition at line 41 of file lumiCalc2.py.

Definition at line 238 of file lumiCalc2.py.

ls filter

Definition at line 97 of file lumiCalc2.py.

list lumiCalc2::cmsswWorkingBase = os.environ['CMSSW_BASE']

Definition at line 234 of file lumiCalc2.py.

tuple lumiCalc2::dataidmap = revisionDML.dataIdsByTagId(session.nominalSchema(),datatagid,runlist=rruns,withcomment=False)

Definition at line 291 of file lumiCalc2.py.

lumiCalc2::datatagname = options.datatag

check datatag #############################################################

Definition at line 288 of file lumiCalc2.py.

float lumiCalc2::default = 'frontier://LumiCalc/CMS_LUMI_PROD'

arg to select exact hltpath or pattern

command configuration

run filters

Definition at line 56 of file lumiCalc2.py.

string lumiCalc2::dest = 'withoutNorm'

switches

Definition at line 167 of file lumiCalc2.py.

tuple lumiCalc2::GrunsummaryData = lumiCalcAPI.runsummaryMap(session.nominalSchema(),irunlsdict)

ls level #

Definition at line 325 of file lumiCalc2.py.

string lumiCalc2::help = 'command actions'

basic arguments

Definition at line 52 of file lumiCalc2.py.

lumiCalc2::hltname = options.hltpath

Definition at line 337 of file lumiCalc2.py.

Referenced by LumiCalculator::beginRun(), and LumiCalculator::endLuminosityBlock().

Definition at line 338 of file lumiCalc2.py.

Definition at line 205 of file lumiCalc2.py.

dictionary lumiCalc2::irunlsdict = {}

check run/ls list

Definition at line 267 of file lumiCalc2.py.

Definition at line 216 of file lumiCalc2.py.

Referenced by EcalTPGParamBuilder::analyze().

tuple lumiCalc2::normid = 0

Definition at line 300 of file lumiCalc2.py.

tuple lumiCalc2::normmap = normDML.normIdByType(session.nominalSchema(),lumitype='HF',defaultonly=True)

Definition at line 305 of file lumiCalc2.py.

tuple lumiCalc2::normname = 'NONE'

check normtag and get norm values if required

Definition at line 299 of file lumiCalc2.py.

Definition at line 301 of file lumiCalc2.py.

tuple lumiCalc2::options = parser.parse_args()

Definition at line 191 of file lumiCalc2.py.

string lumiCalc2::outfile = options.outputfile

Definition at line 359 of file lumiCalc2.py.

tuple lumiCalc2::parser = argparse.ArgumentParser(prog=os.path.basename(sys.argv[0]),description = "Lumi Calculation",formatter_class=argparse.ArgumentDefaultsHelpFormatter)

######################## ## ## ################## ## ## ## ## Main Program ## ## ## ## ################## ## ## ######################## ##

Definition at line 39 of file lumiCalc2.py.

string lumiCalc2::pbeammode = None

Definition at line 202 of file lumiCalc2.py.

Definition at line 199 of file lumiCalc2.py.

Definition at line 196 of file lumiCalc2.py.

Definition at line 207 of file lumiCalc2.py.

Definition at line 198 of file lumiCalc2.py.

Definition at line 195 of file lumiCalc2.py.

Definition at line 200 of file lumiCalc2.py.

tuple lumiCalc2::reqtimemaxT = lute.StrToDatetime(reqtimemax,customfm='%m/%d/%y %H:%M:%S')

Definition at line 223 of file lumiCalc2.py.

Definition at line 197 of file lumiCalc2.py.

tuple lumiCalc2::reqtimeminT = lute.StrToDatetime(reqtimemin,customfm='%m/%d/%y %H:%M:%S')

Definition at line 217 of file lumiCalc2.py.

Definition at line 206 of file lumiCalc2.py.

arg to select exact run and ls

versions control

Definition at line 54 of file lumiCalc2.py.

tuple lumiCalc2::result = lumiCalcAPI.deliveredLumiForIds(session.nominalSchema(),irunlsdict,dataidmap,runsummaryMap=GrunsummaryData,beamstatusfilter=pbeammode,timeFilter=timeFilter,normmap=normvalueDict,lumitype='HF')

Definition at line 327 of file lumiCalc2.py.

tuple lumiCalc2::rruns = []

Definition at line 268 of file lumiCalc2.py.

tuple lumiCalc2::runlist = lumiCalcAPI.runList(session.nominalSchema(),options.fillnum,runmin=reqrunmin,runmax=reqrunmax,fillmin=reqfillmin,fillmax=reqfillmax,startT=reqtimemin,stopT=reqtimemax,l1keyPattern=None,hltkeyPattern=None,amodetag=options.amodetag,nominalEnergy=options.beamenergy,energyFlut=options.beamfluctuation,requiretrg=False,requirehlt=False)

Definition at line 274 of file lumiCalc2.py.

tuple lumiCalc2::session = svc.openSession(isReadOnly=True,cpp2sqltype=[('unsigned int','NUMBER(10)'),('unsigned long long','NUMBER(20)')])

Definition at line 262 of file lumiCalc2.py.

Initial value:
00001 sessionManager.sessionManager(options.connect,
00002                                       authpath=options.authpath,
00003                                       siteconfpath=options.siteconfpath,
00004                                       debugON=options.debug)

pre-check option compatibility

Definition at line 258 of file lumiCalc2.py.

list lumiCalc2::thiscmmd = sys.argv[0]

Definition at line 231 of file lumiCalc2.py.

list lumiCalc2::timeFilter = [None,None]

Definition at line 201 of file lumiCalc2.py.

tuple lumiCalc2::type = int,

global scale factor

Definition at line 61 of file lumiCalc2.py.

list lumiCalc2::updateversion = 'NONE'

Definition at line 230 of file lumiCalc2.py.

tuple lumiCalc2::updateversionList = c.checkforupdate(workingversion,isverbose=False)

Definition at line 241 of file lumiCalc2.py.

tuple lumiCalc2::workingversion = 'UNKNOWN'

check working environment

Definition at line 229 of file lumiCalc2.py.

list lumiCalc2::xingAlgoChoices = [ "OCC1","OCC2","ET"]

Definition at line 43 of file lumiCalc2.py.