CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions
dirstructure.Directory Class Reference
Inheritance diagram for dirstructure.Directory:
dirstructure.Weighted

Public Member Functions

def __init__
 
def __repr__
 
def calcStats
 
def get_fail_rate
 
def get_null_rate
 
def get_skiped_rate
 
def get_subdirs_dict
 
def get_subdirs_names
 
def get_success_rate
 
def get_summary_chart_ajax
 
def get_summary_chart_name
 
def is_empty
 
def print_report
 
def prune
 
- Public Member Functions inherited from dirstructure.Weighted
def __init__
 

Public Attributes

 comparisons
 
 do_pngs
 
 draw_success
 
 meta
 
 mother_dir
 
 n_comp_fails
 
 n_comp_nulls
 
 n_comp_skiped
 
 n_comp_successes
 
 n_fails
 
 n_nulls
 
 n_skiped
 
 n_successes
 
 rank_histo
 
 stats_calculated
 
 subdirs
 
 weight
 
- Public Attributes inherited from dirstructure.Weighted
 name
 
 weight
 

Private Member Functions

def __create_on_disk
 
def __create_pie_image
 
def __get_full_path
 

Detailed Description

Definition at line 61 of file dirstructure.py.

Constructor & Destructor Documentation

def dirstructure.Directory.__init__ (   self,
  name,
  mother_dir = "",
  meta = CompInfo(),
  draw_success = False,
  do_pngs = False 
)

Definition at line 62 of file dirstructure.py.

62 
63  def __init__(self,name,mother_dir="",meta=CompInfo(),draw_success=False,do_pngs=False):
64  self.mother_dir=mother_dir
65  self.meta=meta
66  self.subdirs=[]
67  self.comparisons=[]
68  self.n_fails=0
69  self.n_successes=0
70  self.n_nulls=0
71  self.n_skiped = 0
72  self.n_comp_skiped = 0
73  self.n_comp_fails=0
75  self.n_comp_nulls=0
76  self.weight=0
77  self.stats_calculated=False
78  Weighted.__init__(self,name)
79  self.draw_success=draw_success
80  self.do_pngs=do_pngs
81  self.rank_histo=TH1I("rh%s"%name,"",50,-0.01,1.001)
82  self.rank_histo.SetDirectory(0)

Member Function Documentation

def dirstructure.Directory.__create_on_disk (   self)
private

Definition at line 211 of file dirstructure.py.

References dirstructure.Directory.__get_full_path(), and dirstructure.Directory.mother_dir.

Referenced by dirstructure.Directory.__create_pie_image().

212  def __create_on_disk(self):
213  if not exists(self.mother_dir) and len(self.mother_dir)!=0:
214  makedirs(self.mother_dir)
215  full_path=self.__get_full_path()
216  if not exists(full_path) and len(full_path)>0:
217  makedirs(full_path)
def dirstructure.Directory.__create_pie_image (   self)
private

Definition at line 221 of file dirstructure.py.

References dirstructure.Directory.__create_on_disk(), dirstructure.Directory.get_fail_rate(), dirstructure.Directory.get_null_rate(), dirstructure.Directory.get_skiped_rate(), dirstructure.Directory.get_success_rate(), dirstructure.Directory.get_summary_chart_name(), dirstructure.Directory.n_fails, dirstructure.Directory.n_nulls, dirstructure.Directory.n_skiped, dirstructure.Directory.n_successes, cond::TagInfo.name, profilereader.FunctionInfo.name, genericValidation.GenericValidation.name, TmModule.name, Select.name, ora::RecordSpecImpl::Item.name, GifDisplay.name, alignment.Alignment.name, FWTGeoRecoGeometry::Info.name, Button.name, Types._Untracked.name, MyWatcher.name, PixelDCSObject< class >::Item.name, fit::RootMinuitCommand.name, ParameterSet.name, HcalForwardLibWriter::FileHandle.name, SeedingLayerSetsBuilder::LayerSpec.name, DQMRivetClient::LumiOption.name, MagCylinder.name, PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, PrintSensitive.name, RHStopTracer::StopPoint.name, CombinedMVAJetTagComputer::Computer.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, XMLHTRZeroSuppressionLoader::_loaderBaseConfig.name, XMLRBXPedestalsLoader::_loaderBaseConfig.name, CSCDCCExaminer::OStream.name, lumi::TriggerInfo.name, SingleObjectCondition.name, cond::TimeTypeSpecs.name, PrintMaterialBudgetInfo.name, MagVolume6Faces.name, perftools::EdmEventSize::BranchRecord.name, edm::PathSummary.name, DQMGenericClient::EfficOption.name, dirstructure.Weighted.name, PixelEndcapLinkMaker::Item.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, Mapper::definition< ScannerT >.name, options.ConnectionHLTMenu.name, EcalLogicID.name, McSelector.name, ExpressionHisto< T >.name, MEtoEDM< T >::MEtoEDMObject.name, RecoSelector.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, CaloTrkProcessing::Detector.name, XMLProcessor::_loaderBaseConfig.name, SensitiveDetector.name, PrintGeomInfoAction.name, MagGeoBuilderFromDDD::volumeHandle.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::NormOption.name, DQMGenericClient::CDOption.name, h4DSegm.name, PhysicsTools::Variable::Value.name, options.HLTProcessOptions.name, EDMtoMEConverter.name, ProcTMVA::Method.name, TreeSaver::Var.name, python.rootplot.tree2hists.Plot.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, PhysicsTools::TreeReader::Value.name, TotemSD.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, EfficiencyHandler.name, h2DSegm.name, python.rootplot.utilities.Hist.name, BscSD.name, DQMNet::WaitObject.name, stor::DataSenderMonitorCollection::OutputModuleRecord.name, SiStripMonitorDigi.name, AlpgenParameterName.name, FP420SD.name, Vardesc.name, public_plots_tools.ColorScheme.name, PhysicsTools::Variable.name, Namelist.name, PhysicsTools::TrainerMonitoring::Object.name, stor::DataSenderMonitorCollection::OutputModuleResult.name, plotscripts.SawTeethFunction.name, @15892::Id.name, python.rootplot.utilities.RootFile.name, hTMaxCell.name, cscdqm::ParHistoDef.name, @15888::Id.name, BeautifulSoup.SoupStrainer.name, and TiXmlAttribute.name.

