CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
makeHLTPrescaleTable Namespace Reference

Functions

def getPrescaleTableFromProcessObject
 
def getProcessObjectFromConfDB
 

Variables

string action = "append"
 
tuple all_hlt_keys_seen = set(runKeys.values())
 
tuple all_hlt_path_names_seen = set()
 
tuple all_path_names = set(process.paths.keys())
 
list column_names = [ 'run','' ]
 
list csv_output_file = args[0]
 
tuple csv_writer = csv.writer(fout,delimiter=";")
 
list default = []
 
string dest = "pathPatterns"
 
tuple fout = open(csv_output_file,"w")
 
string help = "restrict paths to PATTERN. Note that this can be a single path name or a pattern "
 
list hlt_key = runKeys[run]
 
dictionary hlt_path_names_table = {}
 
int index = 1
 
string metavar = "PATTERN"
 
tuple parser
 
list prescales = prescaleTable[hlt_key]
 
dictionary prescaleTable = {}
 
 previous_hlt_key = None
 
tuple process = getProcessObjectFromConfDB(hlt_key)
 
tuple runKeys = queryRR(options.firstRun,options.lastRun,options.groupName)
 
tuple runs = sorted(runKeys.keys())
 
list tmp = []
 
list values = [ run , '' ]
 

Function Documentation

def makeHLTPrescaleTable.getPrescaleTableFromProcessObject (   process)
returns a dict of hlt key to vector of prescales
mapping 

Definition at line 56 of file makeHLTPrescaleTable.py.

56 
58  """ returns a dict of hlt key to vector of prescales
59  mapping """
60 
61  retval = {}
62  for entry in process.PrescaleService.prescaleTable:
63  retval[entry.pathName.value()] = entry.prescales.value()
64 
65  return retval
66 
67 #----------------------------------------------------------------------
def makeHLTPrescaleTable.getProcessObjectFromConfDB (   hlt_key)

Definition at line 68 of file makeHLTPrescaleTable.py.

References beamvalidation.exit(), and print().

68 
69 def getProcessObjectFromConfDB(hlt_key):
70  # print >> stderr,"\t%s ..." % hlt_key
71  cmd = "edmConfigFromDB --orcoff --configName " + hlt_key
72  # print >> stderr, "cmd=",cmd
73  res = subprocess.getoutput(cmd)
74 
75  # potentially dangerous: we're running python code here
76  # which we get from an external process (confDB).
77  # we trust that there are no file deletion commands
78  # in the HLT configurations...
79 
80  # for some keys, edmConfigFromDB seems to produce error messages.
81  # just return None in this case
82  try:
83  exec(res)
84  except:
85  return None
86 
87  return process
88 
#----------------------------------------------------------------------

Variable Documentation

string makeHLTPrescaleTable.action = "append"

Definition at line 31 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.all_hlt_keys_seen = set(runKeys.values())

Definition at line 116 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.all_hlt_path_names_seen = set()

Definition at line 110 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.all_path_names = set(process.paths.keys())

Definition at line 133 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.column_names = [ 'run','' ]

Definition at line 194 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.csv_output_file = args[0]

Definition at line 49 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.csv_writer = csv.writer(fout,delimiter=";")

Definition at line 181 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.default = []

Definition at line 30 of file makeHLTPrescaleTable.py.

string makeHLTPrescaleTable.dest = "pathPatterns"

Definition at line 29 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.fout = open(csv_output_file,"w")

Definition at line 179 of file makeHLTPrescaleTable.py.

string makeHLTPrescaleTable.help = "restrict paths to PATTERN. Note that this can be a single path name or a pattern "

Definition at line 33 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.hlt_key = runKeys[run]

Definition at line 201 of file makeHLTPrescaleTable.py.

dictionary makeHLTPrescaleTable.hlt_path_names_table = {}

Definition at line 107 of file makeHLTPrescaleTable.py.

