@@ -89,8 +89,8 @@ def getStreamsInfoFromProcess(process, prescaleValues, numberOfPrescaleColumns):
89
89
90
90
each stream dict contains the following entries (key: value)
91
91
- name: name of the stream
92
- - path: cms.EndPath/FinalPath associated to the stream
93
- - prescales: list of prescale values (1 per PS column) applied to the EndPath/FinalPath associated to the stream
92
+ - path: cms.EndPath associated to the stream
93
+ - prescales: list of prescale values (1 per PS column) applied to the EndPath associated to the stream
94
94
- smartPrescales: dictionary (path:ps) of smart-prescales applied at stream level
95
95
- datasets: list of dataset dictionaries (see below)
96
96
@@ -123,9 +123,9 @@ def getStreamsInfoFromProcess(process, prescaleValues, numberOfPrescaleColumns):
123
123
raise RuntimeError ('ERROR -- the process holds multiple partial schedules: ' + str (process ._Process__partialschedules ))
124
124
125
125
# find list of streams:
126
- # - stream XYZ exists if the configuration contains a EndPath/FinalPath that contains an OutputModule named hltOutputXYZ
127
- # - if more than one such EndPath/FinalPath exists, it is an error (unsupported configuration)
128
- # - if the configuration contains a cms.Schedule, the EndPath/FinalPath is required to be part of the cms.Schedule
126
+ # - stream XYZ exists if the configuration contains a EndPath that contains an OutputModule named hltOutputXYZ
127
+ # - if more than one such EndPath exists, it is an error (unsupported configuration)
128
+ # - if the configuration contains a cms.Schedule, the EndPath is required to be part of the cms.Schedule
129
129
# - reliance on the PSet "streams" is minimised:
130
130
# - the latter PSet, if present, should be a superset of the streams found in the configuration
131
131
# (this is the case for HLT configs containing only a subset of the triggers of a menu, e.g. "hltGetConfiguration --paths [..]")
@@ -141,27 +141,26 @@ def getStreamsInfoFromProcess(process, prescaleValues, numberOfPrescaleColumns):
141
141
continue
142
142
streamName = outModName [len ('hltOutput' ):]
143
143
144
- # find EndPath/FinalPath containing stream OutputModule
144
+ # find EndPath containing stream OutputModule
145
145
streamPath = None
146
146
outputModule = process .outputModules_ ()[outModName ]
147
- for efPaths in [process .endpaths_ ().values (), process .finalpaths_ ().values ()]:
148
- for efPath in efPaths :
149
- if procSchedule != None :
150
- # skip EndPath/FinalPath if not included in the schedule
151
- # (schedule.contains does not seem to be enough, so the index of the EndPath/FinalPath in the schedule is searched;
152
- # if the EndPath/FinalPath is not in the schedule, this search leads to a runtime-error)
153
- try : procSchedule .index (efPath )
154
- except : continue
155
- if efPath .contains (outputModule ):
156
- # if streamPath is already set, throw a runtime error:
157
- # no more than one EndPath/FinalPath can hold a given OutputModule in valid HLT configurations
158
- if streamPath != None :
159
- errMsg = 'ERROR -- output module "' + outModName + '" is associated to'
160
- errMsg += ' more than one EndPath/FinalPath: ' + str ([streamPath .label (), efPath .label ()])
161
- raise RuntimeError (errMsg )
162
- streamPath = efPath
163
-
164
- # OutputModule not included in any active EndPath/FinalPath
147
+ for efPath in process .endpaths_ ().values ():
148
+ if procSchedule != None :
149
+ # skip EndPath if not included in the schedule
150
+ # (schedule.contains does not seem to be enough, so the index of the EndPath in the schedule is searched;
151
+ # if the EndPath is not in the schedule, this search leads to a runtime-error)
152
+ try : procSchedule .index (efPath )
153
+ except : continue
154
+ if efPath .contains (outputModule ):
155
+ # if streamPath is already set, throw a runtime error:
156
+ # no more than one EndPath can hold a given OutputModule in valid HLT configurations
157
+ if streamPath != None :
158
+ errMsg = 'ERROR -- output module "' + outModName + '" is associated to'
159
+ errMsg += ' more than one EndPath: ' + str ([streamPath .label (), efPath .label ()])
160
+ raise RuntimeError (errMsg )
161
+ streamPath = efPath
162
+
163
+ # OutputModule not included in any active EndPath
165
164
if streamPath == None :
166
165
continue
167
166
@@ -290,9 +289,8 @@ def getStreamsInfoFromProcess(process, prescaleValues, numberOfPrescaleColumns):
290
289
291
290
# fill smart-PS applied at stream level
292
291
# (in Run-2 HLT menus, smart-PSs are applied to standard Paths in the stream EndPath)
293
- # (in Run-3 HLT menus, prescales at stream level have not been used yet, plus they cannot be applied inside FinalPaths)
294
292
streamSmartPrescales = {} # dictionary of smart-PSs applied at stream level
295
- smartPSModuleName = None # smart-PS module in the stream EndPath/FinalPath
293
+ smartPSModuleName = None # smart-PS module in the stream EndPath
296
294
297
295
# build list of Paths that can have a smart-PS at stream level:
298
296
# this includes the Paths of all datasets in the stream, and the DatasetPaths (if present)
@@ -307,7 +305,7 @@ def getStreamsInfoFromProcess(process, prescaleValues, numberOfPrescaleColumns):
307
305
for foo in pathNamesForStreamSmartPS :
308
306
streamSmartPrescales [foo ] = 1
309
307
310
- # loop on modules preceding the OutputModule in the EndPath/FinalPath
308
+ # loop on modules preceding the OutputModule in the EndPath
311
309
# to extract smart prescales at stream level, requiring no more than one smart-PS module
312
310
streamPathExpanded = streamPath .expandAndClone ()
313
311
for modIdx in range (streamPathExpanded .index (outputModule )):
0 commit comments