Skip to content

Commit

Permalink
Merge pull request #42613 from CMSTrackerDPG/customizeForNoTrackerDCS…
Browse files Browse the repository at this point in the history
…_13_2_X

[13.2.X] add customization function to remove check on Tracker DCS bits in Strip and Tracker DQM
  • Loading branch information
cmsbuild authored Aug 25, 2023
2 parents 5837177 + d9391d8 commit bdbcaf6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions DQM/SiStripMonitorClient/python/customizeForNoTrackerDCS.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""
Module to remove SiStrip DCS checks in Strip and Tracking Monitors
"""

import FWCore.ParameterSet.Config as cms

def producers_by_type(process, *types):
return [module for module in process._Process__producers.values() if module._TypedParameterizable__type in types]

def removeDCSChecks(process, acceptedParts):
print('WARNING: removing SiStrip DCS Checks in Strip and Tracking Monitors')

for producerType in ['SiStripMonitorTrack', 'SiStripMonitorCluster']:
for producer in producers_by_type(process, producerType):
producer.UseDCSFiltering = cms.bool(False)

for producer in producers_by_type(process, 'SiStripMonitorCluster'):
producer.StripDCSfilter.dcsPartitions = cms.vint32(acceptedParts)

for producer in producers_by_type(process, 'TrackingMonitor'):
producer.genericTriggerEventPSet.dcsPartitions = cms.vint32(acceptedParts)

return process

def removeStripDCSChecks(process):
removeDCSChecks(process, [28, 29]) # keep 28-29: pixel
return process

def removePixelDCSChecks(process):
removeDCSChecks(process, [24, 25, 26, 27]) # keep 24-27: strip
return process

def removeTrackerDCSChecks(process):
removeDCSChecks(process, []) # do not keep anything
return process

0 comments on commit bdbcaf6

Please sign in to comment.