CMS 3D CMS Logo

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

Classes

class  matplotRender
 

Functions

def guessInstLumiUnit
 
def guessLumiUnit
 

Variables

 batchonly = False
 
tuple f = open('/afs/cern.ch/cms/lumi/www/plots/operation/totallumivsrun-2011.csv','r')
 
tuple fig = Figure(figsize=(7.2,5.4),dpi=120)
 
tuple m = matplotRender(fig)
 
tuple reader = csv.reader(f,delimiter=',')
 
list resultlines = []
 

Detailed Description

Specs:
-- We use matplotlib OO class level api, we do not use its high-level helper modules. Favor endured stability over simplicity. 
-- PNG as default batch file format
-- we support http mode by sending string buf via meme type image/png. Sending a premade static plot to webserver is considered a uploading process instead of http dynamic graphical mode. 

Function Documentation

def matplotRender.guessInstLumiUnit (   t)
input : largest total lumivalue
output: (unitstring,denomitor)

Definition at line 34 of file matplotRender.py.

Referenced by matplotRender.matplotRender.plotPeakPerday_Time().

34 
35 def guessInstLumiUnit(t):
36  '''
37  input : largest total lumivalue
38  output: (unitstring,denomitor)
39  '''
40  unitstring='$\mu$b$^{-1}$s$^{-1}$'
41  denomitor=1.0
42  if t>=1.0e3 and t<1.0e06:
43  denomitor=1.0e3
44  unitstring='nb$^{-1}$s$^{-1}$'
45  elif t>=1.0e6 and t<1.0e9:
46  denomitor=1.0e6
47  unitstring='pb$^{-1}$s$^{-1}$'
48  elif t>=1.0e9 and t<1.0e12:
49  denomitor=1.0e9
50  unitstring='fb$^{-1}$s$^{-1}$'
51  elif t>=1.0e12 and t<1.0e15:
52  denomitor=1.0e12
53  unitstring='ab$^{-1}$s$^{-1}$'
54  elif t<=1.0e-3 and t>1.0e-6: #left direction
55  denomitor=1.0e-3
56  unitstring='mb$^{-1}$s$^{-1}$'
57  elif t<=1.0e-6 and t>1.0e-9:
58  denomitor=1.0e-6
59  unitstring='b$^{-1}$s$^{-1}$'
60  elif t<=1.0e-9 and t>1.0e-12:
61  denomitor=1.0e-9
62  unitstring='kb$^{-1}$s$^{-1}$'
63  return (unitstring,denomitor)
def matplotRender.guessLumiUnit (   t)
input : largest total lumivalue
output: (unitstring,denomitor)

Definition at line 64 of file matplotRender.py.

Referenced by matplotRender.matplotRender.plotInst_RunLS(), matplotRender.matplotRender.plotPerdayX_Time(), matplotRender.matplotRender.plotSumX_Fill(), matplotRender.matplotRender.plotSumX_Run(), and matplotRender.matplotRender.plotSumX_Time().

64 
65 def guessLumiUnit(t):
66  '''
67  input : largest total lumivalue
68  output: (unitstring,denomitor)
69  '''
70  unitstring='$\mu$b$^{-1}$'
71  denomitor=1.0
72  if t>=1.0e3 and t<1.0e06:
73  denomitor=1.0e3
74  unitstring='nb$^{-1}$'
75  elif t>=1.0e6 and t<1.0e9:
76  denomitor=1.0e6
77  unitstring='pb$^{-1}$'
78  elif t>=1.0e9 and t<1.0e12:
79  denomitor=1.0e9
80  unitstring='fb$^{-1}$'
81  elif t>=1.0e12 and t<1.0e15:
82  denomitor=1.0e12
83  unitstring='ab$^{-1}$'
84  elif t<=1.0e-3 and t>1.0e-6: #left direction
85  denomitor=1.0e-3
86  unitstring='mb$^{-1}$'
87  elif t<=1.0e-6 and t>1.0e-9:
88  denomitor=1.0e-6
89  unitstring='b$^{-1}$'
90  elif t<=1.0e-9 and t>1.0e-12:
91  denomitor=1.0e-9
92  unitstring='kb$^{-1}$'
93  return (unitstring,denomitor)

Variable Documentation

matplotRender.batchonly = False

Definition at line 12 of file matplotRender.py.

tuple matplotRender.f = open('/afs/cern.ch/cms/lumi/www/plots/operation/totallumivsrun-2011.csv','r')

Definition at line 818 of file matplotRender.py.

tuple matplotRender.fig = Figure(figsize=(7.2,5.4),dpi=120)

Definition at line 825 of file matplotRender.py.

tuple matplotRender.m = matplotRender(fig)

Definition at line 826 of file matplotRender.py.

tuple matplotRender.reader = csv.reader(f,delimiter=',')

Definition at line 819 of file matplotRender.py.

Referenced by MillePedeAlignmentAlgorithm.addPxbSurvey(), PhysicsTools::TreeTrainer.addTree(), SiStripBadFiberBuilder.algoAnalyze(), SiStripBadChannelBuilder.algoAnalyze(), AlpgenSource.AlpgenSource(), SiStripNoisesBuilder.analyze(), SiStripApvGainBuilder.analyze(), SiStripPedestalsBuilder.analyze(), SiStripThresholdBuilder.analyze(), SiStripNoiseNormalizedWithApvGainBuilder.analyze(), SiStripApvGainBuilderFromTag.analyze(), DetIdSelectorTest.analyze(), SiStripDetVOffBuilder.BuildDetVOffObj(), EGEnergyCorrector.CorrectedEnergyWithError(), EGEnergyCorrector.CorrectedEnergyWithErrorV3(), SiStripPedestalsGenerator.createObject(), SiStripBadModuleGenerator.createObject(), SiStripThresholdGenerator.createObject(), SiStripNoisesGenerator.createObject(), SiStripBaseDelayGenerator.createObject(), SiStripLatencyGenerator.createObject(), SiStripBackPlaneCorrectionGenerator.createObject(), SiStripApvGainGenerator.createObject(), SiStripLorentzAngleGenerator.createObject(), jsoncollector::JSONSerializer.deserialize(), OccupancyPlots.endRun(), SiStripGain.fillNewGain(), popcon::SiStripPopConHandlerUnitTestGain< T >.fillObject(), popcon::SiStripPopConHandlerUnitTestNoise< T >.fillObject(), popcon::SiStripPopConHandlerUnitTest< T >.fillObject(), SiStripGainFromAsciiFile.getNewObject(), evf::EvFDaqDirector.getNFilesFromEoLS(), getSavedMatrix(), FedRawDataInputSource.grabNextJsonFile(), ElectronIDMVA.MVAValue(), MuonIDMVA.MVAValue(), SiPixelFakeGainOfflineESSource.produce(), SiPixelFakeGainESSource.produce(), SiPixelFakeGainForHLTESSource.produce(), SiPixelFakeLorentzAngleESSource.produce(), SiStripBadComponentsDQMService.readBadComponents(), DQMRootSource.readElements(), MillePedeAlignmentAlgorithm.readFromPede(), evf::EvFDaqDirector.readLastLSEntry(), SiStripNoisesDQMService.readNoises(), SiStripPedestalsDQMService.readPedestals(), CocoaDaqReader.SetDaqReader(), SiStripDetInfoFileReader.SiStripDetInfoFileReader(), and SubsystemNeutronReader.SubsystemNeutronReader().

list matplotRender.resultlines = []

Definition at line 820 of file matplotRender.py.