given a hltpath and its L1SeedExpression, find the L1 bit name
can return None
if hltPath contains the following, skip do not parse seed.
FakeHLTPATH*, HLT_Physics*, HLT_*Calibration*, HLT_HFThreashold,
HLT_MiniBias*,HLT_Random*,HLTTriggerFinalPath,HLT_PixelFED*
parse hltpath contains at most 2 logics x OR y, x AND y, and return left val
do not consider path containing operator NOT
Definition at line 2 of file hltTrgSeedMapper.py.
References python.rootplot.root2matplotlib.replace().
Referenced by lumiCalcAPI.effectiveLumiForIds(), and lumiCalcAPI.hltpathsForRange().
4 given a hltpath and its L1SeedExpression, find the L1 bit name 7 if hltPath contains the following, skip do not parse seed. 9 FakeHLTPATH*, HLT_Physics*, HLT_*Calibration*, HLT_HFThreashold, 10 HLT_MiniBias*,HLT_Random*,HLTTriggerFinalPath,HLT_PixelFED* 12 parse hltpath contains at most 2 logics x OR y, x AND y, and return left val 13 do not consider path containing operator NOT 16 if re.match(
'FakeHLTPATH',hltPath)!=
None :
18 if re.match(
'HLT_Physics',hltPath)!=
None :
20 if re.match(
'HLT_[aA-zZ]*Calibration',hltPath)!=
None :
22 if re.match(
'HLT_[aA-zZ]*Threshold',hltPath)!=
None :
24 if re.match(
'HLT_MiniBias',hltPath)!=
None :
26 if re.match(
'HLT_Random',hltPath)!=
None :
28 if re.match(
'HLTriggerFinalPath',hltPath)!=
None :
30 if re.match(
'HLT_[aA-zZ]*FEDSize',hltPath)!=
None :
32 if ExprStr.find(
'(')!=-1 :
34 sep=re.compile(
'(\sAND\s|\sOR\s)',re.IGNORECASE)
35 result=re.split(sep,ExprStr)
40 notsep=re.compile(
'NOT\s',re.IGNORECASE)
41 andsep=re.compile(
'\sAND\s',re.IGNORECASE)
42 orsep=re.compile(
'\sOR\s',re.IGNORECASE)
53 cleanresult.append(
'"'+string.strip(r).
replace(
'\"',
'')+
'"')
54 return (exptype,cleanresult)
def replace(string, replacements)
def findUniqueSeed(hltPath, ExprStr)