CMS 3D CMS Logo

Functions
customizeHLTforNewDatasetDefinition Namespace Reference

Functions

def customizeHLTforNewDatasetDefinition (process)
 

Function Documentation

◆ customizeHLTforNewDatasetDefinition()

def customizeHLTforNewDatasetDefinition.customizeHLTforNewDatasetDefinition (   process)

Definition at line 3 of file customizeHLTforNewDatasetDefinition.py.

4  # Loop over streams
5  for stream in process.streams.parameterNames_():
6  streamPaths = cms.vstring()
7  # Loop over datasets
8  for dataset in getattr( process.streams, stream ):
9  # Define dataset prescaler
10  setattr( process, 'hltPreDataset'+dataset, cms.EDFilter( "HLTPrescaler", L1GtReadoutRecordTag = cms.InputTag( "hltGtStage2Digis" ), offset = cms.uint32( 0 ) ) )
11  # Define dataset selection
12  paths = getattr( process.datasets, dataset )
13  setattr( process, 'hltDataset'+dataset, cms.EDFilter( "PathStatusFilter" , verbose = cms.untracked.bool( False ), logicalExpression = cms.string( ' or '.join(paths) ) ) )
14  # Create dataset path
15  datasetPath = 'Dataset_'+dataset+'_v1'
16  setattr( process, datasetPath, cms.Path( process.hltGtStage2Digis + getattr( process , 'hltPreDataset'+dataset ) + getattr( process, 'hltDataset'+dataset ) + process.HLTEndSequence ) )
17  # Append dataset path
18  process.HLTSchedule.insert( process.HLTSchedule.index( process.HLTriggerFinalPath ), getattr( process, datasetPath ) )
19  setattr( process.datasets, dataset, cms.vstring( datasetPath ) )
20  streamPaths.append( datasetPath )
21  # Set stream paths
22  getattr( process, 'hltOutput'+stream ).SelectEvents.SelectEvents = streamPaths
23 
24  return process

References join().

join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
customizeHLTforNewDatasetDefinition.customizeHLTforNewDatasetDefinition
def customizeHLTforNewDatasetDefinition(process)
Definition: customizeHLTforNewDatasetDefinition.py:3