CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
dqm_interfaces.DirWalkerDB Class Reference
Inheritance diagram for dqm_interfaces.DirWalkerDB:

Public Member Functions

def __init__ (self, comm1, comm2, base1, base2, directory, depth=0, do_pngs=True, stat_test="KS", test_threshold=.5, black_list=[])
 
def run (self)
 

Public Attributes

 base2
 
 black_list
 
 comm1
 
 comm2
 
 depth
 
 directory
 
 do_pngs
 
 stat_test
 
 test_threshold
 

Detailed Description

An interface to the DQM document db. It is threaded to compensate the 
latency introduced by the finite response time of the server.

Definition at line 392 of file dqm_interfaces.py.

Constructor & Destructor Documentation

def dqm_interfaces.DirWalkerDB.__init__ (   self,
  comm1,
  comm2,
  base1,
  base2,
  directory,
  depth = 0,
  do_pngs = True,
  stat_test = "KS",
  test_threshold = .5,
  black_list = [] 
)

Definition at line 396 of file dqm_interfaces.py.

396  def __init__ (self,comm1,comm2,base1,base2,directory,depth=0,do_pngs=True,stat_test="KS",test_threshold=.5,black_list=[]):
397  Thread.__init__(self)
398  self.comm1 = deepcopy(comm1)
399  self.comm2 = deepcopy(comm2)
400  self.base1,self.base2 = base1,base2
401  self.directory = directory
402  self.depth=depth
403  self.do_pngs=do_pngs
404  self.test_threshold=test_threshold
405  self.stat_test=stat_test
406  self.black_list=black_list
407  # name of the thread
408  self.name+="_%s" %directory.name
409 
def __init__(self, comm1, comm2, base1, base2, directory, depth=0, do_pngs=True, stat_test="KS", test_threshold=.5, black_list=[])

Member Function Documentation

def dqm_interfaces.DirWalkerDB.run (   self)

Definition at line 410 of file dqm_interfaces.py.

References dqm_interfaces.DirWalkerDB.base2, dqm_interfaces.DirWalkerDB.black_list, dqm_interfaces.DirWalkerDB.comm1, dqm_interfaces.DirWalkerDB.comm2, MyHcalDetId.depth, RecoObj.depth, CaloPoint.depth, HcalNumberingFromDDD::HcalID.depth, HcalChannelId.depth, GEMELMap::GEMVFatMap.depth, HFShower::Hit.depth, HcalDDDRecConstants::HcalID.depth, HcalHardcodeGeometryLoader::HBHOCellParameters.depth, PFClusterTimeSelector::CutInfo.depth, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters.depth, LutXml::_Config.depth, HFShowerParam::Hit.depth, reco::CastorJetID.depth, ZdcShowerLibrary::Hit.depth, HFGflash::Hit.depth, HFShowerLibrary::Hit.depth, LMapRow.depth, HFChannel.depth, HcalDDDRecConstants::HcalActiveLength.depth, HcalHardcodeGeometryLoader::HECellParameters.depth, HcalFlexiHardcodeGeometryLoader::HECellParameters.depth, HcalDDDRecConstants::HFCellParameters.depth, SimAnalyzerMinbias.depth, cms::MinBias.depth, HcalHardcodeGeometryLoader::HFCellParameters.depth, HcalFlexiHardcodeGeometryLoader::HFCellParameters.depth, XMLProcessor::_LMapRowHBEF.depth, LMapDetId.depth, RecAnalyzerHF.depth, ECalSD.depth, cms::Analyzer_minbias.depth, AnalyzerMinbias.depth, RecAnalyzerMinbias.depth, dqm_interfaces.DirID.depth, dqm_interfaces.DirWalkerDB.depth, HcalObjRepresent::ADataRepr.depth, dirstructure.Directory.do_pngs, dirstructure.Comparison.do_pngs, dqm_interfaces.DirWalkerDB.do_pngs, join(), list(), ROOTData.literal2root(), edm.print(), dqm_interfaces.DirWalkerDB.stat_test, and dqm_interfaces.DirWalkerDB.test_threshold.

410  def run(self):
411 
412  this_dir=DirID(self.directory.name,self.depth)
413  if this_dir in self.black_list:
414  print("Skipping %s since blacklisted!" %this_dir)
415  return 0
416 
417  self.depth+=1
418 
419  the_test=Statistical_Tests[self.stat_test](self.test_threshold)
420  #print "Test %s with threshold %s" %(self.stat_test,self.test_threshold)
421 
422  directory1=self.base1+"/"+self.directory.mother_dir+"/"+self.directory.name
423  directory2=self.base2+"/"+self.directory.mother_dir+"/"+self.directory.name
424 
425  fetchers =(DirFetcher(self.comm1,directory1),DirFetcher(self.comm2,directory2))
426  for fetcher in fetchers:
427  fetcher.start()
428  for fetcher in fetchers:
429  fetcher.join()
430 
431  contents1 = fetchers[0].contents
432  contents2 = fetchers[1].contents
433  set1= set(contents1.keys())
434  set2= set(contents2.keys())
435 
436  walkers=[]
437  self_directory_directories=self.directory.subdirs
438  self_directory_comparisons=self.directory.comparisons
439  contents_names=list(set1.intersection(set2))
440 
441  for name in contents_names:
442  content = contents1[name]
443  if "dir" in content["type"]:
444  #if this_dir not in DirWalker.white_list:continue
445  subdir=Directory(name,join(self.directory.mother_dir,self.directory.name))
446  dirwalker=DirWalkerDB(self.comm1,self.comm2,self.base1,self.base2,subdir,self.depth,
447  self.do_pngs,self.stat_test,self.test_threshold,self.black_list)
448  dirwalker.start()
449  walkers.append(dirwalker)
450  n_threads=activeCount()
451  if n_threads>5:
452  #print >> stderr, "Threads that are running: %s. Joining them." %(n_threads)
453  dirwalker.join()
454  elif content["kind"]=="ROOT":
455 # print directory1,name
456  comparison=Comparison(name,
457  join(self.directory.mother_dir,self.directory.name),
458  literal2root(content["obj_as_string"],content["type"]),
459  literal2root(contents2[name]["obj_as_string"],content["type"]),
460  deepcopy(the_test),
461  do_pngs=self.do_pngs)
462  self_directory_comparisons.append(comparison)
463 
464 
465  for walker in walkers:
466  walker.join()
467  walker_directory=walker.directory
468  if not walker_directory.is_empty():
469  self_directory_directories.append(walker_directory)
470 
471 #-------------------------------------------------------------------------------
472 
def literal2root(literal, rootType, debug=False)
Definition: ROOTData.py:53
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run

Member Data Documentation

dqm_interfaces.DirWalkerDB.base2

Definition at line 400 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.black_list

Definition at line 406 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.comm1

Definition at line 398 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.comm2

Definition at line 399 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.depth

Definition at line 402 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.directory

Definition at line 401 of file dqm_interfaces.py.

Referenced by utils.unpickler.run(), and dqm_interfaces.DirWalkerFile.walk().

dqm_interfaces.DirWalkerDB.do_pngs

Definition at line 403 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.stat_test

Definition at line 405 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.test_threshold

Definition at line 404 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().