CMS 3D CMS Logo

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

Functions

def format
 
def getDictFromObject
 
def getPieceFromObject
 

Variables

string action = "store_true"
 
tuple cFile = re.sub(r'_C$', r'.C', re.sub(r'\.so$','', shlib))
 
list diff = diffColl[index]
 
tuple diffColl = getPieceFromObject(tree, name+'.diff')
 
tuple diffContRE = re.compile(r'^class goDiffCont_(\w+)')
 
int epsilon = 1
 
list firstOnly = firstOnlyColl[index]
 
tuple firstOnlyColl = getPieceFromObject(tree, name + '.firstOnly')
 
string help = "Show deltas when difference is large enough."
 
tuple index = getDictFromObject(firstOnly, indexSingleDict)
 
dictionary indexDoubleDict = {'index':'index', 'delta_index':'delta_index'}
 
dictionary indexSingleDict = {'index':'index'}
 
tuple info = getDictFromObject(firstOnly, infoSingleDict)
 
dictionary infoDoubleDict = {}
 
dictionary infoSingleDict = {}
 
tuple match = diffContRE.search(line)
 
string name = ''
 
tuple parser = optparse.OptionParser("Usage: %prog bla.root lib.so var1 [var2]")
 
tuple rootfile = ROOT.TFile.Open(rootFilename)
 
tuple rootFilename = args.pop(0)
 
tuple runevent = getDictFromObject(tree, runeventDict, 'runevent')
 
dictionary runeventDict = {'Run':'run', 'Event':'event'}
 
list secondOnly = secondOnlyColl[index]
 
tuple secondOnlyColl = getPieceFromObject(tree, name + '.secondOnly')
 
tuple shlib = args.pop(0)
 
tuple size = tree.GetEntries()
 
tuple source = open(cFile, 'r')
 
tuple stringSet = set()
 
tuple tree = rootfile.Get('diffTree')
 
tuple typeFoundSet = set()
 
dictionary variableREDict = {}
 
 variables = args
 
list working = []
 

Function Documentation

def diffTreeTool.format (   objDict,
  label,
  spacing = 9,
  firstOnly = False 
)
return a formatted string for given object

Definition at line 26 of file diffTreeTool.py.

References abs.

26 
27 def format (objDict, label, spacing=9, firstOnly = False):
28  '''return a formatted string for given object'''
29  value = objDict[label]
30  if firstOnly:
31  diff = 0.
32  else:
33  diff = objDict['delta_' + label]
34 
35  problem = False
36  if isinstance (value, float):
37  formatString = '%%%d.%df' % (spacing, spacing - 5)
38  retval = formatString % value
39  if abs(diff) > epsilon:
40  if options.delta:
41  retval += ' [' + formatString % (diff) + ']'
42  else:
43  retval += ' (' + formatString % (value + diff) + ')'
44  elif not firstOnly:
45  retval += ' ' * (spacing + 3)
46  return retval
47  else:
48  formatString = '%%%ds' % spacing
49  retval = formatString % value
50  if diff:
51  if isinstance (value, str):
52  retval += ' (' + formatString % diff + ')'
53  elif options.delta:
54  retval += ' [' + formatString % diff + ']'
55  else:
56  retval += ' (' + formatString % (value + diff) + ')'
57  elif not firstOnly:
58  retval += ' ' * (spacing + 3)
59  return retval
60 
#define abs(x)
Definition: mlp_lapack.h:159
def diffTreeTool.getDictFromObject (   obj,
  varDict,
  prefix = '' 
)
Given a object and a prefix, fills an return dictionary with the
proper values

Definition at line 15 of file diffTreeTool.py.