222  def __create_pie_image(self):
223  self.__create_on_disk()
224  vals=[]
225  colors=[]
226  for n,col in zip((self.n_fails,self.n_nulls,self.n_successes,self.n_skiped),(kRed,kYellow,kGreen,kBlue)):
227  if n!=0:
228  vals.append(n)
229  colors.append(col)
230  valsa=array('f',vals)
231  colorsa=array('i',colors)
232  can = TCanvas("cpie","TPie test",100,100);
233  try:
234  pie = TPie("ThePie",self.name,len(vals),valsa,colorsa);
235  label_n=0
236  if self.n_fails!=0:
237  pie.SetEntryLabel(label_n, "Fail: %.1f(%i)" %(self.get_fail_rate(),self.n_fails) );
238  label_n+=1
239  if self.n_nulls!=0:
240  pie.SetEntryLabel(label_n, "Null: %.1f(%i)" %(self.get_null_rate(),self.n_nulls) );
241  label_n+=1
242  if self.n_successes!=0:
243  pie.SetEntryLabel(label_n, "Success: %.1f(%i)" %(self.get_success_rate(),self.n_successes) );
244  if self.n_skiped!=0:
245  pie.SetEntryLabel(label_n, "Skipped: %.1f(%i)" %(self.get_skiped_rate(),self.n_skiped));
246  pie.SetY(.52);
247  pie.SetAngularOffset(0.);
248  pie.SetLabelsOffset(-.3);
249  #pie.SetLabelFormat("#splitline{%val (%perc)}{%txt}");
250  pie.Draw("3d nol");
251  can.Print(self.get_summary_chart_name());
252  except:
253  print "self.name = %s" %self.name
254  print "len(vals) = %s (vals=%s)" %(len(vals),vals)
255  print "valsa = %s" %valsa
256  print "colorsa = %s" %colorsa
def dirstructure.Directory.__get_full_path (   self)
private

Definition at line 205 of file dirstructure.py.

References join(), dirstructure.Directory.mother_dir, cond::TagInfo.name, profilereader.FunctionInfo.name, genericValidation.GenericValidation.name, TmModule.name, ora::RecordSpecImpl::Item.name, Select.name, FWTGeoRecoGeometry::Info.name, alignment.Alignment.name, GifDisplay.name, Button.name, Types._Untracked.name, MyWatcher.name, PixelDCSObject< class >::Item.name, fit::RootMinuitCommand.name, ParameterSet.name, HcalForwardLibWriter::FileHandle.name, SeedingLayerSetsBuilder::LayerSpec.name, DQMRivetClient::LumiOption.name, MagCylinder.name, PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, PrintSensitive.name, RHStopTracer::StopPoint.name, CombinedMVAJetTagComputer::Computer.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, CSCDCCExaminer::OStream.name, lumi::TriggerInfo.name, XMLRBXPedestalsLoader::_loaderBaseConfig.name, SingleObjectCondition.name, XMLHTRZeroSuppressionLoader::_loaderBaseConfig.name, cond::TimeTypeSpecs.name, PrintMaterialBudgetInfo.name, MagVolume6Faces.name, DQMGenericClient::EfficOption.name, edm::PathSummary.name, dirstructure.Weighted.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, options.ConnectionHLTMenu.name, Mapper::definition< ScannerT >.name, McSelector.name, EcalLogicID.name, MEtoEDM< T >::MEtoEDMObject.name, RecoSelector.name, ExpressionHisto< T >.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, CaloTrkProcessing::Detector.name, SensitiveDetector.name, XMLProcessor::_loaderBaseConfig.name, PrintGeomInfoAction.name, MagGeoBuilderFromDDD::volumeHandle.name, DQMGenericClient::NormOption.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, h4DSegm.name, PhysicsTools::Variable::Value.name, options.HLTProcessOptions.name, EDMtoMEConverter.name, ProcTMVA::Method.name, TreeSaver::Var.name, python.rootplot.tree2hists.Plot.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, PhysicsTools::TreeReader::Value.name, TotemSD.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, EfficiencyHandler.name, h2DSegm.name, python.rootplot.utilities.Hist.name, BscSD.name, DQMNet::WaitObject.name, stor::DataSenderMonitorCollection::OutputModuleRecord.name, SiStripMonitorDigi.name, AlpgenParameterName.name, FP420SD.name, Vardesc.name, public_plots_tools.ColorScheme.name, PhysicsTools::Variable.name, Namelist.name, PhysicsTools::TrainerMonitoring::Object.name, stor::DataSenderMonitorCollection::OutputModuleResult.name, plotscripts.SawTeethFunction.name, @15892::Id.name, python.rootplot.utilities.RootFile.name, hTMaxCell.name, cscdqm::ParHistoDef.name, @15888::Id.name, BeautifulSoup.SoupStrainer.name, and TiXmlAttribute.name.

