CMS 3D CMS Logo

Classes | Functions | Variables
beamvalidation Namespace Reference

Classes

class  IOV
 
class  ParsingError
 

Functions

def cmp_tags (a, b)
 
def dump_footer (lines)
 
def dump_header (lines)
 
def exit (msg="")
 
def get_lastIOVs (listoftags, dest, auth)
 
def get_listoftags (dest, auth)
 
def get_plots (path, output, iovs, tag)
 
def get_productionFiles (directory)
 
def get_productionIOVs (directory)
 
def nonzero (self)
 
def pack (high, low)
 
def parse (docstring, arglist=None)
 
def unpack (i)
 
def unpackLumiid (i)
 
def write_iovs (iovs, lines)
 
def write_plots (lines, plots, web)
 
def write_tags (tags, lines)
 

Variables

 args
 
 auth
 
 br
 
 dest
 Get the latest tags dest = "frontier://cmsfrontier.cern.ch:8000/Frontier/CMS_COND_31X_BEAMSPOT". More...
 
 end
 
 htmlwebsite
 
 lasttag
 
 lines
 
 list_lastIOVs
 
 list_tags
 
 option
 
 optionstring
 
 outfile
 
 pngfiles
 
 processedruns
 
 USAGE
 

Function Documentation

◆ cmp_tags()

def beamvalidation.cmp_tags (   a,
  b 
)

Definition at line 79 of file beamvalidation.py.

References createfilelist.int.

79 def cmp_tags(a,b):
80 
81  yeara = int(a.split('_')[1])
82  yearb = int(b.split('_')[1])
83 
84  if yeara < yearb: return -1
85  if yeara > yearb: return 1
86 
87  suffix = "_offline"
88  if a.find("_express") != -1:
89  suffix = "_express"
90  if a.find("_prompt") != -1:
91  suffix = "_prompt"
92 
93  tmpa = a.replace("BeamSpotObjects_2009_v","")
94  tmpa = tmpa.replace(suffix,"")
95 
96  tmpb = b.replace("BeamSpotObjects_2009_v","")
97  tmpb = tmpb.replace(suffix,"")
98 
99  na = int(tmpa)
100  nb = int(tmpb)
101  if na < nb: return -1
102  if na == nb: return 0
103  if na > nb: return 1
104 
105 #___
106 
def cmp_tags(a, b)

◆ dump_footer()

def beamvalidation.dump_footer (   lines)

Definition at line 127 of file beamvalidation.py.

127 def dump_footer(lines):
128 
129  lines.append('</body>\n</html>\n')
130 
131 #______________
def dump_footer(lines)

◆ dump_header()

def beamvalidation.dump_header (   lines)

Definition at line 107 of file beamvalidation.py.

107 def dump_header(lines):
108 
109  lines.append('''
110 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>
111 <head><title>Beam Spot Calibration Status</title></head>
112 
113 <body>
114 
115 <H1>Status of the Beam Spot Calibration</H1>
116 <BR>
117 <BR>
118 This page is updated every 10 minutes:
119 <BR>
120 <strong><script src="datemod.js"
121 type="text/javascript"></script></strong>
122 
123 ''')
124 
125 #____
126 
def dump_header(lines)

◆ exit()

def beamvalidation.exit (   msg = "")

Definition at line 52 of file beamvalidation.py.

