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':
'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomize'},
33 'L1FULL': {
'customize':
'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomizeFull'},
35 'Scout': {
'sequence':
'PhysicsTools/NanoAOD/custom_run3scouting_cff'},
37 'JME': {
'sequence':
'@PHYS',
38 'customize':
'@PHYS+PhysicsTools/NanoAOD/custom_jme_cff.PrepJMECustomNanoAOD'},
39 'JMErePuppi': {
'sequence':
'@PHYS',
40 'customize':
'@PHYS+@JME+PhysicsTools/NanoAOD/custom_jme_cff.RecomputePuppiWeightsAndMET'},
42 'L1DPG' : {
'sequence':
'DPGAnalysis/L1TNanoAOD/l1tNano_cff.l1tNanoSequence',
43 'customize':
','.
join([
'PhysicsTools/NanoAOD/l1trig_cff.nanoL1TrigObjCustomizeFull',
44 'DPGAnalysis/L1TNanoAOD/l1tNano_cff.addCaloFull',
45 'L1Trigger/Configuration/customiseReEmul.L1TReEmulFromRAW'])},
47 'MUPOG': {
'sequence':
'@PHYS',
48 'customize':
'@PHYS+PhysicsTools/NanoAOD/custom_muon_cff.PrepMuonCustomNanoAOD'},
50 'MUDPG': {
'sequence':
'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoProducer',
51 'customize':
'DPGAnalysis/MuonTools/muNtupleProducer_cff.muDPGNanoCustomize'},
52 'MUDPGBKG': {
'sequence':
'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoProducerBkg',
53 'customize':
'DPGAnalysis/MuonTools/muNtupleProducerBkg_cff.muDPGNanoBkgCustomize'},
55 'HCAL': {
'sequence':
'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask'},
56 'HCALCalib': {
'sequence':
'DPGAnalysis/HcalNanoAOD/hcalNano_cff.hcalNanoTask',
57 'customize':
'DPGAnalysis/HcalNanoAOD/customiseHcalCalib_cff.customiseHcalCalib'},
59 'EGM': {
'sequence':
'@PHYS',
60 'customize':
'@PHYS+PhysicsTools/NanoAOD/egamma_custom_cff.addExtraEGammaVarsCustomize'},
62 'Prompt': {
'sequence':
'@PHYS',
63 'customize':
'@PHYS+@L1'},
65 'LepTrackInfo' : {
'sequence':
'@PHYS',
66 'customize':
'@PHYS+PhysicsTools/NanoAOD/leptonTimeLifeInfo_common_cff.addTrackVarsToTimeLifeInfo'},
68 'BTV': {
'sequence':
'@PHYS',
69 'customize':
'@PHYS+PhysicsTools/NanoAOD/custom_btv_cff.BTVCustomNanoAOD'},
71 'GEN': {
'sequence':
'PhysicsTools/NanoAOD/nanogen_cff.nanogenSequence',
72 'customize':
'PhysicsTools/NanoAOD/nanogen_cff.customizeNanoGEN'},
74 'GENFromMini': {
'sequence':
'PhysicsTools/NanoAOD/nanogen_cff.nanogenSequence',
75 'customize':
'PhysicsTools/NanoAOD/nanogen_cff.customizeNanoGENFromMini'},
def expandNanoMapping(seqList, mapping, key)
def split(sequence, size)
static std::string join(char **cmd)