Referenced by dirstructure.Directory.__create_on_disk(), and dirstructure.Directory.get_summary_chart_name().

206  def __get_full_path(self):
207  #print "Mother is %s" %self.mother_dir
208  if len(self.mother_dir)==0:
209  return self.name
210  return join(self.mother_dir,self.name)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def dirstructure.Directory.__repr__ (   self)

Definition at line 301 of file dirstructure.py.

References dirstructure.Directory.comparisons, dirstructure.Directory.get_fail_rate(), dirstructure.Directory.get_null_rate(), dirstructure.Directory.get_success_rate(), DEutils< T >.is_empty(), DEcompare< T >.is_empty(), dirstructure.Directory.is_empty(), create_public_lumi_plots.LumiDataBlock.is_empty(), dirstructure.Directory.n_fails, dirstructure.Directory.n_nulls, dirstructure.Directory.n_successes, cond::TagInfo.name, profilereader.FunctionInfo.name, genericValidation.GenericValidation.name, TmModule.name, Select.name, ora::RecordSpecImpl::Item.name, GifDisplay.name, FWTGeoRecoGeometry::Info.name, alignment.Alignment.name, Button.name, Types._Untracked.name, MyWatcher.name, PixelDCSObject< class >::Item.name, fit::RootMinuitCommand.name, ParameterSet.name, HcalForwardLibWriter::FileHandle.name, SeedingLayerSetsBuilder::LayerSpec.name, DQMRivetClient::LumiOption.name, MagCylinder.name, PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, PrintSensitive.name, RHStopTracer::StopPoint.name, CombinedMVAJetTagComputer::Computer.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, XMLRBXPedestalsLoader::_loaderBaseConfig.name, CSCDCCExaminer::OStream.name, lumi::TriggerInfo.name, SingleObjectCondition.name, XMLHTRZeroSuppressionLoader::_loaderBaseConfig.name, cond::TimeTypeSpecs.name, PrintMaterialBudgetInfo.name, MagVolume6Faces.name, perftools::EdmEventSize::BranchRecord.name, DQMGenericClient::EfficOption.name, edm::PathSummary.name, dirstructure.Weighted.name, PixelEndcapLinkMaker::Item.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, Mapper::definition< ScannerT >.name, options.ConnectionHLTMenu.name, McSelector.name, EcalLogicID.name, ExpressionHisto< T >.name, MEtoEDM< T >::MEtoEDMObject.name, RecoSelector.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, SensitiveDetector.name, XMLProcessor::_loaderBaseConfig.name, CaloTrkProcessing::Detector.name, PrintGeomInfoAction.name, MagGeoBuilderFromDDD::volumeHandle.name, DQMGenericClient::NormOption.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, h4DSegm.name, PhysicsTools::Variable::Value.name, options.HLTProcessOptions.name, EDMtoMEConverter.name, ProcTMVA::Method.name, TreeSaver::Var.name, python.rootplot.tree2hists.Plot.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, TotemSD.name, PhysicsTools::TreeReader::Value.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, EfficiencyHandler.name, h2DSegm.name, python.rootplot.utilities.Hist.name, BscSD.name, stor::DataSenderMonitorCollection::OutputModuleRecord.name, DQMNet::WaitObject.name, SiStripMonitorDigi.name, AlpgenParameterName.name, FP420SD.name, Vardesc.name, public_plots_tools.ColorScheme.name, PhysicsTools::Variable.name, Namelist.name, PhysicsTools::TrainerMonitoring::Object.name, stor::DataSenderMonitorCollection::OutputModuleResult.name, plotscripts.SawTeethFunction.name, @15892::Id.name, python.rootplot.utilities.RootFile.name, hTMaxCell.name, cscdqm::ParHistoDef.name, @15888::Id.name, BeautifulSoup.SoupStrainer.name, TiXmlAttribute.name, and dirstructure.Directory.subdirs.

