CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
dirstructure.Comparison Class Reference
Inheritance diagram for dirstructure.Comparison:
dirstructure.Weighted

Public Member Functions

def __init__ (self, name, mother_dir, h1, h2, stat_test, draw_success=False, do_pngs=False, skip=False)
 
def __repr__ (self)
 
def tcanvas_slow (self, canvas)
 
- Public Member Functions inherited from dirstructure.Weighted
def __init__ (self, name, weight=1)
 

Public Attributes

 do_pngs
 
 draw_success
 
 img_name
 
 mother_dir
 
 name
 
 png_name
 
 rank
 
 status
 
 test_name
 
 test_thr
 
- Public Attributes inherited from dirstructure.Weighted
 name
 
 weight
 

Static Public Attributes

 canvas_xsize
 
 canvas_ysize
 

Private Member Functions

def __get_img_name (self)
 
def __make_image (self, obj1, obj2)
 
def __make_img_dir (self)
 

Detailed Description

Definition at line 334 of file dirstructure.py.

Constructor & Destructor Documentation

◆ __init__()

def dirstructure.Comparison.__init__ (   self,
  name,
  mother_dir,
  h1,
  h2,
  stat_test,
  draw_success = False,
  do_pngs = False,
  skip = False 
)

Definition at line 337 of file dirstructure.py.

337  def __init__(self,name,mother_dir,h1,h2,stat_test,draw_success=False,do_pngs=False, skip=False):
338  self.name=name
339  self.png_name="placeholder.png"
340  self.mother_dir=mother_dir
341  self.img_name=""
342  #self.draw_success=draw_success
343  Weighted.__init__(self,name)
344 
345  stat_test.set_operands(h1,h2)
346  if skip:
347  self.status = SKIPED
348  self.test_name=stat_test.name
349  self.test_name=stat_test.name
350  self.test_thr=stat_test.threshold
351  self.rank = 0
352  else:
353  self.status=stat_test.get_status()
354  self.rank=stat_test.get_rank()
355  self.test_name=stat_test.name
356  self.test_thr=stat_test.threshold
357  self.do_pngs=do_pngs
358  self.draw_success=draw_success or not do_pngs
359  if ((self.status==FAIL or self.status==NULL or self.status == SKIPED or self.draw_success) and self.do_pngs):
360  self.__make_image(h1,h2)
361  #self.__make_image(h1,h2)
362 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __get_img_name()

def dirstructure.Comparison.__get_img_name (   self)
private

Definition at line 367 of file dirstructure.py.

