Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.2.X] add customization function to remove check on Tracker DCS bits in Strip and Tracker DQM #42613

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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