Referenced by evf.__attribute__(), presentation.ValidationPlots.__init__(), authentication.X509CertAuth.__init__(), optutl::CommandLineParser._finishDefaultOptions(), optutl::CommandLineParser._setVariablesFromFile(), abConnect(), addFilesWithFork(), trklet::Sector.addMem(), trklet::Sector.addProc(), EnergyScaleCorrection_class.AddScale(), EnergyScaleCorrection_class.AddSmearing(), SiStripGainRandomCalculator.algoAnalyze(), SiStripGainCosmicCalculator.algoBeginJob(), SiStripGainFromData.algoBeginJob(), SiStripGainFromCalibTree.algoBeginRun(), SiStripGainFromData.algoBeginRun(), MonitorElementsDb.analyze(), SiStripApvGainBuilderFromTag.analyze(), cmsswVersionTools.PickRelValInputFiles.apply(), BeamSpotWorkflow.aselectFilesToProcess(), utils_v2.auth_wget(), backgroundFunctionService(), hcalCalib.Begin(), PhysicsPerformanceDBWriterFromFile_WPandPayload.beginJob(), SiStripGainsPCLHarvester.beginRun(), HLTHiggsSubAnalysis.beginRun(), FWSimpleProxyBuilderTemplate< TrajectorySeed >.build(), CocoaDaqReaderRoot.BuildMeasurementsFromOptAlign(), Measurement.buildOptOList(), MeasurementDiffEntry.buildOptONamesList(), Measurement.buildOptONamesList(), SiStripDetVOffBuilder.buildPSUdetIdMap(), ALIUtils.CalculateAngleDimensionFactorFromInt(), ALIUtils.CalculateAngleDimensionFactorFromString(), TagProbeFitTreeAnalyzer.calculateEfficiency(), ALIUtils.CalculateLengthDimensionFactorFromInt(), ALIUtils.CalculateLengthDimensionFactorFromString(), MeasurementSensor2D.calculateSimulatedValue(), MeasurementCOPS.calculateSimulatedValue(), MeasurementTiltmeter.calculateSimulatedValue(), condbon.cdbon_write(), combineBTagCalibrationData.check_csv_data(), errors.check_response(), uploads.uploader.check_response_for_error_key(), edmStreamStallGrapher.chooseParser(), CmsShowMain.CmsShowMain(), ValidationMatrix_v2.ReleaseComparison.compare(), compileDMRTrends(), ConfigurableAnnealing.ConfigurableAnnealing(), BaseFunction.convertToArrays(), heppy::MuScleFitCorrector.convertToArrays(), createPayload.copyToWorkflowdir(), OpticalObject.createComponentOptOs(), fastsim::TrackerSimHitProducer.createHitOnDetector(), web.dbfile2html.dbfile2html(), DBWriter.DBWriter(), LzmaFile.DecodeBuffer(), OpticalObject.defaultBehaviour(), Measurement.DerivativeRespectEntry(), OpticalObject.detailedDeviatesLightRay(), OpticalObject.detailedTraversesLightRay(), OpticalObject.displaceRmGlobOriginal(), OpticalObject.displaceRmGlobOriginalOriginal(), DMRtrends(), SiStripGainsCalibTreeWorker.dqmBeginRun(), SiStripGainsPCLWorker.dqmBeginRun(), Measurement.DumpBadOrderOptOs(), ALIUtils.dumpDimensions(), EcalEleCalibLooper.EcalEleCalibLooper(), EmulateCPPF.EmulateCPPF(), FWModelChangeManager.endChanges(), TotemRPSD.EndOfEvent(), PPSDiamondSD.EndOfEvent(), EnergyScaleCorrection_class.EnergyScaleCorrection_class(), ErrorsAnalyzer.ErrorsAnalyzer(), ErrorsPropagationAnalyzer.ErrorsPropagationAnalyzer(), dqmd_manager.exec_func(), mkfit.execTrackerInfoCreatorPlugin(), uploads.uploader.exit_upload(), OpticalObject.fastDeviatesLightRay(), OpticalObject.fastTraversesLightRay(), Entry.fill(), OpticalObject.fillCoordinateEntry(), Measurement.fillData(), FittedEntriesSet.FillEntriesAveragingSets(), OpticalObject.fillExtraEntry(), Entry.fillFromInputFileQuality(), Entry.fillFromInputFileSigma(), Entry.fillFromInputFileValue(), Fit.findEntryFitPosition(), OpticalObject.findExtraEntryValue(), OpticalObject.findExtraEntryValueMustExist(), OpticalObjectMgr.findOptO(), OpticalObjectMgr.findOptOs(), Fit.fitParameters(), FittedEntry.FittedEntry(), FullModelReactionDynamics.GenerateXandPt(), LutXml.get_checksum(), ValidationMatrix.get_clean_fileanames(), ZdcLut.get_lut(), uploadConditions.get_version(), uploadConditions_v2.get_version(), ALIUtils.getBool(), getCompressedBuffer(), ErrorCorrelationMgr.getCorrelation(), Pythia8::PowhegHooksBB4L.getdechardness(), DeviationsFromFileSensor2D.getDevis(), OpticalObject.getDisplacementInLocalCoordinates(), Model.getEntryByName(), getFlagStream(), ALIUtils.getFloat(), getHLTConfigData(), ALIFileOut.getInstance(), ALIFileIn.getInstanceOpened(), ALIUtils.getInt(), BeamSpotWorkflow.getLastUploadedIOV(), BeamSpotWorkflow.getListOfRunsAndLumiFromDBS(), HcalLutManager.getLutFromXml_old(), popcon::EcalLaser_weekly_Linearization_Check.getNewObjects(), popcon::EcalLaser_weekly_Handler.getNewObjects(), popcon::EcalPedestalsHandler.getNewObjects(), HCALConfigDB.getOnlineLUT(), Model.getOptOByName(), Model.getOptOByType(), Model.getParamFittedSigmaVectorItem(), Measurement.getPreviousOptO(), makeHLTPrescaleTable.getProcessObjectFromConfDB(), OpticalObject.getRotationAnglesInOptOFrame(), heppy::MuScleFitCorrector.getSmearedPt(), ZIterativeAlgorithmWithFit.getStatWeights(), checkPayloads.getUploadedIOVs(), ALIFileIn.getWordsInLine(), HCovarianceVSxy.HCovarianceVSxy(), optutl::CommandLineParser.help(), HLTHiggsSubAnalysis.HLTHiggsSubAnalysis(), gen::EvtGenInterface.init(), SiStripDetVOffFakeBuilder.initialize(), DBReader.initialize(), SiStripCoralIface.initialize(), Herwig7Hadronizer.initializeForInternalPartons(), ZeroSuppressFP420.initParams(), ALILine.intersect(), LightRay.intersect(), InvRingCalib.InvRingCalib(), L1RCTSaveInput.L1RCTSaveInput(), command_line.list_object(), CmsShowMainBase.loadGeometry(), lumifileperyear(), lumiperIOV(), copyFromCastor.main(), copyAndRename.main(), copyFiles.main(), buildHistoTypes.main(), uploader.main(), combineBTagCalibrationData.main(), splitter.main(), main(), generateFlavCfromFlavB.main(), checkRuns.main(), checkPayloads.main(), BeamSpotWorkflow.main(), validateAlignments.main(), utils_v2.make_file_pairs(), utils.make_files_pairs(), OptOCOPS.makeMeasurement(), OpticalObject.makeMeasurement(), GeometryComparisonPlotter.MakePlots(), TrajectoryManager.makeSinglePSimHit(), MatcherUsingTracksAlgorithm.match(), Pythia8::PowhegHooksBB4L.match_decay(), ResidualRefitting.MatchTrackWithRecHits(), MonitorXMLParser.MonitorXMLParser(), MuonErrorMatrix.MuonErrorMatrix(), MuScleFit.MuScleFit(), electronCompare.mysystem(), electronStore.mysystem(), next_arg_or_die(), LzmaFile.Open(), edm.openFileHdl(), ALIFileIn.openNewFile(), mkfit::DataFile.openRead(), uploadConditions.parse_arguments(), uploadConditions_v2.parse_arguments(), optutl::CommandLineParser.parseArguments(), OptOCameraDetector.participateInMeasurement(), OptOLens.participateInMeasurement(), OptORisleyPrism.participateInMeasurement(), CSCBadChambersConditions.prefillBadChambers(), CSCBadStripsConditions.prefillBadStrips(), CSCBadWiresConditions.prefillBadWires(), CSCCrosstalkConditions.prefillCrosstalk(), CSCCrosstalkDBConditions.prefillDBCrosstalk(), CSCGainsDBConditions.prefillDBGains(), CSCNoiseMatrixDBConditions.prefillDBNoiseMatrix(), CSCPedestalsDBConditions.prefillDBPedestals(), CSCGainsConditions.prefillGains(), CSCNoiseMatrixConditions.prefillNoiseMatrix(), das_client.print_from_cache(), edm::RandomtXiGunProducer.produce(), SiStripApvGainFakeESSource.produce(), MuonSimHitProducer.produce(), L1TCaloSummary.produce(), Fit.PropagateErrors(), CSCTFPtMethods.Pt2StnChiSq(), CSCTFPtMethods.Pt3StnChiSq(), PDRates.RateInPD(), BuildTrackerMapPlugin.read(), OpticalObject.readCoordinates(), StoreESCondition.readESChannelStatusFromFile(), DeviationsFromFileSensor2D.readFile(), EnergyScaleCorrection_class.ReadFromFile(), Model.readMeasurementsFromFile(), CocoaDaqReaderText.ReadNextEvent(), AsciiNeutronReader.readNextEvent(), popcon::EcalPedestalsHandler.readPedestal2017(), popcon::EcalPedestalsHandler.readPedestalFile(), popcon::EcalPedestalsHandler.readPedestalMC(), popcon::EcalPedestalsHandler.readPedestalTimestamp(), popcon::EcalPedestalsHandler.readPedestalTree(), MuScleFitBase.readProbabilityDistributionsFromFile(), EnergyScaleCorrection_class.ReadSmearingFromFile(), readSRF(), Model.readSystemDescription(), RootTreeHandler.readTree(), readTTF(), popcon::EcalPFRecHitThresholdsHandler.readTXT(), popcon::EcalIntercalibHandler.readTXT(), popcon::EcalTPGWeightIdMapHandler.readtxtFile(), popcon::EcalTPGWeightGroupHandler.readtxtFile(), popcon::EcalTPGOddWeightGroupHandler.readtxtFile(), EcalFloatCondObjectContainerXMLTranslator.readXML(), popcon::EcalPFRecHitThresholdsHandler.readXML(), popcon::EcalIntercalibHandler.readXML(), popcon::EcalTPGWeightIdMapHandler.readxmlFile(), popcon::EcalTPGWeightGroupHandler.readxmlFile(), popcon::EcalTPGOddWeightGroupHandler.readxmlFile(), LightRay.refract(), edm::ESProxyFactoryProducer.registerFactoryWithKey(), cms::cudatest.requireDevices(), scaleFunctionBase< std::vector< double > >.resetParameters(), resolutionFunctionService(), heppy.resolutionFunctionService(), resolutionFunctionVecService(), cmsswPreprocessor.CmsswPreprocessor.run(), checkBTagCalibrationConsistency.run_check_data(), uploadConditions.run_upload(), uploadConditions_v2.run_upload(), runlistfromlumifile(), scaleFunctionType64< T >.scale(), scaleFunctionService(), heppy.scaleFunctionService(), scaleFunctionVecService(), utils_v2.search_on_disk(), BeamSpotWorkflow.selectFilesToProcess(), MeasurementSensor2D.setConversionFactor(), MeasurementCOPS.setConversionFactor(), MeasurementTiltmeter.setConversionFactor(), Measurement.setConversionFactor(), Measurement.setCurrentDate(), Comparator.SetDirs(), UpdatablePSimHit.setExitPoint(), FWGeometryTableViewManager.setGeoManagerFromFile(), GlobalOptionMgr.setGlobalOption(), Measurement.setName(), setOpt(), heppy::scaleFunctionBase< double *>.setPar(), scaleFunctionBase< std::vector< double > >.setPar(), resolutionFunctionBase< std::vector< double > >.setPar(), scaleFunctionBase< std::vector< double > >.setParameters(), scaleFunctionType50< T >.setParameters(), scaleFunctionType64< T >.setParameters(), resolutionFunctionBase< std::vector< double > >.setParameters(), resolutionFunctionType45< T >.setParameters(), resolutionFunctionType46< T >.setParameters(), resolutionFunctionType47< T >.setParameters(), mkfit::TTreeValidation.setTrackExtras(), ClassBasedElectronID.setup(), CmsShowMainBase.setupConfiguration(), CmsShowMain.setupSocket(), ResolutionFunction.sigmaCotgTh(), ResolutionFunction.sigmaPhi(), ResolutionFunction.sigmaPt(), smearFunctionService(), ALIUtils.subQuotes(), TestPythiaDecays.TestPythiaDecays(), UpdatablePSimHit.updateExitPoint(), OptOUserDefined.userDefinedBehaviour(), OpticalObject.userDefinedBehaviour(), VertexFitterManager.VertexFitterManager(), VertexRecoManager.VertexRecoManager(), pos::PixelMaxVsf.writeASCII(), pos::PixelLowVoltageMap.writeASCII(), pos::PixelDetectorConfig.writeASCII(), RootTreeHandler.writeTree(), Fit.WriteVisualisationFiles(), and EcalDccWeightBuilder.writeWeightToDB().