302  def __repr__(self):
303  if self.is_empty():
304  return "%s seems to be empty. Please check!" %self.name
305  content="%s , Rates: Success %.2f%%(%s) - Fail %.2f%%(%s) - Null %.2f%%(%s)\n" %(self.name,self.get_success_rate(),self.n_successes,self.get_fail_rate(),self.n_fails,self.get_null_rate(),self.n_nulls)
306  for subdir in self.subdirs:
307  content+=" %s\n" % subdir
308  for comp in self.comparisons:
309  content+=" %s\n" % comp
310  return content
311 
#-------------------------------------------------------------------------------
def dirstructure.Directory.calcStats (   self,
  make_pie = True 
)
Walk all subdirs and calculate weight,fails and successes.
Moreove propagate the sample and releases names.

Definition at line 88 of file dirstructure.py.

References dirstructure.Directory.comparisons, alcazmumu_cfi.filter, join(), dirstructure.Directory.meta, dirstructure.Directory.mother_dir, dirstructure.Directory.n_comp_fails, dirstructure.Directory.n_comp_nulls, dirstructure.Directory.n_comp_skiped, dirstructure.Directory.n_comp_successes, dirstructure.Directory.n_fails, dirstructure.Directory.n_nulls, dirstructure.Directory.n_skiped, dirstructure.Directory.n_successes, cond::TagInfo.name, profilereader.FunctionInfo.name, genericValidation.GenericValidation.name, TmModule.name, ora::RecordSpecImpl::Item.name, Select.name, FWTGeoRecoGeometry::Info.name, GifDisplay.name, alignment.Alignment.name, Button.name, Types._Untracked.name, MyWatcher.name, PixelDCSObject< class >::Item.name, ParameterSet.name, fit::RootMinuitCommand.name, HcalForwardLibWriter::FileHandle.name, DQMRivetClient::LumiOption.name, MagCylinder.name, SeedingLayerSetsBuilder::LayerSpec.name, PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, PrintSensitive.name, RHStopTracer::StopPoint.name, DQMRivetClient::ScaleFactorOption.name, CombinedMVAJetTagComputer::Computer.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, CSCDCCExaminer::OStream.name, XMLHTRZeroSuppressionLoader::_loaderBaseConfig.name, XMLRBXPedestalsLoader::_loaderBaseConfig.name, lumi::TriggerInfo.name, SingleObjectCondition.name, cond::TimeTypeSpecs.name, MagVolume6Faces.name, PrintMaterialBudgetInfo.name, edm::PathSummary.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, DQMGenericClient::EfficOption.name, dirstructure.Weighted.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, options.ConnectionHLTMenu.name, Mapper::definition< ScannerT >.name, McSelector.name, EcalLogicID.name, RecoSelector.name, ExpressionHisto< T >.name, MEtoEDM< T >::MEtoEDMObject.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, XMLProcessor::_loaderBaseConfig.name, CaloTrkProcessing::Detector.name, SensitiveDetector.name, PrintGeomInfoAction.name, MagGeoBuilderFromDDD::volumeHandle.name, DQMGenericClient::NormOption.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, h4DSegm.name, PhysicsTools::Variable::Value.name, options.HLTProcessOptions.name, ProcTMVA::Method.name, EDMtoMEConverter.name, TreeSaver::Var.name, python.rootplot.tree2hists.Plot.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, TotemSD.name, PhysicsTools::TreeReader::Value.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, EfficiencyHandler.name, h2DSegm.name, python.rootplot.utilities.Hist.name, BscSD.name, stor::DataSenderMonitorCollection::OutputModuleRecord.name, DQMNet::WaitObject.name, SiStripMonitorDigi.name, AlpgenParameterName.name, FP420SD.name, Vardesc.name, public_plots_tools.ColorScheme.name, PhysicsTools::Variable.name, Namelist.name, PhysicsTools::TrainerMonitoring::Object.name, stor::DataSenderMonitorCollection::OutputModuleResult.name, plotscripts.SawTeethFunction.name, @15892::Id.name, python.rootplot.utilities.RootFile.name, hTMaxCell.name, cscdqm::ParHistoDef.name, @15888::Id.name, BeautifulSoup.SoupStrainer.name, TiXmlAttribute.name, dirstructure.Directory.stats_calculated, dirstructure.Directory.subdirs, RPCDQMObject::DQMObjectItem.weight, JetAnaPythia< Jet >.weight, TtFullLepKinSolver::NeutrinoSolution.weight, ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots.weight, SeedCandidate.weight, dirstructure.Weighted.weight, ExtendedPerigeeTrajectoryError.weight, LHEProducer.weight, MuIsolatorResultProducer< BT >::DepositConf.weight, DTTrigTest.weight, TreeSaver.weight, L1PromptAnalysis.weight, ProcTMVA.weight, and areaInfo.weight.

