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 = [] |
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 https mode by sending string buf via meme type image/png. Sending a premade static plot to webserver is considered a uploading process instead of https dynamic graphical mode.
def matplotRender::guessInstLumiUnit | ( | t | ) |
input : largest total lumivalue output: (unitstring,denomitor)
Definition at line 34 of file matplotRender.py.
00035 : 00036 ''' 00037 input : largest total lumivalue 00038 output: (unitstring,denomitor) 00039 ''' 00040 unitstring='$\mu$b$^{-1}$s$^{-1}$' 00041 denomitor=1.0 00042 if t>=1.0e3 and t<1.0e06: 00043 denomitor=1.0e3 00044 unitstring='nb$^{-1}$s$^{-1}$' 00045 elif t>=1.0e6 and t<1.0e9: 00046 denomitor=1.0e6 00047 unitstring='pb$^{-1}$s$^{-1}$' 00048 elif t>=1.0e9 and t<1.0e12: 00049 denomitor=1.0e9 00050 unitstring='fb$^{-1}$s$^{-1}$' 00051 elif t>=1.0e12 and t<1.0e15: 00052 denomitor=1.0e12 00053 unitstring='ab$^{-1}$s$^{-1}$' 00054 elif t<=1.0e-3 and t>1.0e-6: #left direction 00055 denomitor=1.0e-3 00056 unitstring='mb$^{-1}$s$^{-1}$' 00057 elif t<=1.0e-6 and t>1.0e-9: 00058 denomitor=1.0e-6 00059 unitstring='b$^{-1}$s$^{-1}$' 00060 elif t<=1.0e-9 and t>1.0e-12: 00061 denomitor=1.0e-9 00062 unitstring='kb$^{-1}$s$^{-1}$' 00063 return (unitstring,denomitor)
def matplotRender::guessLumiUnit | ( | t | ) |
input : largest total lumivalue output: (unitstring,denomitor)
Definition at line 64 of file matplotRender.py.
00065 : 00066 ''' 00067 input : largest total lumivalue 00068 output: (unitstring,denomitor) 00069 ''' 00070 unitstring='$\mu$b$^{-1}$' 00071 denomitor=1.0 00072 if t>=1.0e3 and t<1.0e06: 00073 denomitor=1.0e3 00074 unitstring='nb$^{-1}$' 00075 elif t>=1.0e6 and t<1.0e9: 00076 denomitor=1.0e6 00077 unitstring='pb$^{-1}$' 00078 elif t>=1.0e9 and t<1.0e12: 00079 denomitor=1.0e9 00080 unitstring='fb$^{-1}$' 00081 elif t>=1.0e12 and t<1.0e15: 00082 denomitor=1.0e12 00083 unitstring='ab$^{-1}$' 00084 elif t<=1.0e-3 and t>1.0e-6: #left direction 00085 denomitor=1.0e-3 00086 unitstring='mb$^{-1}$' 00087 elif t<=1.0e-6 and t>1.0e-9: 00088 denomitor=1.0e-6 00089 unitstring='b$^{-1}$' 00090 elif t<=1.0e-9 and t>1.0e-12: 00091 denomitor=1.0e-9 00092 unitstring='kb$^{-1}$' 00093 return (unitstring,denomitor)
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(), SiStripBadChannelBuilder::algoAnalyze(), SiStripBadFiberBuilder::algoAnalyze(), AlpgenSource::AlpgenSource(), SiStripApvGainBuilder::analyze(), SiStripThresholdBuilder::analyze(), SiStripNoiseNormalizedWithApvGainBuilder::analyze(), SiStripNoisesBuilder::analyze(), SiStripApvGainBuilderFromTag::analyze(), SiStripPedestalsBuilder::analyze(), SiStripDetVOffBuilder::BuildDetVOffObj(), WebInterface::Configure(), WebInterface::ContentsOpen(), EGEnergyCorrector::CorrectedEnergyWithError(), SiStripBadModuleGenerator::createObject(), SiStripThresholdGenerator::createObject(), SiStripApvGainGenerator::createObject(), SiStripBaseDelayGenerator::createObject(), SiStripPedestalsGenerator::createObject(), SiStripLorentzAngleGenerator::createObject(), SiStripLatencyGenerator::createObject(), SiStripNoisesGenerator::createObject(), edm::DaqSource::DaqSource(), SiStripGain::fillNewGain(), popcon::SiStripPopConHandlerUnitTestGain< T >::fillObject(), popcon::SiStripPopConHandlerUnitTestNoise< T >::fillObject(), popcon::SiStripPopConHandlerUnitTest< T >::fillObject(), SiStripGainFromAsciiFile::getNewObject(), getSavedMatrix(), SiStripWebInterface::handleAnalyserRequest(), SiPixelWebInterface::handleEDARequest(), WebInterface::handleStandardRequest(), WebInterface::Open(), WebInterface::printContentViewerXML(), WebInterface::printNavigatorXML(), SiPixelFakeLorentzAngleESSource::produce(), SiPixelFakeGainForHLTESSource::produce(), SiPixelFakeGainESSource::produce(), SiPixelFakeGainOfflineESSource::produce(), CgiReader::read_cookie(), CgiReader::read_form(), SiStripBadComponentsDQMService::readBadComponents(), DQMRootSource::readElements(), MillePedeAlignmentAlgorithm::readFromPede(), SiStripNoisesDQMService::readNoises(), SiStripPedestalsDQMService::readPedestals(), CocoaDaqReader::SetDaqReader(), SiStripDetInfoFileReader::SiStripDetInfoFileReader(), and SubsystemNeutronReader::SubsystemNeutronReader().
list matplotRender::resultlines = [] |
Definition at line 820 of file matplotRender.py.