52 def exit(msg=""):
53  raise SystemExit(msg or optionstring.replace("%prog",sys.argv[0]))
54 
def exit(msg="")

◆ get_lastIOVs()

def beamvalidation.get_lastIOVs (   listoftags,
  dest,
  auth 
)

Definition at line 230 of file beamvalidation.py.

References createfilelist.int, print(), FastTimerService_cff.range, and submitPVValidationJobs.split().

230 def get_lastIOVs( listoftags, dest, auth ):
231 
232  dbtags = ['offline','express','prompt']
233 
234  results = {}
235  for itag in dbtags:
236 
237  lasttag = listoftags[itag][0]
238  #fix for the moment to read old tags
239  if itag != "offline":
240  lasttag = listoftags[itag][1]
241 
242  queryIOVs_cmd = "cmscond_list_iov -c "+dest+" -P "+auth+" -t "+ lasttag
243  print(queryIOVs_cmd)
244 
245  outcmd = subprocess.getstatusoutput( queryIOVs_cmd )
246 
247  tmparr = outcmd[1].split('\n')
248 
249  TimeType = tmparr[1].split()[1]
250  listIOVs = []
251 
252  # look at number of payloads
253  lastline = tmparr[len(tmparr)-1].split()
254  npayloads = int( lastline[len(lastline)-1] )
255 
256  maxIOVs = 3
257  if npayloads < 3:
258  maxIOVs = npayloads
259  # pick the last three IOVs
260  for i in range(0,maxIOVs):
261  tmpline = tmparr[len(tmparr) -2 -i]
262  aIOV = IOV()
263  aIOV.IOVfirst = tmpline.split()[0]
264  aIOV.IOVlast = tmpline.split()[1]
265  aIOV.type = TimeType
266  listIOVs.append( aIOV )
267 
268  results[lasttag] = listIOVs
269 
270  return results
271 
272 #
273 # lumi tools CondCore/Utilities/python/timeUnitHelper.py
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def get_lastIOVs(listoftags, dest, auth)

