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 389 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 393 of file dqm_interfaces.py.

393  def __init__ (self,comm1,comm2,base1,base2,directory,depth=0,do_pngs=True,stat_test="KS",test_threshold=.5,black_list=[]):
394  Thread.__init__(self)
395  self.comm1 = deepcopy(comm1)
396  self.comm2 = deepcopy(comm2)
397  self.base1,self.base2 = base1,base2
398  self.directory = directory
399  self.depth=depth
400  self.do_pngs=do_pngs
401  self.test_threshold=test_threshold
402  self.stat_test=stat_test
403  self.black_list=black_list
404  # name of the thread
405  self.name+="_%s" %directory.name
406 
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 407 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, HcalDDDRecConstants::HcalID.depth, HcalHardcodeGeometryLoader::HBHOCellParameters.depth, PFClusterTimeSelector::CutInfo.depth, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters.depth, HFShower::Hit.depth, LutXml::_Config.depth, reco::CastorJetID.depth, ZdcShowerLibrary::Hit.depth, HFShowerParam::Hit.depth, HFGflash::Hit.depth, LMapRow.depth, HFShowerLibrary::Hit.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(), dqm_interfaces.DirWalkerDB.stat_test, and dqm_interfaces.DirWalkerDB.test_threshold.

407  def run(self):
408 
409  this_dir=DirID(self.directory.name,self.depth)
410  if this_dir in self.black_list:
411  print "Skipping %s since blacklisted!" %this_dir
412  return 0
413 
414  self.depth+=1
415 
416  the_test=Statistical_Tests[self.stat_test](self.test_threshold)
417  #print "Test %s with threshold %s" %(self.stat_test,self.test_threshold)
418 
419  directory1=self.base1+"/"+self.directory.mother_dir+"/"+self.directory.name
420  directory2=self.base2+"/"+self.directory.mother_dir+"/"+self.directory.name
421 
422  fetchers =(DirFetcher(self.comm1,directory1),DirFetcher(self.comm2,directory2))
423  for fetcher in fetchers:
424  fetcher.start()
425  for fetcher in fetchers:
426  fetcher.join()
427 
428  contents1 = fetchers[0].contents
429  contents2 = fetchers[1].contents
430  set1= set(contents1.keys())
431  set2= set(contents2.keys())
432 
433  walkers=[]
434  self_directory_directories=self.directory.subdirs
435  self_directory_comparisons=self.directory.comparisons
436  contents_names=list(set1.intersection(set2))
437 
438  for name in contents_names:
439  content = contents1[name]
440  if "dir" in content["type"]:
441  #if this_dir not in DirWalker.white_list:continue
442  subdir=Directory(name,join(self.directory.mother_dir,self.directory.name))
443  dirwalker=DirWalkerDB(self.comm1,self.comm2,self.base1,self.base2,subdir,self.depth,
444  self.do_pngs,self.stat_test,self.test_threshold,self.black_list)
445  dirwalker.start()
446  walkers.append(dirwalker)
447  n_threads=activeCount()
448  if n_threads>5:
449  #print >> stderr, "Threads that are running: %s. Joining them." %(n_threads)
450  dirwalker.join()
451  elif content["kind"]=="ROOT":
452 # print directory1,name
453  comparison=Comparison(name,
454  join(self.directory.mother_dir,self.directory.name),
455  literal2root(content["obj_as_string"],content["type"]),
456  literal2root(contents2[name]["obj_as_string"],content["type"]),
457  deepcopy(the_test),
458  do_pngs=self.do_pngs)
459  self_directory_comparisons.append(comparison)
460 
461 
462  for walker in walkers:
463  walker.join()
464  walker_directory=walker.directory
465  if not walker_directory.is_empty():
466  self_directory_directories.append(walker_directory)
467 
468 #-------------------------------------------------------------------------------
469 
def literal2root(literal, rootType, debug=False)
Definition: ROOTData.py:52
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 397 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.black_list

Definition at line 403 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.comm1

Definition at line 395 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.comm2

Definition at line 396 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.depth

Definition at line 399 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.directory

Definition at line 398 of file dqm_interfaces.py.

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

dqm_interfaces.DirWalkerDB.do_pngs

Definition at line 400 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.stat_test

Definition at line 402 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().

dqm_interfaces.DirWalkerDB.test_threshold

Definition at line 401 of file dqm_interfaces.py.

Referenced by dqm_interfaces.DirWalkerDB.run().