CMS 3D CMS Logo

Functions | Variables
RemoveAddSevLevel Namespace Reference

Functions

def AddFlag (sevLevelComputer, flag="UserDefinedBit0", severity=10, verbose=True)
 
def PrintLevels (SLComp)
 
def RemoveFlag (sevLevelComputer, flag="HFLongShort")
 

Variables

 flag
 
 hcalRecAlgos
 
 severity
 

Function Documentation

◆ AddFlag()

def RemoveAddSevLevel.AddFlag (   sevLevelComputer,
  flag = "UserDefinedBit0",
  severity = 10,
  verbose = True 
)
Adds specified flag to severity level computer using specified severity level.
    If flag already exists at another severity level, it is removed from that level.

Definition at line 47 of file RemoveAddSevLevel.py.

47 def AddFlag(sevLevelComputer,flag="UserDefinedBit0",severity=10,verbose=True):
48  ''' Adds specified flag to severity level computer using specified severity level.
49  If flag already exists at another severity level, it is removed from that level.
50  '''
51 
52  AddedSeverity=False
53  removeSeverity=-1
54 
55  allowedflags=[]
56  for i in sevLevelComputer.SeverityLevels:
57  for j in i.RecHitFlags.value():
58  if j=="":
59  continue
60  allowedflags.append(j)
61 
62  #print "Allowed flags = ",allowedflags
63  if flag not in allowedflags and verbose:
64  print("\n\n")
65  for j in range(0,3):
66  print("###################################################")
67  print("\nWARNING!!!!!! You are adding a flag \n\t'%s' \nthat is not defined in the Severity Level Computer!"%flag)
68  print("This can be EXCEPTIONALLY dangerous if you do not \nknow what you are doing!\n")
69  print("Proceed with EXTREME caution!\n")
70  for j in range(0,3):
71  print("###################################################")
72  print("\n\n")
73 
74  #Loop over severity Levels
75  for i in range(len(sevLevelComputer.SeverityLevels)):
76  Level=sevLevelComputer.SeverityLevels[i].Level.value()
77  Flags=sevLevelComputer.SeverityLevels[i].RecHitFlags.value()
78  if Level==severity: # Found the specified level
79  if (Flags==['']):
80  Flags=[flag] # Create new vector for this flag
81  else:
82  if flag not in Flags: # don't need to add flag if it's already there
83  Flags.append(flag) # append flag to existing vector
84  sevLevelComputer.SeverityLevels[i].RecHitFlags=Flags # Set new RecHitFlags vector
85  AddedSeverity=True
86  else: # Found some other level; be sure to remove flag from it
87  if flag not in Flags:
88  continue
89  else:
90  Flags.remove(flag)
91  # Removing flag leaves nothing else: need to remove this level completely
92  if len(Flags)==0 and ChanStat==['']:
93  removeSeverity=i
94  else:
95  sevLevelComputer.SeverityLevels[i].RecHitFlags=Flags
96 
97  # Remove any newly-empty levels
98  if (removeSeverity>-1):
99  sevLevelComputer.SeverityLevels.remove(sevLevelComputer.SeverityLevels[removeSeverity])
100 
101  # No existing severity level for specified severity was found;
102  # add a new one
103  if (AddedSeverity==False):
104  sevLevelComputer.SeverityLevels.append(cms.PSet(Level=cms.int32(severity),
105  RecHitFlags=cms.vstring(flag),
106  ChannelStatus=cms.vstring("")))
107  return sevLevelComputer
108 
109 
110 

References print(), and FastTimerService_cff.range.

◆ PrintLevels()

def RemoveAddSevLevel.PrintLevels (   SLComp)

Definition at line 37 of file RemoveAddSevLevel.py.

37 def PrintLevels(SLComp):
38  print("Severity Level Computer Levels and associated flags/Channel Status values:")
39  for i in SLComp.SeverityLevels:
40  print("\t Level = %i"%i.Level.value())
41  print("\t\t RecHit Flags = %s"%i.RecHitFlags.value())
42  print("\t\t Channel Status = %s"%i.ChannelStatus.value())
43  print()
44  return
45 
46 

References print().

◆ RemoveFlag()

def RemoveAddSevLevel.RemoveFlag (   sevLevelComputer,
  flag = "HFLongShort" 
)
Removes the specified flag from the Severity Level Computer,
and returns the revised Computer.