int makeHLTPrescaleTable.index = 1

Definition at line 120 of file makeHLTPrescaleTable.py.

string makeHLTPrescaleTable.metavar = "PATTERN"

Definition at line 32 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.parser
Initial value:
1 = OptionParser(usage=
2 """usage: %prog [options] csv_output_fileexamples: %prog out.csv produces a table of ALL runs and ALL paths (can take quite some time) %prog --path='*ele*' --path='*photon*' out.csv select only paths containing 'ele' and 'photon'""")

Definition at line 8 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.prescales = prescaleTable[hlt_key]

Definition at line 251 of file makeHLTPrescaleTable.py.

Referenced by L1TGlobalSummary.analyze(), l1t::GtRecordDump.analyze(), IsoTrig.analyze(), HLTEventAnalyzerAOD.analyzeTrigger(), L1TdeStage2uGT.bookHistograms(), L1TGlobalSummary.endRun(), LumiProducer.fillLSCache(), PrescalerFHN.filter(), L1TGlobalPrescaler.filter(), PrescalerFHN.init(), GenericTriggerEventFlag.initRun(), L1TGlobalPrescalesVetosESProducer.L1TGlobalPrescalesVetosESProducer(), L1TGlobalPrescalesVetosOnlineProd.newObject(), PrescalerFHN.PrescalerFHN(), edm::service::PrescaleService.PrescaleService(), CandidateTriggerObjectProducer.produce(), DeDxHitInfoProducer.produce(), JsonOutputProducer::JsonConfiguration.serialise(), and lumi::HLTV32DB.writeHltDataToSchema2().

dictionary makeHLTPrescaleTable.prescaleTable = {}

Definition at line 104 of file makeHLTPrescaleTable.py.

makeHLTPrescaleTable.previous_hlt_key = None

Definition at line 177 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.process = getProcessObjectFromConfDB(hlt_key)

Definition at line 125 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.runKeys = queryRR(options.firstRun,options.lastRun,options.groupName)

Definition at line 100 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.runs = sorted(runKeys.keys())

Definition at line 112 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.tmp = []

Definition at line 154 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.values = [ run , '' ]

Definition at line 224 of file makeHLTPrescaleTable.py.