◆ get_listoftags()

def beamvalidation.get_listoftags (   dest,
  auth 
)

Definition at line 186 of file beamvalidation.py.

References print(), and submitPVValidationJobs.split().

186 def get_listoftags(dest, auth,):
187 
188  queryTags_cmd = "cmscond_list_iov -c "+dest+" -P "+auth+" -a | grep BeamSpotObjects"
189  print(queryTags_cmd)
190  outcmd = subprocess.getstatusoutput( queryTags_cmd )
191  print(outcmd[1])
192 
193  listtags = outcmd[1].split()
194 
195  listtags_offline = []
196  for itag in listtags:
197  if itag[len(itag)-7:len(itag)] == "offline":
198  listtags_offline.append(itag)
199  listtags_express = []
200  for itag in listtags:
201  if itag[len(itag)-7:len(itag)] == "express":
202  listtags_express.append(itag)
203  listtags_prompt = []
204  for itag in listtags:
205  if itag[len(itag)-6:len(itag)] == "prompt":
206  listtags_prompt.append(itag)
207 
208  listtags_offline.sort( cmp = cmp_tags )
209  listtags_offline.reverse()
210  listtags_express.sort( cmp = cmp_tags )
211  listtags_express.reverse()
212  listtags_prompt.sort( cmp = cmp_tags )
213  listtags_prompt.reverse()
214 
215  result = {}
216  result['offline'] = listtags_offline
217  result['express'] = listtags_express
218  result['prompt'] = listtags_prompt
219 
220  return result
221 
222 #______________________
def get_listoftags(dest, auth)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ get_plots()

