4 while '@' in repr(seqList)
and level<maxLevel:
6 for specifiedCommand
in seqList:
7 if specifiedCommand.startswith(
'@'):
8 location=specifiedCommand[1:]
9 if not location
in mapping:
10 raise Exception(
"Impossible to map "+location+
" from "+repr(mapping))
11 mappedTo=mapping[location]
16 insertAt=seqList.index(specifiedCommand)
17 seqList.remove(specifiedCommand)
18 if key
in mappedTo
and mappedTo[key]
is not None:
19 allToInsert=mappedTo[key].
split(
'+')
20 for offset,toInsert
in enumerate(allToInsert):
21 seqList.insert(insertAt+offset,toInsert)
24 raise Exception(
"Could not fully expand "+repr(seqList)+
" from "+repr(mapping))
29 'PHYS': {
'sequence':
'',
32 'L1' : {
'customize':
'nanoL1TrigObjCustomize'},
33 'L1FULL' : {
'customize':
'nanoL1TrigObjCustomizeFull'},
35 'Scout' : {
'sequence':
'PhysicsTools/NanoAOD/custom_run3scouting_cff'},
37 'JME' : {
'sequence':
'@PHYS',
38 'customize':
'@PHYS+PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD'},
40 'MUPOG' : {
'sequence':
'@PHYS',
41 'customize' :
'@PHYS+PhysicsTools/NanoAOD/custom_muon_cff.PrepMuonCustomNanoAOD'},
43 'MUDPG' : {
'sequence':
'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoProducer',
44 'customize':
'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoCustomize'},
45 'MUDPGBKG' : {
'sequence':
'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoProducerBkg',
46 'customize':
'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoBkgCustomize'},
48 'EGM' : {
'sequence':
'@PHYS',
49 'customize' :
'@PHYS+PhysicsTools/NanoAOD/egamma_custom_cff.addExtraEGammaVarsCustomize'},
51 'Prompt' : {
'sequence':
'@PHYS',
52 'customize':
'@PHYS+@L1'},
54 'LepTrackInfo' : {
'sequence':
'@PHYS',
55 'customize':
'@PHYS+PhysicsTools/NanoAOD/leptonTimeLifeInfo_common_cff.addTrackVarsToTimeLifeInfo'},
57 'BTV' : {
'sequence':
'@PHYS',
58 'customize':
'@PHYS+PhysicsTools/NanoAOD/custom_btv_cff.BTVCustomNanoAOD'}
def expandNanoMapping(seqList, mapping, key)
def split(sequence, size)