CMS 3D CMS Logo

customizeForNoTrackerDCS.py
Go to the documentation of this file.
1 """
2 Module to remove SiStrip DCS checks in Strip and Tracking Monitors
3 """
4 
5 import FWCore.ParameterSet.Config as cms
6 
7 def producers_by_type(process, *types):
8  return [module for module in process._Process__producers.values() if module._TypedParameterizable__type in types]
9 
10 def removeDCSChecks(process, acceptedParts):
11  print('WARNING: removing SiStrip DCS Checks in Strip and Tracking Monitors')
12 
13  for producerType in ['SiStripMonitorTrack', 'SiStripMonitorCluster']:
14  for producer in producers_by_type(process, producerType):
15  producer.UseDCSFiltering = cms.bool(False)
16 
17  for producer in producers_by_type(process, 'SiStripMonitorCluster'):
18  producer.StripDCSfilter.dcsPartitions = cms.vint32(acceptedParts)
19 
20  for producer in producers_by_type(process, 'TrackingMonitor'):
21  producer.genericTriggerEventPSet.dcsPartitions = cms.vint32(acceptedParts)
22 
23  return process
24 
25 def removeStripDCSChecks(process):
26  removeDCSChecks(process, [28, 29]) # keep 28-29: pixel
27  return process
28 
29 def removePixelDCSChecks(process):
30  removeDCSChecks(process, [24, 25, 26, 27]) # keep 24-27: strip
31  return process
32 
34  removeDCSChecks(process, []) # do not keep anything
35  return process
def producers_by_type(process, types)
def removeDCSChecks(process, acceptedParts)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47