Skip to content

Commit

Permalink
add customization to remove check on Tracker DCS in Strip and Tracker…
Browse files Browse the repository at this point in the history
… DQM monitor
  • Loading branch information
mmusich committed Aug 17, 2023
1 parent dc9cde1 commit d9391d8
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 d9391d8

Please sign in to comment.