def beamvalidation.get_plots (   path,
  output,
  iovs,
  tag 
)

Definition at line 295 of file beamvalidation.py.

References createfilelist.int, print(), submitPVValidationJobs.split(), str, and unpack().

295 def get_plots(path,output, iovs, tag):
296 
297  initial=iovs[len(iovs)-1].IOVfirst
298  final =iovs[0].IOVfirst
299  if iovs[0].type == "lumiid":
300  initial = str(unpack(initial)[0])+":"+str(unpack(initial)[1])
301  final = str(unpack(final)[0])+":"+str(unpack(final)[1])
302 
303  initial = str(int(initial) -100 )
304  cmd = path+"/plotBeamSpotDB.py -b -P -t "+tag+" -i "+initial +" -f "+final
305  print(cmd)
306  outcmd = subprocess.getstatusoutput( cmd )
307  print(outcmd[1])
308 
309  cmd = "ls *.png"
310  outcmd = subprocess.getstatusoutput( cmd )
311 
312  pngfiles = outcmd[1].split('\n')
313  print(pngfiles)
314 
315  cmd = "cp *.png "+os.path.dirname(output)
316  outcmd = subprocess.getstatusoutput( cmd )
317  cmd = "rm *.png"
318  outcmd = subprocess.getstatusoutput( cmd )
319 
320  pngfiles.sort()
321  return pngfiles
322 
323 #_______________________________
def get_plots(path, output, iovs, tag)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
#define str(s)