Referenced by alignment.Alignment.__testDbExist(), Config.Process._dumpConfigESPrefers(), data_formats._to_datatables(), edm::helper::Filler< Association< C > >.add(), SiStripOnTrackClusterTableProducerBase.addColumn(), SiStripSummaryBuilder.analyze(), HcalAutoPedestalValidator.analyze(), HcalPedestalsCheck.analyze(), PhotonMVANtuplizer.analyze(), ElectronMVANtuplizer.analyze(), SiStripCMMonitorPlugin.analyze(), TaggingVariablePlotter.analyzeTag(), AlignmentTask.buildFixedDetectorsConstraints(), SiPixelUtility.checkME(), TrackingUtility.checkME(), SiStripUtility.checkME(), LXXXCorrector.correction(), L1FastjetCorrector.correction(), L1JPTOffsetCorrector.correction(), L1OffsetCorrector.correction(), L6SLBCorrector.correction(), LXXXCorrectorImpl.correction(), L1FastjetCorrectorImpl.correction(), L1OffsetCorrectorImpl.correction(), L1JPTOffsetCorrectorImpl.correction(), L6SLBCorrectorImpl.correction(), JME::JetParameters.createVector(), DigiToRecoPU.customise(), ProcessFromBareGEN_cff.customise(), DigiToRecoNoPU.customise(), earlyDeleteSettings_cff.customiseEarlyDelete(), logErrorHarvester_cff.customiseLogErrorHarvesterUsingOutputCommands(), customiseTrackingNtuple.customiseTrackingNtupleTool(), edm::soahelper::SoATupleHelper< I, Args >.destroy(), EcalCondDBReader.dqmEndRun(), ErrorsAnalyzer.drawHistograms(), ErrorsPropagationAnalyzer.drawHistograms(), CastorDbASCIIIO.dumpCastorObject(), dumpHcalObject(), CastorDbXml.dumpObject(), HcalDbXml.dumpObject(), edm::SoATuple< edm::EDConsumerBase::TokenLookupInfo, bool, edm::EDConsumerBase::LabelPlacement, edm::KindOfType >.emplace_back(), DTT0Calibration.endJob(), SimpleValueVectorVariable< TYPE >.eval(), evaluateTtFullHadSignalSel(), evaluateTtSemiLepSignalSel(), MagFieldConfig.expandList(), edm::helper::Filler< Association< C > >.fill(), PFElectronTranslator.fillMVAValueMap(), GEDPhotonProducer.fillPhotonCollection(), GoodSeedProducer.fillPreIdRefValueMap(), LowPtGsfElectronSeedProducer.fillPreIdRefValueMap(), PFElectronTranslator.fillSCRefValueMap(), PFLinker.fillValueMap(), SummaryTableOutputBranches.fillVectorBranches(), ElectronIdMVAProducer.filter(), FsmwClusterizer1DNameSpace.fsmw(), L1TOccupancyClient.getAvrg(), MuonErrorMatrix.getFast(), metsig::SignAlgoResolutions.getfunc(), PerformancePayloadFromBinnedTFormula.getResult(), PerformancePayloadFromTFormula.getResult(), edm::MultiAssociation< C >.getValues(), HcalMahiPulseOffsetsGPU.HcalMahiPulseOffsetsGPU(), gen::JetMatchingMadgraph.init(), gen::JetMatchingMGFastJet.init(), edm::helper::Filler< Association< C > >.insert(), MagFieldConfig.MagFieldConfig(), makeTKTrend(), MuonErrorMatrix.MuonErrorMatrix(), PPSTimingCalibrationESSource.parsePPSDiamondJsonFile(), PPSTimingCalibrationESSource.parseTotemUFSDJsonFile(), pos::PixelCalibConfiguration.PixelCalibConfiguration(), DDLRotationByAxis.processElement(), GEDGsfElectronValueMapProducer.produce(), ElectronSeedTrackRefFix.produce(), AssociationVector2ValueMap< KeyRefProd, CVal >.produce(), TtSemiLepJetCombMVAComputer.produce(), ElectronIDExternalProducer< algo >.produce(), ProbeMulteplicityProducer.produce(), ChargedHadronPFTrackIsolationProducer.produce(), EcalBasicClusterLocalContCorrectionsESProducer.produce(), MuonSelectionTypeValueMapProducer.produce(), ElectronPATIdMVAProducer.produce(), ColinsSoperVariablesComputer.produce(), ObjectMultiplicityCounter< T >.produce(), OtherObjectVariableComputer< T >.produce(), NearbyCandCountComputer.produce(), EcalGlobalShowerContainmentCorrectionsVsEtaESProducer.produce(), EcalShowerContainmentCorrectionsESProducer.produce(), PuppiPhoton.produce(), CosmicsMuonIdProducer.produce(), PuppiProducer.produce(), DeltaRNearestObjectComputer< T >.produce(), JetDeltaRValueMapProducer< T, C >.produce(), GEDPhotonProducer.produce(), popcon::EcalTPGTPModeHandler.readtxtFile(), CocoaAnalyzer.readXMLFile(), DTRecoUncertainties.set(), DTRecoConditions.set(), GenEventInfoProduct.setBinningValues(), GenEventInfoProduct.setDJR(), sistrip::FEDStripData::ChannelData.setMedians(), DDLMaterial.setReference(), DDLSolid.setReference(), cmsHarvester.singlify_datasets(), python.XML2Python.TreeBuilder.topLevel(), XML2Python.TreeBuilder.topLevel(), and CombinedKinematicConstraint.value().