Referenced by dirstructure.Directory.print_report().

88 
89  def calcStats(self,make_pie=True):
90  '''Walk all subdirs and calculate weight,fails and successes.
91  Moreove propagate the sample and releases names.
92  '''
93  if self.stats_calculated:
94  return 0
95 
96  self.n_fails=0
97  self.n_successes=0
98  self.n_nulls=0
99  self.n_comp_fails=0
100  self.n_comp_successes=0
101  self.n_comp_nulls=0
102  self.weight=0
103 
104  self.n_skiped = 0
105  self.n_comp_skiped = 0
106 
107  # clean from empty dirs
108  self.subdirs = filter(lambda subdir: not subdir.is_empty(),self.subdirs)
109 
110  for comp in self.comparisons:
111  if comp.status == SKIPED: #in case its in black list & skiped
112  self.n_skiped += 1
113  self.n_comp_skiped += 1
114  self.weight+=1
115  else: #else original code -> to check for Fails and Successes
116  self.rank_histo.Fill(comp.rank)
117  self.weight+=1
118  if comp.status == FAIL:
119  self.n_fails+=1
120  self.n_comp_fails+=1
121  elif comp.status == SUCCESS:
122  self.n_successes+=1
123  self.n_comp_successes+=1
124  else:
125  self.n_nulls+=1
126  self.n_comp_nulls+=1
127 
128  for subdir in self.subdirs:
129  subdir.mother_dir=join(self.mother_dir,self.name)
130  subdir.calcStats(make_pie)
131  subdir.meta=self.meta
132  self.weight+=subdir.weight
133  self.n_fails+=subdir.n_fails
134  self.n_successes+=subdir.n_successes
135  self.n_nulls+=subdir.n_nulls
136 
137  self.n_skiped+=subdir.n_skiped
138 
139  self.rank_histo.Add(subdir.rank_histo)
140 
141  self.stats_calculated=True
142  #if make_pie:
143  #self.__create_pie_image()
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def dirstructure.Directory.get_fail_rate (   self)

Definition at line 193 of file dirstructure.py.

References dirstructure.Directory.n_fails, RPCDQMObject::DQMObjectItem.weight, JetAnaPythia< Jet >.weight, TtFullLepKinSolver::NeutrinoSolution.weight, ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots.weight, SeedCandidate.weight, ExtendedPerigeeTrajectoryError.weight, dirstructure.Weighted.weight, LHEProducer.weight, MuIsolatorResultProducer< BT >::DepositConf.weight, DTTrigTest.weight, TreeSaver.weight, L1PromptAnalysis.weight, ProcTMVA.weight, and areaInfo.weight.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.__repr__(), dirstructure.Directory.get_summary_chart_ajax(), and dirstructure.Directory.print_report().

194  def get_fail_rate(self):
195  if self.weight == 0:return 0
196  return 100.*self.n_fails/self.weight
def dirstructure.Directory.get_null_rate (   self)

Definition at line 201 of file dirstructure.py.

References dirstructure.Directory.n_nulls, RPCDQMObject::DQMObjectItem.weight, JetAnaPythia< Jet >.weight, TtFullLepKinSolver::NeutrinoSolution.weight, ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots.weight, SeedCandidate.weight, ExtendedPerigeeTrajectoryError.weight, dirstructure.Weighted.weight, LHEProducer.weight, MuIsolatorResultProducer< BT >::DepositConf.weight, DTTrigTest.weight, TreeSaver.weight, L1PromptAnalysis.weight, ProcTMVA.weight, and areaInfo.weight.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.__repr__(), dirstructure.Directory.get_summary_chart_ajax(), and dirstructure.Directory.print_report().

202  def get_null_rate(self):
203  if self.weight == 0:return 0
204  return 100.*self.n_nulls/self.weight
def dirstructure.Directory.get_skiped_rate (   self)

Definition at line 190 of file dirstructure.py.

References dirstructure.Directory.n_skiped, RPCDQMObject::DQMObjectItem.weight, JetAnaPythia< Jet >.weight, TtFullLepKinSolver::NeutrinoSolution.weight, ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots.weight, SeedCandidate.weight, ExtendedPerigeeTrajectoryError.weight, dirstructure.Weighted.weight, LHEProducer.weight, MuIsolatorResultProducer< BT >::DepositConf.weight, DTTrigTest.weight, TreeSaver.weight, L1PromptAnalysis.weight, ProcTMVA.weight, and areaInfo.weight.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.get_summary_chart_ajax(), and dirstructure.Directory.print_report().

191  def get_skiped_rate(self):
192  if self.weight == 0: return 0
return 100.*self.n_skiped/self.weight
def dirstructure.Directory.get_subdirs_dict (   self)

Definition at line 144 of file dirstructure.py.

References dirstructure.Directory.subdirs.