◆ get_productionFiles()

def beamvalidation.get_productionFiles (   directory)

Definition at line 346 of file beamvalidation.py.

References submitPVValidationJobs.split().

Referenced by get_productionIOVs().

346 def get_productionFiles( directory ):
347 
348  list = subprocess.getstatusoutput('ls -t '+directory)
349  list = list[1].split()
350  newlist = []
351  for i in list:
352  if i.find('BeamFit_')!=-1:
353  newlist.append(i)
354 
355  return newlist
356 #_______________________________
def get_productionFiles(directory)

◆ get_productionIOVs()

def beamvalidation.get_productionIOVs (   directory)

Definition at line 357 of file beamvalidation.py.

References get_productionFiles().

357 def get_productionIOVs( directory ):
358 
359  files = get_productionFiles( directory )
360  listofruns = []
361  for f in files:
362  ii = f.find('Run')
363  arun = f[ii:len(f)-4]
364  listofruns.append(arun)
365  return listofruns
366 
367 #______________________________
def get_productionIOVs(directory)
def get_productionFiles(directory)

◆ nonzero()

def beamvalidation.nonzero (   self)

Definition at line 40 of file beamvalidation.py.

References contentValuesCheck.values.

Referenced by CSCDigiValidator.zeroSupStripDigis().