Definition at line 6 of file RemoveAddSevLevel.py.

6 def RemoveFlag(sevLevelComputer,flag="HFLongShort"):
7  ''' Removes the specified flag from the Severity Level Computer,
8  and returns the revised Computer.'''
9 
10  removeSeverity=-1 # Track which Severity Level has been modified
11 
12 
13 
14  # Loop over all levels
15  for i in range(len(sevLevelComputer.SeverityLevels)):
16  Flags=sevLevelComputer.SeverityLevels[i].RecHitFlags.value()
17  if flag not in Flags: # Flag not present for this level
18  continue
19  #Remove flag
20  Flags.remove(flag)
21  ChanStat=sevLevelComputer.SeverityLevels[i].ChannelStatus.value()
22  # Check to see if Severity Level no longer contains any useful information
23  if len(Flags)==0 and ChanStat==['']:
24  removeSeverity=i
25  else:
26  # Set revised list of flags for this severity level
27  sevLevelComputer.SeverityLevels[i].RecHitFlags=Flags
28  break
29 
30  # Removing flag results in empty severity level; remove it
31  if (removeSeverity>-1):
32  sevLevelComputer.SeverityLevels.remove(sevLevelComputer.SeverityLevels[removeSeverity])
33 
34  return sevLevelComputer
35 
36 

References FastTimerService_cff.range.

Variable Documentation

◆ flag

RemoveAddSevLevel.flag

Definition at line 116 of file RemoveAddSevLevel.py.