145  def get_subdirs_dict(self):
146  subdirdict={}
147  for subdir in self.subdirs:
148  subdirdict[subdir.name]=subdir
149  return subdirdict
def dirstructure.Directory.get_subdirs_names (   self)

Definition at line 150 of file dirstructure.py.

References dirstructure.Directory.subdirs.

151  def get_subdirs_names(self):
152  subdirnames=[]
153  for subdir in self.subdirs:
154  subdirnames.append(subdir.name)
155  return subdirnames
def dirstructure.Directory.get_success_rate (   self)

Definition at line 197 of file dirstructure.py.

References dirstructure.Directory.n_successes, RPCDQMObject::DQMObjectItem.weight, JetAnaPythia< Jet >.weight, TtFullLepKinSolver::NeutrinoSolution.weight, ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots.weight, SeedCandidate.weight, ExtendedPerigeeTrajectoryError.weight, dirstructure.Weighted.weight, LHEProducer.weight, MuIsolatorResultProducer< BT >::DepositConf.weight, DTTrigTest.weight, TreeSaver.weight, L1PromptAnalysis.weight, ProcTMVA.weight, and areaInfo.weight.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.__repr__(), dirstructure.Directory.get_summary_chart_ajax(), and dirstructure.Directory.print_report().

198  def get_success_rate(self):
199  if self.weight == 0:return 1
200  return 100.*self.n_successes/self.weight
def dirstructure.Directory.get_summary_chart_ajax (   self,
  w = 400,
  h = 300 
)
Emit the ajax to build a pie chart using google apis...

Definition at line 156 of file dirstructure.py.

References dirstructure.Directory.get_fail_rate(), dirstructure.Directory.get_null_rate(), dirstructure.Directory.get_skiped_rate(), and dirstructure.Directory.get_success_rate().

157  def get_summary_chart_ajax(self,w=400,h=300):
158  """Emit the ajax to build a pie chart using google apis...
159  """
160  url = "https://chart.googleapis.com/chart?"
161  url+= "cht=p3" # Select the 3d chart
162  #url+= "&chl=Success|Null|Fail" # give labels
163  url+= "&chco=00FF00|FFFF00|FF0000|7A7A7A" # give colours to labels
164  url+= "&chs=%sx%s" %(w,h)
165  #url+= "&chtt=%s" %self.name
166  url+= "&chd=t:%.2f,%.2f,%.2f,%.2f"%(self.get_success_rate(),self.get_null_rate(),self.get_fail_rate(),self.get_skiped_rate())
167 
168  return url
def dirstructure.Directory.get_summary_chart_name (   self)

Definition at line 218 of file dirstructure.py.

References dirstructure.Directory.__get_full_path(), and join().

Referenced by dirstructure.Directory.__create_pie_image().

219  def get_summary_chart_name(self):
220  return join(self.__get_full_path(),"summary_chart.png")
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def dirstructure.Directory.is_empty (   self)

Definition at line 83 of file dirstructure.py.

References dirstructure.Directory.comparisons, and dirstructure.Directory.subdirs.

Referenced by dirstructure.Directory.__repr__(), and utils_v2.StatisticalTest.do_test().

83 
84  def is_empty(self):
85  if len(self.subdirs)==0 and len(self.comparisons)==0:
86  return True
87  return False
def dirstructure.Directory.print_report (   self,
  indent = "",
  verbose = False 
)

Definition at line 169 of file dirstructure.py.