40 def nonzero(self): # will become the nonzero method of optparse.Values
41  "True if options were given"
42  for v in self.__dict__.values():
43  if v is not None: return True
44  return False
45 
46 optparse.Values.__nonzero__ = nonzero # dynamically fix optparse.Values
47 
def nonzero(self)

◆ pack()

def beamvalidation.pack (   high,
  low 
)
pack high,low 32bit unsigned int to one unsigned 64bit long long
   Note:the print value of result number may appear signed, if the sign bit is used.

Definition at line 274 of file beamvalidation.py.

274 def pack(high,low):
275  """pack high,low 32bit unsigned int to one unsigned 64bit long long
276  Note:the print value of result number may appear signed, if the sign bit is used.
277  """
278  h=high<<32
279  return (h|low)
280 
def pack(high, low)

◆ parse()

def beamvalidation.parse (   docstring,
  arglist = None 
)

Definition at line 55 of file beamvalidation.py.

55 def parse(docstring, arglist=None):
56  global optionstring
57  optionstring = docstring
58  match = USAGE.search(optionstring)
59  if not match: raise ParsingError("Cannot find the option string")
60  optlines = match.group(1).splitlines()
61  try:
62  p = optparse.OptionParser(optlines[0])
63  for line in optlines[1:]:
64  opt, help=line.split(':')[:2]
65  short,long=opt.split(',')[:2]
66  if '=' in opt:
67  action='store'
68  long=long.split('=')[0]
69  else:
70  action='store_true'
71  p.add_option(short.strip(),long.strip(),
72  action = action, help = help.strip())
73  except (IndexError,ValueError):
74  raise ParsingError("Cannot parse the option string correctly")
75  return p.parse_args(arglist)
76 
77 #_______________________________
78 
vector< string > parse(string line, const string &delimiter)

◆ unpack()

def beamvalidation.unpack (   i)
unpack 64bit unsigned long long into 2 32bit unsigned int, return tuple (high,low)

Definition at line 281 of file beamvalidation.py.

References mathSSE.return().

Referenced by get_plots(), and unpackLumiid().

281 def unpack(i):
282  """unpack 64bit unsigned long long into 2 32bit unsigned int, return tuple (high,low)
283  """
284  high=i>>32
285  low=i&0xFFFFFFFF
286  return(high,low)
287 
return((rh ^ lh) &mask)

◆ unpackLumiid()

def beamvalidation.unpackLumiid (   i)
unpack 64bit lumiid to dictionary {'run','lumisection'}

Definition at line 288 of file beamvalidation.py.

References unpack().

288 def unpackLumiid(i):
289  """unpack 64bit lumiid to dictionary {'run','lumisection'}
290  """
291  j=unpack(i)
292  return {'run':j[0],'lumisection':j[1]}
293 
294 #____________________________

◆ write_iovs()

def beamvalidation.write_iovs (   iovs,
  lines 
)

Definition at line 155 of file beamvalidation.py.

References FastTimerService_cff.range.

155 def write_iovs(iovs, lines):
156 
157  end = '\n'
158  br = '<BR>'+end
159  # hearder
160  lines.append('<tr>'+end)
161  for i in iovs.keys():
162  lines.append('<th>'+i)
163  lines.append('</th>'+end)
164  lines.append('</tr>'+end)
165  # lumi type
166  lines.append('<tr>'+end)
167  for i in iovs.keys():
168  aIOVlist = iovs[i]
169  aIOV = IOV()
170  if len(aIOVlist) > 0:
171  aIOV = aIOVlist[0]
172  lines.append('<td> '+aIOV.type+' </td>'+end)
173  lines.append('</tr>'+end)
174  # print iovs
175  for niovs in range(0,len(iovs[iovs.keys()[0]])):
176  lines.append('<tr>'+end)
177  for i in iovs.keys():
178  aIOVlist = iovs[i]
179  aIOV = IOV()
180  if len(aIOVlist) > niovs:
181  aIOV = aIOVlist[niovs]
182  lines.append('<td> '+aIOV.IOVfirst +' - '+aIOV.IOVlast+' </td>'+end)
183  lines.append('</tr>'+end)
184 
185 #______________
def write_iovs(iovs, lines)