Referenced by HcalOnlineHarvesting._dqmEndLuminosityBlock(), SiStripDcsInfo.addBadModules(), NewTrackAction.addUserInfoToSecondary(), reco::GsfElectron.ambiguousGsfTracks(), EcalSelectiveReadoutValidation.anaDigi(), SiStripBadComponentsDQMServiceReader.analyze(), EcalRecHitsValidation.analyze(), EcalSelectiveReadoutValidation.analyzeEB(), EcalSelectiveReadoutValidation.analyzeEE(), HitParentTest.analyzeHits(), AlCaIsoTracksProducerFilter.beginRun(), AlCaLowPUHBHEMuonFilter.beginRun(), AlCaHEMuonFilter.beginRun(), AlCaHBHEMuonFilter.beginRun(), IsoTrackCalibration.beginRun(), HcalIsoTrkAnalyzer.beginRun(), CSCAFEBConnectAnalysis.bookForId(), CSCAFEBThrAnalysis.bookForId(), Phase2TrackerValidateDigi.bookLayerHistos(), TangentApproachInRPhi.calculate(), DTTracoChip.calculateAngles(), CTPPSDiamondDetId.channelName(), TotemTimingDetId.channelName(), check_files(), l1t::CaloCluster.checkClusterFlag(), cond::service::DTHVCheckByAbsoluteValues.checkCurrentStatus(), cond::service::DTHVCheckWithHysteresis.checkCurrentStatus(), RPCDCSSummary.checkDCSbit(), RPCDataCertification.checkFED(), HIPplots.CheckFileExistence(), HGCUncalibratedRecHit.checkFlag(), EcalUncalibratedRecHit.checkFlag(), FTLUncalibratedRecHit.checkFlag(), FTLRecHit.checkFlag(), HGCRecHit.checkFlag(), EcalRecHit.checkFlag(), FlagsCleanerECAL.checkFlags(), AlignmentTrackSelector.checkPrescaledHits(), EcalSelectiveReadoutValidation.checkSrApplication(), EgammaHLTNxNClusterProducer.checkStatusOfEcalRecHit(), HLTEcalResonanceFilter.checkStatusOfEcalRecHit(), HLTRegionalEcalResonanceFilter.checkStatusOfEcalRecHit(), StackingAction.ClassifyNewTrack(), RawFile.close(), SiStripMonitorTrack.clusterInfos(), ClosestApproachInRPhi.compute(), DTTime2DriftParametrization.computeDriftDistance_mean(), DTTime2DriftParametrization.computeDriftDistance_mode(), TShapeAnalysis.computeShape(), SiStripHistoId.createHistoLayer(), DreamSD.curve_LY(), dccPhiIndexOfRU(), DDIsValid(), spr.debugEcalDets(), SRBlockFormatter.DigiToRaw(), CSCValidation.doADCTiming(), FWRPZView.doCompression(), CSCValidation.doGasGain(), SiStripPopConBadComponentsHandlerFromDQM.dqmEndJob(), DTDigitizer.driftTimeFromParametrization(), EcalDumpGeometry.dumpTouch(), EBSrFlag.EBSrFlag(), spr.eECALmatrix(), EESrFlag.EESrFlag(), reco::PFCandidateElectronExtra.electronStatus(), reco::PFCandidateEGammaExtra.electronStatus(), SiStripBadStrip.encode(), EcalPerEvtLaserAnalyzer.endJob(), ZeeCalibration.endOfJob(), InvRingCalib.endOfLoop(), spr.energyECAL(), tnp::BaseTreeFiller.fill(), SiStripQualityChecker.fillDetectorStatus(), StudyCaloResponse.fillEnergy(), MELaserPrim.fillHistograms(), HLXMonitor.FillHistograms(), CaloSteppingAction.fillHit(), HLTPathSelector.filter(), HGCalTBCheckGunPostion.filter(), FWFileEntry.filterEventsWithCustomParser(), SiStripDaqInfo.findExcludedModule(), EcalSrFlag.flagName(), TrackingUtility.getBadModuleStatus(), SiStripUtility.getBadModuleStatus(), DTTracoLUTs.getBendAng(), CSCDCCFormatStatusDigi.getCSCErrorFlag(), CSCDCCFormatStatusDigi.getCSCPayloadFlag(), CSCDCCFormatStatusDigi.getCSCStatusFlag(), CSCDCCFormatStatusDigi.getDDUErrorFlag(), CSCDCCFormatStatusDigi.getDDUSummaryFlag(), CaloSteppingAction.getDepth(), SiStripTrackerMapCreator.getDetectorFlagAndComment(), Phase2TrackerMonitorDigi.getHistoId(), Phase2TrackerValidateDigi.getHistoId(), FWGeometry.getMatchedIds(), SiStripQualityChecker.getModuleStatus(), SiStripBadStripFromASCIIFile.getNewObject(), DTTracoLUTs.getPhiRad(), OMTFReconstruction.getProcessorCandidates(), EcalSimRawData.getSrfs(), cms::DDFilteredView.getValuesNS(), CSCAFEBConnectAnalysis.hf1ForId(), CSCAFEBThrAnalysis.hf1ForId(), CSCAFEBConnectAnalysis.hf2ForId(), CSCAFEBThrAnalysis.hf2ForId(), HLTAlphaTFilter< T >.hltFilter(), HcalDDDRecConstants.initialize(), StackingAction.isItFromPrimary(), HCalSD.isItinFidVolume(), StackingAction.isItPrimaryDecayProductOrConversion(), isLooseMuonCustom(), reco::MuonSegmentMatch.isMask(), StackingAction.isThisRegion(), HcalLayerDepthMap.isValid(), DTBtiChip.keepTrigPatt(), listbadmodule(), ETLUncalibRecHitAlgo.makeRecHit(), EcalUncalibRecHitRecWeightsAlgo< EBDataFrame >.makeRecHit(), BTLUncalibRecHitAlgo.makeRecHit(), EcalUncalibRecHitRecAnalFitAlgo< EBDataFrame >.makeRecHit(), HGCalUncalibRecHitRecWeightsAlgo< HGCDataFrame >.makeRecHit(), L1MuGMTMerger.merge_rank(), reco::PFCandidateElectronExtra.mvaStatus(), reco::PFCandidateEGammaExtra.mvaStatus(), spr.newECALIdEW(), spr.newECALIdNS(), DDFilteredView.nextSibling(), math::Graph< Node2, AnotherDummy2 >.nodeIndex(), HcalIsoTrkAnalyzer.notaMuon(), HGCalDDDConstants.numberCellsHexagon(), DTHVStatusHandler.offlineList(), SiStripTrackerMapCreator.paintTkMapFromAlarm(), Generator.particlePassesPrimaryCuts(), reco::GsfElectron.passingCutBasedPreselection(), reco::GsfElectron.passingPflowPreselection(), PileupJetIdentifier.passJetId(), CastorPedestalAnalysis.per2CapsHists(), HcalPedestalAnalysis.per2CapsHists(), PFRecHitQTestHCALChannel.PFRecHitQTestHCALChannel(), pos::PixelFEDConfig.PixelFEDConfig(), CTPPSDiamondDetId.planeName(), TotemTimingDetId.planeName(), HFFibreFiducial.PMTNumber(), BPHMonitor.Prescale(), SiStripActionExecutor.printFaultyModuleList(), EcalSelectiveReadoutProducer.printSrFlags(), SiStripTrackerMapCreator.printTopModules(), EgammaHLTPixelMatchElectronAlgo.process(), VertexClassifier.processesAtSimulation(), TrackClassifier.processesAtSimulation(), HcalPedestalAnalysis.processEvent(), CastorPedestalAnalysis.processEvent(), DTDataIntegrityUrosOffline.processuROS(), DTDataIntegrityTask.processuROS(), EcalDetIdToBeRecoveredProducer.produce(), OniaPhotonConversionProducer.produce(), l1t::L1ComparatorRun2.produce(), EcalDigiToRaw.produce(), reco::tau.pt_weighted_dx_T(), HGCalGeomTools.radius(), read_badmodlist(), JetPlusTrackCorrector.rebuildJta(), HFSimpleTimeCheck.reconstruct(), EcalSelectiveReadoutSuppressor.run(), ecaldqm::SelectiveReadoutTask.runOnDigis(), ecaldqm::SelectiveReadoutTask.runOnSrFlags(), NewTrackAction.secondary(), EcalFenixStripFgvbEE.setbadStripMissing(), EcalFenixStrip.setbadStripMissing(), HGCalSiNoiseMap< HGCSiliconDetId >.setCachedOp(), DTStatusFlag.setCellDead(), DTDeadFlag.setCellDead_HV(), DTDeadFlag.setCellDead_RO(), DTDeadFlag.setCellDead_TP(), DTDeadFlag.setCellDiscCat(), DTStatusFlag.setCellNoHV(), DTStatusFlag.setCellNoise(), DTHVStatusHandler.setChannelFlag(), l1t::CaloCluster.setClusterFlag(), BPHDecayConstrainedBuilder.setConstr(), BPHBdToKxMuMuBuilder.setConstr(), BPHX3872ToJPsiPiPiBuilder.setConstr(), AHCalSD.setDetUnitId(), trklet::Track.setDuplicate(), L1Analysis::L1AnalysisRecoMet.SetECALFlags(), l1t::CaloParamsHelperO2O.setEgBypassECALFG(), l1t::CaloParamsHelper.setEgBypassECALFG(), l1t::CaloParamsHelperO2O.setEgBypassEGVetos(), l1t::CaloParamsHelper.setEgBypassEGVetos(), l1t::CaloParamsHelper.setEgBypassExtHOverE(), l1t::CaloParamsHelperO2O.setEgBypassExtHOverE(), l1t::CaloParamsHelper.setEgBypassHoE(), l1t::CaloParamsHelperO2O.setEgBypassShape(), l1t::CaloParamsHelper.setEgBypassShape(), L1MuDTTrackSegPhi.setEtaFlag(), L1MuBMTrackSegPhi.setEtaFlag(), l1t::CaloParamsHelperO2O.setEtSumBypassEcalSumPUS(), l1t::CaloParamsHelper.setEtSumBypassEcalSumPUS(), l1t::CaloParamsHelperO2O.setEtSumBypassEttPUS(), l1t::CaloParamsHelper.setEtSumBypassEttPUS(), l1t::CaloParamsHelperO2O.setEtSumBypassMetPUS(), l1t::CaloParamsHelper.setEtSumBypassMetPUS(), InputGenJetsParticleSelector.setExcludeResonances(), LMFCorrCoefDat.setFlag(), LMFCorrCoefDatComponent.setFlag(), FTLRecHit.setFlag(), HGCRecHit.setFlag(), EcalRecHit.setFlag(), DTHVStatus.setFlagA(), HGCUncalibratedRecHit.setFlagBit(), EcalUncalibratedRecHit.setFlagBit(), FTLUncalibratedRecHit.setFlagBit(), DTHVStatus.setFlagC(), DTLVStatus.setFlagCFE(), DTLVStatus.setFlagCMC(), DTLVStatus.setFlagDFE(), DTLVStatus.setFlagDMC(), DTHVStatus.setFlagS(), SiPixelRecHitQuality::Packing.setHasBadPixels(), SiPixelRecHitQuality::Packing.setHasFilledProb(), pat::Photon.setHasPixelSeed(), BPHKinematicFit.setIndependentFit(), SiPixelRecHitQuality::Packing.setIsOnEdge(), l1t::CaloParamsHelperO2O.setJetBypassPUS(), l1t::CaloParamsHelper.setJetBypassPUS(), l1t::CaloParamsHelperO2O.setJetPUSUsePhiRing(), l1t::CaloParamsHelper.setJetPUSUsePhiRing(), cond::persistency::ConnectionPool.setLogging(), reco::MuonSegmentMatch.setMask(), SiPixelFolderOrganizer.setModuleFolder(), CMSFieldManager.setMonopoleTracking(), InputGenJetsParticleSelector.setPartonicFinalState(), pat::Electron.setPassConversionVeto(), pat::Photon.setPassElectronVeto(), CaloTowersCreationAlgo.setRecoveredEcalHitsAreUsed(), CaloTowersCreationAlgo.setRecoveredHcalHitsAreUsed(), cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, NTAGS >.setSingleIov(), cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >.setSingleIov(), cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 1 >.setSingleIov(), SiPixelRecHitQuality::Packing.setSpansTwoROCs(), GflashHistogram.setStoreFlag(), InputGenJetsParticleSelector.setTausAsJets(), cond::payloadInspector::PlotImpl< MULTI_IOV, 0 >.setTwoTags(), cond::payloadInspector::PlotImpl< SINGLE_IOV, 0 >.setTwoTags(), cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >.setTwoTags(), DatabasePDG.SetUseCharmParticles(), CaloTowersCreationAlgo.setUseRejectedHitsOnly(), CaloTowersCreationAlgo.setUseRejectedRecoveredEcalHits(), CaloTowersCreationAlgo.setUseRejectedRecoveredHcalHits(), EcalSrFlag.setValue(), sim::LocalFieldManager.SetVerbosity(), CTPPSPixelFramePosition.setXMLAttribute(), TotemFramePosition.setXMLAttribute(), SiPixelPhase1Base.SiPixelPhase1Base(), SortMuonSegmentMatches.SortMuonSegmentMatches(), HGCalTBMB.stopAfter(), MaterialBudget.stopAfter(), MaterialBudgetForward.stopAfter(), HGCPassive.storeInfo(), L1MuGMTLFMergeRankEtaQLUT.TheLookupFunction(), HistoryBase.traceSimHistory(), SimTrackManager.trackExists(), TangentApproachInRPhi.transverseCoord(), ClosestApproachInRPhi.transverseCoord(), CSCOfflineMonitor.typeIndex(), FTLRecHit.unsetFlag(), HGCRecHit.unsetFlag(), EcalRecHit.unsetFlag(), CaloSteppingAction.update(), L1TTestsSummary.updateL1TOccupancyMonitor(), L1TTestsSummary.updateL1TRateMonitor(), L1TTestsSummary.updateL1TSyncMonitor(), magfieldparam::BFit3D.UseSignedRad(), magfieldparam::BFit3D.UseSpline(), FastTimeTopology.valid(), HGCalTopology.valid(), HcalZDCDetId.validDetId(), and HcalTopology.validHcal().

◆ hcalRecAlgos

RemoveAddSevLevel.hcalRecAlgos

Definition at line 115 of file RemoveAddSevLevel.py.

◆ severity

RemoveAddSevLevel.severity

Definition at line 116 of file RemoveAddSevLevel.py.

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
RemoveAddSevLevel.AddFlag
def AddFlag(sevLevelComputer, flag="UserDefinedBit0", severity=10, verbose=True)
Definition: RemoveAddSevLevel.py:47
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
RemoveAddSevLevel.RemoveFlag
def RemoveFlag(sevLevelComputer, flag="HFLongShort")
Definition: RemoveAddSevLevel.py:6
RemoveAddSevLevel.PrintLevels
def PrintLevels(SLComp)
Definition: RemoveAddSevLevel.py:37