References dirstructure.Directory.calcStats(), dirstructure.Directory.comparisons, alcazmumu_cfi.filter, dirstructure.Directory.get_fail_rate(), dirstructure.Directory.get_null_rate(), dirstructure.Directory.get_skiped_rate(), dirstructure.Directory.get_success_rate(), dirstructure.Directory.mother_dir, dirstructure.Directory.n_fails, dirstructure.Directory.n_nulls, dirstructure.Directory.n_skiped, dirstructure.Directory.n_successes, cond::TagInfo.name, profilereader.FunctionInfo.name, genericValidation.GenericValidation.name, TmModule.name, Select.name, ora::RecordSpecImpl::Item.name, GifDisplay.name, FWTGeoRecoGeometry::Info.name, alignment.Alignment.name, Button.name, Types._Untracked.name, MyWatcher.name, PixelDCSObject< class >::Item.name, fit::RootMinuitCommand.name, ParameterSet.name, HcalForwardLibWriter::FileHandle.name, MagCylinder.name, SeedingLayerSetsBuilder::LayerSpec.name, DQMRivetClient::LumiOption.name, PFTauMVAInputDiscriminantTranslator::DiscriminantInfo.name, PrintSensitive.name, RHStopTracer::StopPoint.name, CombinedMVAJetTagComputer::Computer.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, XMLRBXPedestalsLoader::_loaderBaseConfig.name, CSCDCCExaminer::OStream.name, lumi::TriggerInfo.name, SingleObjectCondition.name, XMLHTRZeroSuppressionLoader::_loaderBaseConfig.name, cond::TimeTypeSpecs.name, PrintMaterialBudgetInfo.name, MagVolume6Faces.name, perftools::EdmEventSize::BranchRecord.name, DQMGenericClient::EfficOption.name, edm::PathSummary.name, dirstructure.Weighted.name, PixelEndcapLinkMaker::Item.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, Mapper::definition< ScannerT >.name, options.ConnectionHLTMenu.name, McSelector.name, EcalLogicID.name, ExpressionHisto< T >.name, MEtoEDM< T >::MEtoEDMObject.name, RecoSelector.name, python.rootplot.utilities.Hist2D.name, TreeCrawler.Package.name, XMLProcessor::_loaderBaseConfig.name, CaloTrkProcessing::Detector.name, SensitiveDetector.name, PrintGeomInfoAction.name, MagGeoBuilderFromDDD::volumeHandle.name, DQMGenericClient::NormOption.name, PhysicsTools::Calibration::Variable.name, DQMGenericClient::CDOption.name, h4DSegm.name, PhysicsTools::Variable::Value.name, options.HLTProcessOptions.name, EDMtoMEConverter.name, ProcTMVA::Method.name, TreeSaver::Var.name, python.rootplot.tree2hists.Plot.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, PhysicsTools::TreeReader::Value.name, TotemSD.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, EfficiencyHandler.name, h2DSegm.name, python.rootplot.utilities.Hist.name, BscSD.name, stor::DataSenderMonitorCollection::OutputModuleRecord.name, DQMNet::WaitObject.name, SiStripMonitorDigi.name, AlpgenParameterName.name, FP420SD.name, Vardesc.name, public_plots_tools.ColorScheme.name, PhysicsTools::Variable.name, Namelist.name, PhysicsTools::TrainerMonitoring::Object.name, stor::DataSenderMonitorCollection::OutputModuleResult.name, plotscripts.SawTeethFunction.name, @15892::Id.name, python.rootplot.utilities.RootFile.name, hTMaxCell.name, cscdqm::ParHistoDef.name, @15888::Id.name, BeautifulSoup.SoupStrainer.name, TiXmlAttribute.name, dirstructure.Directory.subdirs, RPCDQMObject::DQMObjectItem.weight, JetAnaPythia< Jet >.weight, TtFullLepKinSolver::NeutrinoSolution.weight, ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFitPlots.weight, SeedCandidate.weight, ExtendedPerigeeTrajectoryError.weight, dirstructure.Weighted.weight, LHEProducer.weight, MuIsolatorResultProducer< BT >::DepositConf.weight, DTTrigTest.weight, TreeSaver.weight, L1PromptAnalysis.weight, ProcTMVA.weight, and areaInfo.weight.

170  def print_report(self,indent="",verbose=False):
171  if len(indent)==0:
172  self.calcStats(make_pie=False)
173  # print small failure report
174  if verbose:
175  fail_comps=filter(lambda comp:comp.status==FAIL,self.comparisons)
176  fail_comps=sorted(fail_comps,key=lambda comp:comp.name )
177  if len(fail_comps)>0:
178  print indent+"* %s/%s:" %(self.mother_dir,self.name)
179  for comp in fail_comps:
180  print indent+" - %s: %s Test Failed (pval = %s) " %(comp.name,comp.test_name,comp.rank)
181  for subdir in self.subdirs:
182  subdir.print_report(indent+" ",verbose)
183 
184  if len(indent)==0:
185  print "\n%s - summary of %s tests:" %(self.name,self.weight)
186  print " o Failiures: %.2f%% (%s/%s)" %(self.get_fail_rate(),self.n_fails,self.weight)
187  print " o Nulls: %.2f%% (%s/%s) " %(self.get_null_rate(),self.n_nulls,self.weight)
188  print " o Successes: %.2f%% (%s/%s) " %(self.get_success_rate(),self.n_successes,self.weight)
189  print " o Skipped: %.2f%% (%s/%s) " %(self.get_skiped_rate(),self.n_skiped,self.weight)
def dirstructure.Directory.prune (   self,
  expandable_dir 
)
Eliminate from the tree the directory the expandable ones.

Definition at line 257 of file dirstructure.py.

References dirstructure.Directory.comparisons, dirstructure.Directory.n_comp_fails, dirstructure.Directory.n_comp_nulls, dirstructure.Directory.n_comp_skiped, dirstructure.Directory.n_comp_successes, TtEventPartons.prune(), dirstructure.Directory.prune(), Config.Process.prune(), and dirstructure.Directory.subdirs.

Referenced by dirstructure.Directory.prune().