References dirstructure.Comparison.img_name, dirstructure.Directory.mother_dir, dirstructure.Comparison.mother_dir, ElectronMVAID.ElectronMVAID.name, HcalOfflineHarvesting.name, HcalOnlineHarvesting.name, HFRaddamTask.name, LaserTask.name, NoCQTask.name, PedestalTask.name, QIE10Task.name, QIE11Task.name, RecHitTask.name, UMNioTask.name, ZDCTask.name, AlignableObjectId::entry.name, RawTask.name, average.Average.name, counter.Counter.name, TPTask.name, DigiTask.name, histograms.Histograms.name, LEDTask.name, cond::persistency::TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, TmModule.name, cond::persistency::GTEditorData.name, FWLite.ElectronMVAID.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, DQMRivetClient::NormOption.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::JOB_NAME.name, cond::persistency::TAG::DESCRIPTION.name, cms::dd::NameValuePair< T >.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cond::persistency::TAG::MODIFICATION_TIME.name, cond::persistency::O2O_RUN::LOG.name, ParameterSet.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::PROTECTION_CODE.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, MEPSetData.name, AlignmentConstraint.name, PixelDCSObject< T >::Item.name, dataset.BaseDataset.name, SummaryTableOutputBranches::NamedBranchPtr.name, cms::dd::ValuePair< T, U >.name, fit::RootMinuitCommand.name, personalPlayback.Applet.name, Types._Untracked.name, EventStringOutputBranches::NamedBranchPtr.name, MagCylinder.name, analyzer.Analyzer.name, production_tasks.Task.name, HcalForwardLibWriter::FileHandle.name, DQMRivetClient::LumiOption.name, heppy::ParSet.name, cond::persistency::GTProxyData.name, LumiOutputBranches::NamedBranchPtr.name, TableOutputBranches::NamedBranchPtr.name, TriggerOutputBranches::NamedBranchPtr.name, CharmTagger::MVAVar.name, SingleObjectCondition.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, HeavyIonCSVTagger::MVAVar.name, cms::DDAlgoArguments.name, RHStopTracer::StopPoint.name, EgHLTOfflineSummaryClient::SumHistBinData.name, Barrel.name, cond::TimeTypeSpecs.name, perftools::EdmEventSize::BranchRecord.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, EcalLogicID.name, alignment.Alignment.name, lumi::TriggerInfo.name, PixelEndcapLinkMaker::Item.name, dirstructure.Weighted.name, XMLProcessor::_loaderBaseConfig.name, FWTableViewManager::TableEntry.name, MEtoEDM< T >::MEtoEDMObject.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, Supermodule.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, CaloTrkProcessing::Detector.name, genericValidation.GenericValidation.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cms::DDParsingContext::CompositeMaterial.name, MVAVar.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, DisplayManager.DisplayManager.name, cond::Tag_t.name, FWLite.WorkingPoints.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, FastHFShowerLibrary.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, magneticfield::BaseVolumeHandle.name, emtf::Node.name, PhysicsTools::Variable::Value.name, PrintMaterialBudgetInfo.name, h4DSegm.name, BTagProbabilityToDiscriminator::Discriminator.name, DQMGenericClient::NormOption.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, CounterChecker.name, DQMGenericClient::CDOption.name, cond::TagInfo_t.name, PhysicsTools::Calibration::Variable.name, TrackerSectorStruct.name, TriggerObjectTableProducer::SelectedObject.name, MuonGeometrySanityCheckPoint.name, DQMGenericClient::NoFlowOption.name, FCDTask.name, cond::persistency::PAYLOAD::HASH.name, looper.Looper.name, Mapper::definition< ScannerT >.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, EDMtoMEConverter.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, python.rootplot.tree2hists.Plot.name, cond::persistency::PAYLOAD::VERSION.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, PhysicsTools::TreeReader::Value.name, classes.MonitorData.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, HistogramManager.name, classes.OutputData.name, BPHDecayToResResBuilderBase::DZSelect.name, Crystal.name, h2DSegm.name, options.HLTProcessOptions.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, DQMNet::WaitObject.name, python.rootplot.utilities.Hist.name, AlpgenParameterName.name, config.Analyzer.name, geometry.Structure.name, hDigis.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, PhysicsTools::Variable.name, SiStripMonitorDigi.name, BulkSilicon.name, config.Service.name, adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.name, CaloSD::Detector.name, APD.name, core.autovars.NTupleCollection.name, nanoaod::FlatTable::Column.name, BPHRecoBuilder::BPHRecoSource.name, NanoAODDQM::SelGroupConfig.name, BPHRecoBuilder::BPHCompSource.name, StraightTrackAlignment::RPSetPlots.name, cond::persistency::TAG_AUTHORIZATION::TAG_NAME.name, cond::persistency::TAG_AUTHORIZATION::ACCESS_TYPE.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE.name, InnerLayerVolume.name, cond::payloadInspector::TagReference.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, personalPlayback.FrameworkJob.name, Grid.name, trklet::TrackletConfigBuilder::DTCinfo.name, Grille.name, BackPipe.name, plotscripts.SawTeethFunction.name, PatchPanel.name, BackCoolTank.name, DryAirTube.name, python.rootplot.utilities.RootFile.name, crabFunctions.CrabTask.name, MBCoolTube.name, hHits.name, MBManif.name, cscdqm::ParHistoDef.name, hDeltaR.name, hTMaxCell.name, BeautifulSoup.Tag.name, hParam.name, hMuonStat.name, hTOF.name, hTDelay.name, hTimes< hTime >.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, python.rootplot.root2matplotlib.replace(), and digitizers_cfi.strip.

Referenced by dirstructure.Comparison.__make_image().

367  def __get_img_name(self):
368  #self.__make_img_dir()
369  #print "MOTHER: ",self.mother_dir
370  self.img_name="%s/%s.png"%(self.mother_dir,self.name)
371  self.img_name=self.img_name.replace("Run summary","")
372  self.img_name=self.img_name.replace("/","_")
373  self.img_name=self.img_name.strip("_")
374  #print "IMAGE NAME: %s " %self.img_name
375  return self.img_name
376 
def replace(string, replacements)