◆ write_plots()

def beamvalidation.write_plots (   lines,
  plots,
  web 
)

Definition at line 324 of file beamvalidation.py.

References FastTimerService_cff.range.

324 def write_plots(lines, plots,web):
325 
326  end = '\n'
327  br = '<BR>'+end
328 
329  lines.append(br)
330  lines.append('''
331 <table border="1">
332 
333 ''')
334  for i in range(0,len(plots)):
335  plot = plots[i]
336  plot = os.path.basename(plot)
337  if i%2 == 0:
338  lines.append("<tr>"+end)
339  lines.append("<td> <a href=\""+web+"/"+plot+"\"> <img src="+plot+" alt="+plot+" width='700' height='250' /> </a> </td>"+end)
340  if i%2 == 1:
341  lines.append("</tr>"+end)
342 
343  lines.append('</table>'+end)
344 
345 #________________________________
def write_plots(lines, plots, web)

◆ write_tags()

def beamvalidation.write_tags (   tags,
  lines 
)

Definition at line 132 of file beamvalidation.py.

References FastTimerService_cff.range.

132 def write_tags(tags, lines):
133 
134  end = '\n'
135  br = '<BR>'+end
136 
137  lines.append('<tr>'+end)
138  for i in tags.keys():
139 
140  lines.append('<th>'+i)
141  lines.append('</th>'+end)
142  lines.append('</tr>'+end)
143 
144  for ntags in range(0,len(tags['offline'])):
145  lines.append('<tr>'+end)
146  for i in tags.keys():
147  alist = tags[i]
148  if ntags < len(tags[i]):
149  lines.append('<td> '+alist[ntags]+' </td>'+end)
150  else:
151  lines.append('<td> </td>')
152  lines.append('</tr>'+end)
153 
154 #______________
def write_tags(tags, lines)

Variable Documentation

◆ args

beamvalidation.args

Definition at line 373 of file beamvalidation.py.

◆ auth

beamvalidation.auth

Definition at line 383 of file beamvalidation.py.

◆ br

beamvalidation.br

◆ dest

beamvalidation.dest

Get the latest tags dest = "frontier://cmsfrontier.cern.ch:8000/Frontier/CMS_COND_31X_BEAMSPOT".

Definition at line 382 of file beamvalidation.py.

◆ end

beamvalidation.end

Definition at line 396 of file beamvalidation.py.

◆ htmlwebsite

beamvalidation.htmlwebsite

Definition at line 377 of file beamvalidation.py.

◆ lasttag

beamvalidation.lasttag

Definition at line 424 of file beamvalidation.py.

◆ lines

beamvalidation.lines

Definition at line 395 of file beamvalidation.py.

◆ list_lastIOVs

beamvalidation.list_lastIOVs

Definition at line 389 of file beamvalidation.py.

◆ list_tags

beamvalidation.list_tags

Definition at line 386 of file beamvalidation.py.

◆ option

beamvalidation.option

Definition at line 373 of file beamvalidation.py.

◆ optionstring

beamvalidation.optionstring

Definition at line 50 of file beamvalidation.py.

◆ outfile

beamvalidation.outfile

Definition at line 433 of file beamvalidation.py.

◆ pngfiles

beamvalidation.pngfiles

Definition at line 428 of file beamvalidation.py.

◆ processedruns

beamvalidation.processedruns

Definition at line 392 of file beamvalidation.py.

◆ USAGE

beamvalidation.USAGE

Definition at line 38 of file beamvalidation.py.