CMS 3D CMS Logo

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

Functions

def collect_directory_filenames
 
def dqm_diff
 
def get_content
 

Variables

string dest = 'show_exec_time'
 
tuple parser = OptionParser(usage='usage: %prog <root_file1> <root_file2> [options]')
 Define commandline options. More...
 
tuple start = datetime.now()
 Check for commandline option errors. More...
 

Function Documentation

def dqm_diff.collect_directory_filenames (   directory,
  names_list 
)
Adds current directory file (histogram) names to ``names_list``. Then
recursively calls itself for every current directory sub-directories.

Definition at line 11 of file dqm_diff.py.

References split.

Referenced by get_content().

11 
12 def collect_directory_filenames(directory, names_list):
13  """Adds current directory file (histogram) names to ``names_list``. Then
14  recursively calls itself for every current directory sub-directories."""
15  for key in directory.GetListOfKeys():
16  subdir = directory.Get(key.GetName())
17  if subdir:
18  if subdir.IsFolder():
19  collect_directory_filenames(subdir, names_list)
20  else:
21  filename = directory.GetPath().split(':')[1] + ': ' + subdir.GetName()
22  names_list.add(filename)
def collect_directory_filenames
Definition: dqm_diff.py:11
double split
Definition: MVATrainer.cc:139
def dqm_diff.dqm_diff (   filename1,
  filename2 
)
Prints file (histogram) names that are in <file1> and not in <file2>.

Definition at line 33 of file dqm_diff.py.

References get_content().

33 
34 def dqm_diff(filename1, filename2):
35  """Prints file (histogram) names that are in <file1> and not in <file2>."""
36  print "Missing files:"
37  content1 = get_content(filename1)
38  content2 = get_content(filename2)
39  printed = False
40  for name in content1:
41  if name not in content2:
42  print " ->", name
43  printed = True
44  if not printed:
45  print " All files match."
46 
def get_content
Definition: dqm_diff.py:23
def dqm_diff
Definition: dqm_diff.py:33
def dqm_diff.get_content (   root_file_name)
Returns all file (histogram) names, which are found in <root_file_name>.

Definition at line 23 of file dqm_diff.py.

References collect_directory_filenames().

Referenced by dqm_diff().

23 
24 def get_content(root_file_name):
25  """Returns all file (histogram) names, which are found in <root_file_name>."""
26  from ROOT import TFile
27  root_file = TFile(root_file_name)
28  root_directory = root_file.GetDirectory("DQMData")
29  filename_set = set()
30  collect_directory_filenames(root_directory, filename_set)
31  root_file.Close()
32  return filename_set
def get_content
Definition: dqm_diff.py:23
def collect_directory_filenames
Definition: dqm_diff.py:11

Variable Documentation

string dqm_diff.dest = 'show_exec_time'

Definition at line 50 of file dqm_diff.py.

tuple dqm_diff.parser = OptionParser(usage='usage: %prog <root_file1> <root_file2> [options]')

Define commandline options.

Definition at line 48 of file dqm_diff.py.

tuple dqm_diff.start = datetime.now()

Check for commandline option errors.

Execute the search of dismatches in two root fies.

Definition at line 58 of file dqm_diff.py.

Referenced by BetaCalculatorRPC.addInfoToCandidate(), EcalDumpRaw.analyze(), HLTTauDQMAutomation.AutoCompleteConfig(), HLTTauDQMAutomation.AutoCompleteMatching(), L1TDTTF.beginJob(), EcalBoundaryInfoCalculator< EcalDetId >.boundaryRecHits(), L1TDTTFClient.buildPhiEtaPlotO(), L1TDTTFClient.buildPhiEtaPlotOFC(), LocalCacheFile.cache(), tkDetUtil.calculatePhiWindow(), CalibrationScanTask.CalibrationScanTask(), CalibrationTask.CalibrationTask(), DQMStore.cdInto(), SimpleCosmicBONSeeder.checkNoisyModules(), edm::soahelper::SoATupleHelper< I, Args >.destroy(), edm::VParameterSetEntry.dump(), AutoLibraryLoader.enable(), ElectronCalibrationUniv.endJob(), magneticfield::VolumeBasedMagneticFieldESProducer.expandList(), EZArrayFL< GlobalPoint >.EZArrayFL(), EZArrayVL< T >.EZArrayVL(), EcalCondDBInterface.fetchDCSPTMTempList(), DCSPTMTempList.fetchValuesForECIDAndTime(), CSCConditions.fillBadStripWords(), CSCConditions.fillBadWireWords(), MuonResiduals1DOFFitter.fit(), MuonResidualsAngleFitter.fit(), MuonResidualsBfieldAngleFitter.fit(), MuonResidualsPositionFitter.fit(), MuonResiduals5DOFFitter.fit(), MuonResiduals6DOFFitter.fit(), MuonResiduals6DOFrphiFitter.fit(), evf::FUEventProcessor.forkProcessesFromEDM(), EcalBoundaryInfoCalculator< EcalDetId >.gapRecHits(), DTTimeBoxFitter.getFitSeeds(), StripCompactDigiSimLinks.getLinks(), popcon::EcalLaser_weekly_Handler.getNewObjects(), LMFRunIOV.getParameters(), TrackAssociatorByPosition.getState(), StormStorageMaker.getTURL(), StormLcgGtStorageMaker.getTURL(), edm::EDConsumerBase.labelsForToken(), StripCompactDigiSimLinks.makeReverseMap(), MatcherUsingTracksAlgorithm.match(), ora::MappingRules.nameForSchema(), CSCFileReader.nextEventFromFUs(), RK4PreciseStep.operator()(), edm.operator<<(), HcalTBObjectUnpacker.parseCalib(), pos::PixelFEDTestDAC.PixelFEDTestDAC(), LocalCacheFile.prefetch(), prettyPrint(), TrackClusterSplitter.produce(), FileReaderDCC.read(), FileReaderDDU.read(), RFIOFile.read(), RunInfoRead.readData(), L1MuRegionalCand.readDataField(), L1MuGMTCand.readDataField(), TiXmlBase.ReadName(), LocalCacheFile.readv(), HLTTauDQMFilter.regexSearch(), SiStripRecHitConverterAlgorithm.run(), L1MuDTExtrapolationUnit.run(), CondDBESSource.setIntervalFor(), gen::Pythia6Service.setPYUPDAParams(), RunIOV.setRunStart(), gen::Pythia6Service.setSLHAParams(), LMFIOV.setStart(), DCSPTMTemp.setStart(), CrossingFramePlaybackInfoExtended.setStartEventId(), MODRunIOV.setSubRunStart(), MonRunIOV.setSubRunStart(), RunDCSMagnetDat.setTime(), ecaldqm::MESetTrend.shift_(), ora::MappingRules.shortNameByUpperCase(), HcalZSAlgoRealistic.shouldKeep(), CastorDbASCIIIO.splitString(), splitString(), HcalQIEManager.splitString(), splitStringToDoubleByComma(), splitStringToFloatByComma(), splitStringToIntByComma(), CosmicMuonUtilities.stepPropagate(), pos::PixelTimeFormatter.stopTimer(), TiXmlElement.StreamIn(), CSCCFEBData.timeSlice(), TiXmlParsingData.TiXmlParsingData(), TkOfflineVariables.TkOfflineVariables(), edm::VParameterSetEntry.toString(), edm::ParameterSet.toStringImp(), stor::ResourceMonitorCollection.updateSataBeastStatus(), evf::FUResourceBroker.waitForStateChange(), L1MuRegionalCand.writeDataField(), L1MuGMTCand.writeDataField(), and LMFUnique.writeDB().