◆ __make_image()

def dirstructure.Comparison.__make_image (   self,
  obj1,
  obj2 
)
private

Definition at line 398 of file dirstructure.py.

References dirstructure.Comparison.__get_img_name(), dirstructure.Comparison.img_name, ElectronMVAID.ElectronMVAID.name, HcalOfflineHarvesting.name, HcalOnlineHarvesting.name, HFRaddamTask.name, LaserTask.name, NoCQTask.name, PedestalTask.name, QIE10Task.name, QIE11Task.name, RecHitTask.name, UMNioTask.name, ZDCTask.name, AlignableObjectId::entry.name, RawTask.name, average.Average.name, counter.Counter.name, TPTask.name, histograms.Histograms.name, DigiTask.name, LEDTask.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::NAME.name, TmModule.name, FWLite.ElectronMVAID.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::RELEASE.name, DQMRivetClient::NormOption.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::JOB_NAME.name, cond::persistency::TAG::DESCRIPTION.name, cms::dd::NameValuePair< T >.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cond::persistency::TAG::MODIFICATION_TIME.name, cond::persistency::O2O_RUN::LOG.name, ParameterSet.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::PROTECTION_CODE.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, MEPSetData.name, AlignmentConstraint.name, PixelDCSObject< T >::Item.name, dataset.BaseDataset.name, SummaryTableOutputBranches::NamedBranchPtr.name, cms::dd::ValuePair< T, U >.name, fit::RootMinuitCommand.name, personalPlayback.Applet.name, Types._Untracked.name, EventStringOutputBranches::NamedBranchPtr.name, MagCylinder.name, analyzer.Analyzer.name, production_tasks.Task.name, HcalForwardLibWriter::FileHandle.name, DQMRivetClient::LumiOption.name, heppy::ParSet.name, cond::persistency::GTProxyData.name, LumiOutputBranches::NamedBranchPtr.name, TableOutputBranches::NamedBranchPtr.name, TriggerOutputBranches::NamedBranchPtr.name, CharmTagger::MVAVar.name, SingleObjectCondition.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, HeavyIonCSVTagger::MVAVar.name, cms::DDAlgoArguments.name, RHStopTracer::StopPoint.name, EgHLTOfflineSummaryClient::SumHistBinData.name, Barrel.name, cond::TimeTypeSpecs.name, perftools::EdmEventSize::BranchRecord.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, EcalLogicID.name, alignment.Alignment.name, lumi::TriggerInfo.name, PixelEndcapLinkMaker::Item.name, dirstructure.Weighted.name, XMLProcessor::_loaderBaseConfig.name, FWTableViewManager::TableEntry.name, MEtoEDM< T >::MEtoEDMObject.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, Supermodule.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, genericValidation.GenericValidation.name, CaloTrkProcessing::Detector.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cms::DDParsingContext::CompositeMaterial.name, MVAVar.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, DisplayManager.DisplayManager.name, cond::Tag_t.name, FWLite.WorkingPoints.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, FastHFShowerLibrary.name, magneticfield::BaseVolumeHandle.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, emtf::Node.name, PhysicsTools::Variable::Value.name, h4DSegm.name, PrintMaterialBudgetInfo.name, BTagProbabilityToDiscriminator::Discriminator.name, DQMGenericClient::NormOption.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, CounterChecker.name, DQMGenericClient::CDOption.name, PhysicsTools::Calibration::Variable.name, cond::TagInfo_t.name, TriggerObjectTableProducer::SelectedObject.name, TrackerSectorStruct.name, MuonGeometrySanityCheckPoint.name, cond::persistency::PAYLOAD::HASH.name, FCDTask.name, DQMGenericClient::NoFlowOption.name, looper.Looper.name, Mapper::definition< ScannerT >.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, EDMtoMEConverter.name, python.rootplot.tree2hists.Plot.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, PhysicsTools::TreeReader::Value.name, classes.MonitorData.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, HistogramManager.name, classes.OutputData.name, BPHDecayToResResBuilderBase::DZSelect.name, Crystal.name, h2DSegm.name, options.HLTProcessOptions.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, DQMNet::WaitObject.name, python.rootplot.utilities.Hist.name, AlpgenParameterName.name, config.Analyzer.name, geometry.Structure.name, hDigis.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, PhysicsTools::Variable.name, SiStripMonitorDigi.name, BulkSilicon.name, config.Service.name, adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.name, CaloSD::Detector.name, APD.name, core.autovars.NTupleCollection.name, nanoaod::FlatTable::Column.name, BPHRecoBuilder::BPHRecoSource.name, NanoAODDQM::SelGroupConfig.name, BPHRecoBuilder::BPHCompSource.name, StraightTrackAlignment::RPSetPlots.name, cond::persistency::TAG_AUTHORIZATION::TAG_NAME.name, cond::persistency::TAG_AUTHORIZATION::ACCESS_TYPE.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE.name, InnerLayerVolume.name, cond::payloadInspector::TagReference.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, personalPlayback.FrameworkJob.name, Grid.name, trklet::TrackletConfigBuilder::DTCinfo.name, Grille.name, BackPipe.name, plotscripts.SawTeethFunction.name, PatchPanel.name, BackCoolTank.name, DryAirTube.name, python.rootplot.utilities.RootFile.name, crabFunctions.CrabTask.name, MBCoolTube.name, hHits.name, MBManif.name, cscdqm::ParHistoDef.name, hDeltaR.name, hTMaxCell.name, BeautifulSoup.Tag.name, hParam.name, hMuonStat.name, hTOF.name, hTDelay.name, hTimes< hTime >.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, print(), l1t::EMTFTrack.rank, dirstructure.Comparison.rank, runall.testit.status, WorkFlowRunner.WorkFlowRunner.status, HcalChannelQualityGPU::Product.status, EcalRechitChannelStatusGPU::Product.status, lheh5::Particle.status, addOnTests.testit.status, RPCDQMObject::DQMObjectItem.status, TMatacq.status, SiPixelFedFillerWordEventNumber.status, PythiaFilterMultiMother.status, online::CTPPS_v1.status, MCSmartSingleParticleFilter.status, EcalPerEvtMatacqAnalyzer.status, DJpsiFilter.status, MCSingleParticleYPt.status, MCSingleParticleFilter.status, MCParticlePairFilter.status, PythiaFilter.status, RawToDigiConverter::Record.status, PythiaFilterMultiAncestor.status, l1tVertexFinder::VertexNTupler::GenParticlesBranchData.status, TotemVFATStatus.status, HemisphereAlgo.status, heppy::Megajet.status, EcalMatacqAnalyzer.status, pixelCPEforGPU::ClusParamsT< N >.status, heppy::Hemisphere.status, FastTimerService::ResourcesPerPath.status, dirstructure.Comparison.status, HCAL_HLX::CMS_STATUS_DATA.status, reco::GsfElectron::MvaOutput.status, dirstructure.Comparison.tcanvas_slow(), and dirstructure.Comparison.test_name.