258  def prune(self,expandable_dir):
259  """Eliminate from the tree the directory the expandable ones.
260  """
261  #print "pruning %s" %self.name
262  exp_index=-1
263  counter=0
264  for subdir in self.subdirs:
265  # Eliminate any trace of the expandable path in the mother directories
266  # for depths higher than 1
267  subdir.mother_dir=subdir.mother_dir.replace("/"+expandable_dir,"")
268  if subdir.name==expandable_dir:
269  exp_index=counter
270  counter+=1
271 
272  # Did we find an expandable?
273  if exp_index>=0:
274  exp_dir=self.subdirs[exp_index]
275  for subsubdir in exp_dir.subdirs:
276  #print "*******",subsubdir.mother_dir,
277  subsubdir.mother_dir=subsubdir.mother_dir.replace("/"+expandable_dir,"")
278  while "//" in subsubdir.mother_dir:
279  print subsubdir.mother_dir
280  subsubdir.mother_dir=subsubdir.mother_dir.replace("//","/")
281  #print "*******",subsubdir.mother_dir
282  self.subdirs.append(subsubdir)
283 
284  for comp in exp_dir.comparisons:
285  comp.mother_dir=comp.mother_dir.replace("/"+expandable_dir,"")
286  while "//" in comp.mother_dir:
287  comp.mother_dir
288  comp.mother_dir=comp.mother_dir.replace("/")
289  if not comp in self.comparisons: #in case not to append same comparisons few times
290  self.comparisons.append(comp) # add a comparison
291  self.n_comp_fails = exp_dir.n_comp_fails #copy to-be removed directory
292  self.n_comp_nulls = exp_dir.n_comp_nulls # numbers to parent directory
293  self.n_comp_successes = exp_dir.n_comp_successes
294  self.n_comp_skiped = exp_dir.n_comp_skiped
295 
296  del self.subdirs[exp_index]
297  self.prune(expandable_dir)
298 
299  for subdir in self.subdirs:
300  subdir.prune(expandable_dir)

Member Data Documentation

dirstructure.Directory.comparisons

Definition at line 66 of file dirstructure.py.

Referenced by dirstructure.Directory.__repr__(), dirstructure.Directory.calcStats(), dirstructure.Directory.is_empty(), dirstructure.Directory.print_report(), and dirstructure.Directory.prune().

dirstructure.Directory.do_pngs

Definition at line 79 of file dirstructure.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dirstructure.Directory.draw_success

Definition at line 78 of file dirstructure.py.

dirstructure.Directory.meta

Definition at line 64 of file dirstructure.py.

Referenced by dirstructure.Directory.calcStats().

dirstructure.Directory.mother_dir

Definition at line 63 of file dirstructure.py.

Referenced by dirstructure.Directory.__create_on_disk(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dirstructure.Comparison.__make_img_dir(), dirstructure.Directory.calcStats(), and dirstructure.Directory.print_report().

dirstructure.Directory.n_comp_fails

Definition at line 72 of file dirstructure.py.

Referenced by dirstructure.Directory.calcStats(), and dirstructure.Directory.prune().

dirstructure.Directory.n_comp_nulls

Definition at line 74 of file dirstructure.py.

Referenced by dirstructure.Directory.calcStats(), and dirstructure.Directory.prune().

dirstructure.Directory.n_comp_skiped

Definition at line 71 of file dirstructure.py.

Referenced by dirstructure.Directory.calcStats(), and dirstructure.Directory.prune().

dirstructure.Directory.n_comp_successes

Definition at line 73 of file dirstructure.py.

Referenced by dirstructure.Directory.calcStats(), and dirstructure.Directory.prune().

dirstructure.Directory.n_fails

Definition at line 67 of file dirstructure.py.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.__repr__(), dirstructure.Directory.calcStats(), dirstructure.Directory.get_fail_rate(), and dirstructure.Directory.print_report().

dirstructure.Directory.n_nulls

Definition at line 69 of file dirstructure.py.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.__repr__(), dirstructure.Directory.calcStats(), dirstructure.Directory.get_null_rate(), and dirstructure.Directory.print_report().

dirstructure.Directory.n_skiped

Definition at line 70 of file dirstructure.py.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.calcStats(), dirstructure.Directory.get_skiped_rate(), and dirstructure.Directory.print_report().

dirstructure.Directory.n_successes

Definition at line 68 of file dirstructure.py.

Referenced by dirstructure.Directory.__create_pie_image(), dirstructure.Directory.__repr__(), dirstructure.Directory.calcStats(), dirstructure.Directory.get_success_rate(), and dirstructure.Directory.print_report().

dirstructure.Directory.rank_histo

Definition at line 80 of file dirstructure.py.

dirstructure.Directory.stats_calculated

Definition at line 76 of file dirstructure.py.

Referenced by dirstructure.Directory.calcStats().

dirstructure.Directory.subdirs

Definition at line 65 of file dirstructure.py.

Referenced by dirstructure.Directory.__repr__(), dirstructure.Directory.calcStats(), dirstructure.Directory.get_subdirs_dict(), dirstructure.Directory.get_subdirs_names(), dirstructure.Directory.is_empty(), dirstructure.Directory.print_report(), and dirstructure.Directory.prune().

dirstructure.Directory.weight

Definition at line 75 of file dirstructure.py.