15 
16 def getDictFromObject (obj, varDict, prefix = ''):
17  """Given a object and a prefix, fills an return dictionary with the
18  proper values"""
19  if prefix:
20  obj = getPieceFromObject (obj, prefix)
21  retval = {}
22  for key, description in varDict.iteritems():
23  retval[key] = getPieceFromObject (obj, description)
24  return retval
25 
def getDictFromObject
Definition: diffTreeTool.py:15
def diffTreeTool.getPieceFromObject (   obj,
  description 
)
Returns piece from object 

Definition at line 10 of file diffTreeTool.py.

10 
11 def getPieceFromObject (obj, description):
12  """Returns piece from object """
13  parsed = GenObject.parseVariableTofill (description)
14  return GenObject.evaluateFunction (obj, parsed)
def getPieceFromObject
Definition: diffTreeTool.py:10

Variable Documentation

string diffTreeTool.action = "store_true"

Definition at line 64 of file diffTreeTool.py.

tuple diffTreeTool.cFile = re.sub(r'_C$', r'.C', re.sub(r'\.so$','', shlib))

Definition at line 80 of file diffTreeTool.py.

list diffTreeTool.diff = diffColl[index]

Definition at line 194 of file diffTreeTool.py.

Referenced by edm::CountAndLimit.add(), BetaCalculatorECAL.addStepToXtal(), L1Scalers.analyze(), PFJetAnalyzer.analyze(), JetAnalyzer.analyze(), IsolatedTracksNxN.analyze(), FWTrackResidualDetailView.build(), PFClusterAlgo.buildPFClusters(), BxTiming.calcBxDiff(), GsfVertexWeightCalculator.calculate(), ClusterShapeAlgo.Calculate_EnergyDepTopology(), popcon::EcalLaserHandler.checkAPDPN(), HcalLogicalMap.checkElectronicsHashIds(), HcalLogicalMap.checkHashIds(), MuonGeometryArrange.compareGeometries(), TrackerGeometryCompare.compareGeometries(), VertexDistance3D.compatibility(), VertexDistanceXY.compatibility(), MuonTrackResidualAnalyzer.computeResolution(), rpcrawtodigi::EventRecords.dataToTriggerDelay(), AlphaTVarProducer.deltaHt(), HLTHemiDPhiFilter.deltaPhi(), IsolatedGenParticles.DeltaPhi(), HLTEcalResonanceFilter.DeltaPhi(), IsolatedTracksCone.DeltaPhi(), IsolatedTracksNxN.DeltaPhi(), ALIUtils.diff2pi(), OpticalObject.diff2pi(), TrackerGeometryCompare.diffCommonTrackerSystem(), TangentCircle.direction(), VertexDistance3D.distance(), VertexDistanceXY.distance(), CSCOfflineMonitor.doEfficiencies(), CSCValidation.doEfficiencies(), CSCOfflineMonitor.doOccupancies(), CSCValidation.doOccupancies(), CSCOfflineMonitor.doStripDigis(), CSCValidation.doStripDigis(), SiStripRecHitMatcher.doubleMatch(), DTTrigGeom.dumpLUT(), edm::service.ELrecv(), HOCalibAnalyzer.endJob(), L1TRPCTF.endRun(), fireworks.energyTower3DCorners(), ALIUtils.eq2ang(), OpticalObject.eq2ang(), fireworks.etTower3DCorners(), PedestalsTask.fill(), CSCEfficiency.fillStrips_info(), MuonTimingFiller.fillTimeFromMeasurements(), CSCTimingExtractor.fillTiming(), DTTimingExtractor.fillTiming(), DTHVStatusHandler.filterData(), TwoTrackMinimumDistanceHelixLine.finalPoints(), CSCMake2DRecHit.findWireBx(), MuonKinkFinder.getChi2(), MatcherUsingTracksAlgorithm.getChi2(), EcalClusterTools.getEnergyDepTopology(), DTTimeBoxFitter.getFitSeeds(), HelixBarrelPlaneCrossing2OrderLocal.HelixBarrelPlaneCrossing2OrderLocal(), ThirdHitPredictionFromCircle.invCenterOnAxis(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy.iterativeSearch(), SiStripHotStripAlgorithmFromClusterOccupancy.iterativeSearch(), GlobalTrackQualityProducer.kink(), MuonGeometryArrange.makeGraph(), GSRecHitMatcher.match(), MatcherByPullsAlgorithm.match(), SiStripRecHitMatcher.match(), alpha_T.minimum_deltaSumPT(), RKOne4OrderStep< T, N >.operator()(), CSCThrTurnOnFcn.operator()(), HcalTrigPrimMonitor.processEvent(), CSCTFPtMethods.Pt2StnChiSq(), CSCTFPtMethods.Pt3StnChiSq(), DTSurvey.ReadChambers(), L1MuDTEUX.run(), SimpleL1MuGMTCand.setEta(), DQMNet.setOrder(), SimpleL1MuGMTCand.setPhi(), SimpleL1MuGMTCand.setPt(), CSCSegAlgoShowering.showerSeg(), VertexDistanceXY.signedDistance(), VertexDistance3D.signedDistance(), RK4PreciseStep.stepWithAccuracy(), ThirdHitPredictionFromCircle.ThirdHitPredictionFromCircle(), CSCFitAFEBThr.ThresholdNoise(), GflashG4Watcher.update(), reco::GhostTrackVertexFinder.vertexCompat(), vtxMean(), SiStripTemplate.xtemp3d_int(), SiPixelTemplate.xtemp3d_int(), and SiPixelTemplate.ytemp3d_int().

tuple diffTreeTool.diffColl = getPieceFromObject(tree, name+'.diff')

Definition at line 185 of file diffTreeTool.py.

tuple diffTreeTool.diffContRE = re.compile(r'^class goDiffCont_(\w+)')

Definition at line 86 of file diffTreeTool.py.

int diffTreeTool.epsilon = 1

Definition at line 8 of file diffTreeTool.py.

list diffTreeTool.firstOnly = firstOnlyColl[index]

Definition at line 158 of file diffTreeTool.py.

tuple diffTreeTool.firstOnlyColl = getPieceFromObject(tree, name + '.firstOnly')

Definition at line 149 of file diffTreeTool.py.

string diffTreeTool.help = "Show deltas when difference is large enough."

Definition at line 65 of file diffTreeTool.py.

tuple diffTreeTool.index = getDictFromObject(firstOnly, indexSingleDict)

Definition at line 159 of file diffTreeTool.py.

dictionary diffTreeTool.indexDoubleDict = {'index':'index', 'delta_index':'delta_index'}

Definition at line 135 of file diffTreeTool.py.

dictionary diffTreeTool.indexSingleDict = {'index':'index'}

Definition at line 134 of file diffTreeTool.py.

tuple diffTreeTool.info = getDictFromObject(firstOnly, infoSingleDict)

Definition at line 161 of file diffTreeTool.py.

dictionary diffTreeTool.infoDoubleDict = {}

Definition at line 137 of file diffTreeTool.py.

dictionary diffTreeTool.infoSingleDict = {}

Definition at line 136 of file diffTreeTool.py.

tuple diffTreeTool.match = diffContRE.search(line)

Definition at line 99 of file diffTreeTool.py.

tuple diffTreeTool.name = ''

Definition at line 95 of file diffTreeTool.py.

tuple diffTreeTool.parser = optparse.OptionParser("Usage: %prog bla.root lib.so var1 [var2]")

Definition at line 62 of file diffTreeTool.py.

tuple diffTreeTool.rootfile = ROOT.TFile.Open(rootFilename)

Definition at line 126 of file diffTreeTool.py.

tuple diffTreeTool.rootFilename = args.pop(0)

Definition at line 74 of file diffTreeTool.py.

tuple diffTreeTool.runevent = getDictFromObject(tree, runeventDict, 'runevent')

Definition at line 146 of file diffTreeTool.py.

dictionary diffTreeTool.runeventDict = {'Run':'run', 'Event':'event'}

Definition at line 133 of file diffTreeTool.py.

list diffTreeTool.secondOnly = secondOnlyColl[index]

Definition at line 176 of file diffTreeTool.py.

tuple diffTreeTool.secondOnlyColl = getPieceFromObject(tree, name + '.secondOnly')

Definition at line 167 of file diffTreeTool.py.

tuple diffTreeTool.shlib = args.pop(0)

Definition at line 75 of file diffTreeTool.py.

tuple diffTreeTool.size = tree.GetEntries()

Definition at line 132 of file diffTreeTool.py.

tuple diffTreeTool.source = open(cFile, 'r')

Definition at line 92 of file diffTreeTool.py.

tuple diffTreeTool.stringSet = set()

Definition at line 93 of file diffTreeTool.py.

tuple diffTreeTool.tree = rootfile.Get('diffTree')

Definition at line 129 of file diffTreeTool.py.

Referenced by DeDxDiscriminatorLearnerFromCalibTree.algoAnalyzeTheTree(), SiStripGainFromCalibTree.algoAnalyzeTheTree(), DumpFWRecoGeometry.analyze(), DumpFWTGeoRecoGeometry.analyze(), RivetHarvesting.analyze(), HcalIsoTrkAnalyzer.analyze(), JetTagMVATreeTrainer.analyze(), HcalIsoTrkAnalyzer.beginJob(), AlignmentMonitorSurvey.book(), FFTJetPatRecoProducer.buildDenseProduct(), ConstrainedTreeBuilderT.buildRealTree(), FFTJetPatRecoProducer.buildSparseProduct(), FinalTreeBuilder.buildTree(), ConstrainedTreeBuilder.buildTree(), SiPixelFedCablingMap.cablingTree(), pftools::Exercises3.calibrateCalibratables(), pftools::CalibCompare.calibrateCalibratables(), fwlite::ChainEvent.ChainEvent(), SiStripBackplaneCalibration.createFromTree(), SiPixelLorentzAngleCalibration.createFromTree(), SiStripLorentzAngleCalibration.createFromTree(), fwlite::DataGetterHelper.DataGetterHelper(), TrackerOfflineValidationSummary.endJob(), TrackerOfflineValidation.endJob(), fwlite::EventSetup.exists(), edm::RootOutputFile.finishEndFile(), pkg.AbstractPkg.generate(), HPDNoiseReader.HPDNoiseReader(), FWGeometry.loadMap(), edm.numEntries(), DQMRootOutputModule.openFile(), KinematicVertex.operator reco::Vertex(), JetTagMVAExtractor.process(), RootTreeHandler.readTree(), fwlite::EventSetup.recordID(), HcalDetDiagNoiseMonitor.SaveRates(), HcalDetDiagLEDMonitor.SaveReference(), HcalDetDiagPedestalMonitor.SaveReference(), HcalDetDiagLaserMonitor.SaveReference(), PVFitter.setTree(), fftjetcms.sparsePeakTreeToStorable(), TransientTrackKinematicParticle.TransientTrackKinematicParticle(), LagrangeChildUpdator.update(), VirtualKinematicParticle.VirtualKinematicParticle(), MillePedeVariablesIORoot.writeMillePedeVariables(), RootTreeHandler.writeTree(), SiStripBackplaneCalibration.writeTree(), SiStripLorentzAngleCalibration.writeTree(), SiPixelLorentzAngleCalibration.writeTree(), and JetTagMVAExtractor::Tree.~Tree().

tuple diffTreeTool.typeFoundSet = set()

Definition at line 94 of file diffTreeTool.py.

dictionary diffTreeTool.variableREDict = {}

Definition at line 88 of file diffTreeTool.py.

diffTreeTool.variables = args

Definition at line 76 of file diffTreeTool.py.

list diffTreeTool.working = []

Definition at line 115 of file diffTreeTool.py.