398  def __make_image(self,obj1,obj2):
399  self.img_name=self.__get_img_name()
400  if self.rank==-1:
401  return 0
402 
403  canvas=ROOT.TCanvas(self.name,self.name,Comparison.canvas_xsize,Comparison.canvas_ysize)
404  objs=(obj1,obj2)
405 
406  # Add some specifics for the graphs
407  obj1.SetTitle(self.name)
408 
409  if obj1.GetNbinsY()!=0 and not "2" in obj1.ClassName() :
410  obj1 .SetLineWidth(2)
411  obj2 .SetLineWidth(2)
412 
413  obj1.SetMarkerStyle(8)
414  obj1.SetMarkerSize(.8)
415 
416  obj2.SetMarkerStyle(8)
417  obj2.SetMarkerSize(.8)
418 
419  obj1.SetMarkerColor(ROOT.kBlue)
420  obj1.SetLineColor(ROOT.kBlue)
421 
422  obj2.SetMarkerColor(ROOT.kRed)
423  obj2.SetLineColor(ROOT.kRed)
424 
425  obj1.Draw("EP")
426  #Statsbox
427  obj2.Draw("HistSames")
428  #ROOT.gPad.Update()
429  #if 'stats' in map(lambda o: o.GetName(),list(ROOT.gPad.GetListOfPrimitives())):
430  #st = gPad.GetPrimitive("stats")
431  #st.SetY1NDC(0.575)
432  #st.SetY2NDC(0.735)
433  #st.SetLineColor(ROOT.kRed)
434  #st.SetTextColor(ROOT.kRed)
435  #print st
436  else:
437  obj1.Draw("Colz")
438  ROOT.gPad.Update()
439  #if 'stats' in map(lambda o: o.GetName(),list(ROOT.gPad.GetListOfPrimitives())):
440  #st = ROOT.gPad.GetPrimitive("stats")
441  #st.SetY1NDC(0.575)
442  #st.SetY2NDC(0.735)
443  #st.SetLineColor(ROOT.kRed)
444  #st.SetTextColor(ROOT.kRed)
445  #print st
446  obj2.Draw("ColSame")
447 
448  # Put together the TLatex for the stat test if possible
449  color=ROOT.kGreen+2 # which is green, as everybody knows
450  if self.status==FAIL:
451  print("This comparison failed %f" %self.rank)
452  color=ROOT.kRed
453  elif self.status==NULL:
454  color=ROOT.kYellow
455  elif self.status==SKIPED:
456  color=ROOT.kBlue #check if kBlue exists ;)
457 
458  lat_text="#scale[.7]{#color[%s]{%s: %2.2f}}" %(color,self.test_name,self.rank)
459  lat=ROOT.TLatex(.1,.91,lat_text)
460  lat.SetNDC()
461  lat.Draw()
462 
463  # Put also the stats together!
464  n1=obj1.GetEntries()
465  if n1> 100000:
466  n1="%e"%n1
467  else:
468  n1="%s"%n1
469  n2=obj2.GetEntries()
470  if n2> 100000:
471  n2="%e"%n2
472  else:
473  n2="%s"%n2
474 
475  lat_text1="#scale[.7]{#color[%s]{Entries: %s}}" %(obj1.GetLineColor(),n1)
476  lat1=ROOT.TLatex(.3,.91,lat_text1)
477  lat1.SetNDC()
478  lat1.Draw()
479 
480 
481  lat_text2="#scale[.7]{#color[%s]{Entries: %s}}" %(obj2.GetLineColor(),n2)
482  lat2=ROOT.TLatex(.6,.91,lat_text2)
483  lat2.SetNDC()
484  lat2.Draw()
485 
486 
487  self.tcanvas_slow(canvas)
488 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ __make_img_dir()

