test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 54 of file makeHLTPrescaleTable.py.

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

Definition at line 66 of file makeHLTPrescaleTable.py.

References cmsRelvalreport.exit.

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

Variable Documentation

string makeHLTPrescaleTable.action = "append"

Definition at line 29 of file makeHLTPrescaleTable.py.

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

Definition at line 114 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.all_hlt_path_names_seen = set()

Definition at line 108 of file makeHLTPrescaleTable.py.

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

Definition at line 131 of file makeHLTPrescaleTable.py.

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

Definition at line 192 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.csv_output_file = args[0]

Definition at line 47 of file makeHLTPrescaleTable.py.

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

Definition at line 179 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.default = []

Definition at line 28 of file makeHLTPrescaleTable.py.

string makeHLTPrescaleTable.dest = "pathPatterns"

Definition at line 27 of file makeHLTPrescaleTable.py.

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

Definition at line 177 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 31 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.hlt_key = runKeys[run]

Definition at line 199 of file makeHLTPrescaleTable.py.

dictionary makeHLTPrescaleTable.hlt_path_names_table = {}

Definition at line 105 of file makeHLTPrescaleTable.py.

int makeHLTPrescaleTable.index = 1

Definition at line 118 of file makeHLTPrescaleTable.py.

string makeHLTPrescaleTable.metavar = "PATTERN"

Definition at line 30 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 6 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.prescales = prescaleTable[hlt_key]

Definition at line 249 of file makeHLTPrescaleTable.py.

Referenced by IsoTrig.analyze(), HLTEventAnalyzerAOD.analyzeTrigger(), LumiProducer.fillLSCache(), PrescalerFHN.filter(), PrescalerFHN.init(), PrescalerFHN.PrescalerFHN(), edm::service::PrescaleService.PrescaleService(), CandidateTriggerObjectProducer.produce(), and lumi::HLTV32DB.writeHltDataToSchema2().

dictionary makeHLTPrescaleTable.prescaleTable = {}

Definition at line 102 of file makeHLTPrescaleTable.py.

makeHLTPrescaleTable.previous_hlt_key = None

Definition at line 175 of file makeHLTPrescaleTable.py.

tuple makeHLTPrescaleTable.process = getProcessObjectFromConfDB(hlt_key)

Definition at line 123 of file makeHLTPrescaleTable.py.

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

Definition at line 98 of file makeHLTPrescaleTable.py.

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

Definition at line 110 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.tmp = []

Definition at line 152 of file makeHLTPrescaleTable.py.

list makeHLTPrescaleTable.values = [ run , '' ]

Definition at line 222 of file makeHLTPrescaleTable.py.

Referenced by edm::helper::Filler< Association< C > >.add(), SiStripSummaryBuilder.analyze(), TtSemiLepJetCombMVATrainer.analyze(), HcalAutoPedestalValidator.analyze(), HcalPedestalsCheck.analyze(), SiStripCMMonitorPlugin.analyze(), TaggingVariablePlotter.analyzeTag(), HDQMInspector.ApplyConditions(), WriteOneGeometryFromXML.beginRun(), cond::IOVEditor.bulkAppend(), TrackingUtility.checkME(), SiPixelUtility.checkME(), SiStripUtility.checkME(), LXXXCorrector.correction(), L1FastjetCorrector.correction(), L1JPTOffsetCorrector.correction(), L1OffsetCorrector.correction(), L6SLBCorrector.correction(), DigiToRecoNoPU.customise(), DigiToRecoPU.customise(), ProcessFromBareGEN_cff.customise(), edm::soahelper::SoATupleHelper< I, Args >.destroy(), EcalCondDBReader.dqmEndJob(), ErrorsAnalyzer.drawHistograms(), ErrorsPropagationAnalyzer.drawHistograms(), CastorDbASCIIIO.dumpCastorObject(), dumpHcalObject(), CastorDbXml.dumpObject(), HcalDbXml.dumpObject(), edm::SoATuple< edm::EDConsumerBase::TokenLookupInfo, bool, edm::EDConsumerBase::LabelPlacement, edm::KindOfType >.emplace_back(), SimpleValueVectorVariable< TYPE >.eval(), evaluateTtFullHadSignalSel(), evaluateTtSemiLepSignalSel(), magneticfield::VolumeBasedMagneticFieldESProducer.expandList(), edm::helper::Filler< Association< C > >.fill(), GEDGsfElectronProducer.fillGsfElectronValueMap(), PFElectronTranslator.fillMVAValueMap(), GoodSeedProducer.fillPreIdRefValueMap(), PFElectronTranslator.fillSCRefValueMap(), PFLinker.fillValueMap(), ElectronIdMVAProducer.filter(), FsmwClusterizer1DNameSpace.fsmw(), L1TOccupancyClient.getAvrg(), MuonErrorMatrix.getFast(), metsig::SignAlgoResolutions.getfunc(), HcalDbOnline.getObject(), HcalDbPoolOCCI.getObjectGeneric(), PerformancePayloadFromBinnedTFormula.getResult(), PerformancePayloadFromTFormula.getResult(), edm::MultiAssociation< C >.getValues(), gen::JetMatchingMadgraph.init(), gen::JetMatchingMGFastJet.init(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >.init(), edm::helper::Filler< Association< C > >.insert(), makeTKTrend(), PFCandidateMixer.mix(), MuonErrorMatrix.MuonErrorMatrix(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >.operator()(), pos::PixelCalibConfiguration.PixelCalibConfiguration(), MatrixInjector.MatrixInjector.prepare(), DDLRotationByAxis.processElement(), AssociationVector2ValueMap< KeyRefProd, CVal >.produce(), magneticfield::VolumeBasedMagneticFieldESProducer.produce(), EcalBasicClusterLocalContCorrectionsESProducer.produce(), ElectronIDExternalProducer< algo >.produce(), MuonSelectionTypeValueMapProducer.produce(), TtSemiLepJetCombMVAComputer.produce(), ColinsSoperVariablesComputer.produce(), ObjectMultiplicityCounter< T >.produce(), ElectronPATIdMVAProducer.produce(), OtherObjectVariableComputer< T >.produce(), NearbyCandCountComputer.produce(), ElectronConversionRejectionVars.produce(), EcalGlobalShowerContainmentCorrectionsVsEtaESProducer.produce(), EcalShowerContainmentCorrectionsESProducer.produce(), CosmicsMuonIdProducer.produce(), DeltaRNearestObjectComputer< T >.produce(), GEDPhotonProducer.produce(), JetDeltaRValueMapProducer< T >.produce(), CocoaAnalyzer.ReadXMLFile(), DTOccupancyTest.runOccupancyTest(), DQMHistoryServiceBase.scanTreeAndFillSummary(), DTRecoUncertainties.set(), GenEventInfoProduct.setBinningValues(), GenEventInfoProduct.setDJR(), sistrip::FEDStripData::ChannelData.setMedians(), DDLMaterial.setReference(), DDLSolid.setReference(), cmsHarvester.singlify_datasets(), python.XML2Python.TreeBuilder.topLevel(), XML2Python.TreeBuilder.topLevel(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >.train(), and CombinedKinematicConstraint.value().