def dirstructure.Comparison.__make_img_dir (   self)
private

Definition at line 363 of file dirstructure.py.

References dirstructure.Directory.mother_dir, and dirstructure.Comparison.mother_dir.

363  def __make_img_dir(self):
364  if not exists(self.mother_dir):
365  makedirs(self.mother_dir)
366 

◆ __repr__()

def dirstructure.Comparison.__repr__ (   self)

Definition at line 489 of file dirstructure.py.

References dirstructure.Comparison.img_name, ElectronMVAID.ElectronMVAID.name, HcalOfflineHarvesting.name, HcalOnlineHarvesting.name, LaserTask.name, NoCQTask.name, PedestalTask.name, QIE10Task.name, QIE11Task.name, RecHitTask.name, UMNioTask.name, ZDCTask.name, HFRaddamTask.name, AlignableObjectId::entry.name, RawTask.name, average.Average.name, counter.Counter.name, TPTask.name, DigiTask.name, histograms.Histograms.name, LEDTask.name, cond::persistency::TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, TmModule.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::NAME.name, FWLite.ElectronMVAID.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::OBJECT_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, DQMRivetClient::NormOption.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::O2O_RUN::JOB_NAME.name, cond::persistency::TAG::DESCRIPTION.name, cms::dd::NameValuePair< T >.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::START_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, FWTGeoRecoGeometry::Info.name, cond::persistency::O2O_RUN::END_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, cond::persistency::O2O_RUN::STATUS_CODE.name, cond::persistency::TAG::MODIFICATION_TIME.name, cond::persistency::O2O_RUN::LOG.name, ParameterSet.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::PROTECTION_CODE.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, MEPSetData.name, AlignmentConstraint.name, PixelDCSObject< T >::Item.name, dataset.BaseDataset.name, SummaryTableOutputBranches::NamedBranchPtr.name, cms::dd::ValuePair< T, U >.name, fit::RootMinuitCommand.name, personalPlayback.Applet.name, Types._Untracked.name, EventStringOutputBranches::NamedBranchPtr.name, MagCylinder.name, analyzer.Analyzer.name, production_tasks.Task.name, HcalForwardLibWriter::FileHandle.name, DQMRivetClient::LumiOption.name, heppy::ParSet.name, cond::persistency::GTProxyData.name, LumiOutputBranches::NamedBranchPtr.name, TableOutputBranches::NamedBranchPtr.name, TriggerOutputBranches::NamedBranchPtr.name, CharmTagger::MVAVar.name, SingleObjectCondition.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, HeavyIonCSVTagger::MVAVar.name, cms::DDAlgoArguments.name, RHStopTracer::StopPoint.name, EgHLTOfflineSummaryClient::SumHistBinData.name, Barrel.name, cond::TimeTypeSpecs.name, perftools::EdmEventSize::BranchRecord.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, EcalLogicID.name, alignment.Alignment.name, lumi::TriggerInfo.name, PixelEndcapLinkMaker::Item.name, XMLProcessor::_loaderBaseConfig.name, dirstructure.Weighted.name, MEtoEDM< T >::MEtoEDMObject.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, ExpressionHisto< T >.name, DQMGenericClient::EfficOption.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, Supermodule.name, genericValidation.GenericValidation.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, CaloTrkProcessing::Detector.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, options.ConnectionHLTMenu.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cms::DDParsingContext::CompositeMaterial.name, MVAVar.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, DisplayManager.DisplayManager.name, cond::Tag_t.name, FWLite.WorkingPoints.name, dqmoffline::l1t::HistDefinition.name, DQMGenericClient::ProfileOption.name, magneticfield::BaseVolumeHandle.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, FastHFShowerLibrary.name, emtf::Node.name, PhysicsTools::Variable::Value.name, h4DSegm.name, PrintMaterialBudgetInfo.name, BTagProbabilityToDiscriminator::Discriminator.name, DQMGenericClient::NormOption.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, DQMGenericClient::CDOption.name, CounterChecker.name, PhysicsTools::Calibration::Variable.name, cond::TagInfo_t.name, TrackerSectorStruct.name, TriggerObjectTableProducer::SelectedObject.name, MuonGeometrySanityCheckPoint.name, cond::persistency::PAYLOAD::HASH.name, FCDTask.name, DQMGenericClient::NoFlowOption.name, Mapper::definition< ScannerT >.name, looper.Looper.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, EDMtoMEConverter.name, python.rootplot.tree2hists.Plot.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, cond::persistency::PAYLOAD::VERSION.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, PhysicsTools::TreeReader::Value.name, classes.MonitorData.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, HistogramManager.name, classes.OutputData.name, BPHDecayToResResBuilderBase::DZSelect.name, Crystal.name, h2DSegm.name, options.HLTProcessOptions.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, cond::persistency::IOV::PAYLOAD_HASH.name, cond::persistency::IOV::INSERTION_TIME.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, DQMNet::WaitObject.name, python.rootplot.utilities.Hist.name, AlpgenParameterName.name, config.Analyzer.name, geometry.Structure.name, hDigis.name, core.autovars.NTupleSubObject.name, Capsule.name, core.autovars.NTupleObject.name, Ceramic.name, PhysicsTools::Variable.name, SiStripMonitorDigi.name, BulkSilicon.name, config.Service.name, adaptToRunAtMiniAOD.adaptToRunAtMiniAOD.name, CaloSD::Detector.name, APD.name, core.autovars.NTupleCollection.name, nanoaod::FlatTable::Column.name, BPHRecoBuilder::BPHRecoSource.name, NanoAODDQM::SelGroupConfig.name, BPHRecoBuilder::BPHCompSource.name, StraightTrackAlignment::RPSetPlots.name, cond::persistency::TAG_AUTHORIZATION::TAG_NAME.name, cond::persistency::TAG_AUTHORIZATION::ACCESS_TYPE.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL.name, cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE.name, InnerLayerVolume.name, cond::payloadInspector::TagReference.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, personalPlayback.FrameworkJob.name, Grid.name, trklet::TrackletConfigBuilder::DTCinfo.name, Grille.name, BackPipe.name, plotscripts.SawTeethFunction.name, PatchPanel.name, BackCoolTank.name, DryAirTube.name, python.rootplot.utilities.RootFile.name, crabFunctions.CrabTask.name, MBCoolTube.name, hHits.name, MBManif.name, cscdqm::ParHistoDef.name, hDeltaR.name, hTMaxCell.name, BeautifulSoup.Tag.name, hParam.name, hMuonStat.name, hTOF.name, hTDelay.name, hTimes< hTime >.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, l1t::EMTFTrack.rank, dirstructure.Comparison.rank, runall.testit.status, WorkFlowRunner.WorkFlowRunner.status, HcalChannelQualityGPU::Product.status, EcalRechitChannelStatusGPU::Product.status, lheh5::Particle.status, addOnTests.testit.status, RPCDQMObject::DQMObjectItem.status, TMatacq.status, SiPixelFedFillerWordEventNumber.status, PythiaFilterMultiMother.status, online::CTPPS_v1.status, EcalPerEvtMatacqAnalyzer.status, MCSmartSingleParticleFilter.status, DJpsiFilter.status, MCSingleParticleYPt.status, MCSingleParticleFilter.status, MCParticlePairFilter.status, PythiaFilter.status, RawToDigiConverter::Record.status, PythiaFilterMultiAncestor.status, l1tVertexFinder::VertexNTupler::GenParticlesBranchData.status, TotemVFATStatus.status, HemisphereAlgo.status, heppy::Megajet.status, EcalMatacqAnalyzer.status, pixelCPEforGPU::ClusParamsT< N >.status, heppy::Hemisphere.status, FastTimerService::ResourcesPerPath.status, dirstructure.Comparison.status, HCAL_HLX::CMS_STATUS_DATA.status, reco::GsfElectron::MvaOutput.status, and dirstructure.Comparison.test_name.

489  def __repr__(self):
490  return "%s , (%s=%s). IMG=%s. status=%s" %(self.name,self.test_name,self.rank,self.img_name,self.status)
491 
492 #-------------------------------------------------------------------------------
493 

◆ tcanvas_slow()

def dirstructure.Comparison.tcanvas_slow (   self,
  canvas 
)

Definition at line 377 of file dirstructure.py.

References dirstructure.Comparison.img_name, and FastTimerService_cff.range.

Referenced by dirstructure.Comparison.__make_image().

377  def tcanvas_slow(self,canvas):
378  #print "About to print %s" %self.img_name
379  #print_multi_threaded(canvas,self.img_name)
380  #print "-->Printed"
381 
382  p = Process(target=print_multi_threaded, args=(canvas,self.img_name))
383  p.start()
384  tcanvas_print_processes.append(p)
385  n_proc=len(tcanvas_print_processes)
386  if n_proc>3:
387  p_to_remove=[]
388  for iprocess in range(0,n_proc):
389  p=tcanvas_print_processes[iprocess]
390  p.join()
391  p_to_remove.append(iprocess)
392 
393  adjustment=0
394  for iprocess in p_to_remove:
395  tcanvas_print_processes.pop(iprocess-adjustment)
396  adjustment+=1
397 

Member Data Documentation

◆ canvas_xsize

dirstructure.Comparison.canvas_xsize
static

Definition at line 335 of file dirstructure.py.

◆ canvas_ysize

dirstructure.Comparison.canvas_ysize
static

Definition at line 336 of file dirstructure.py.

◆ do_pngs

dirstructure.Comparison.do_pngs

Definition at line 357 of file dirstructure.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

◆ draw_success

dirstructure.Comparison.draw_success

Definition at line 358 of file dirstructure.py.

◆ img_name

◆ mother_dir

dirstructure.Comparison.mother_dir

◆ name

◆ png_name

dirstructure.Comparison.png_name

Definition at line 339 of file dirstructure.py.

◆ rank

◆ status

dirstructure.Comparison.status

◆ test_name

dirstructure.Comparison.test_name

◆ test_thr

dirstructure.Comparison.test_thr

Definition at line 350 of file dirstructure.py.