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
dqm_interfaces.DirWalkerDB Class Reference
Inheritance diagram for dqm_interfaces.DirWalkerDB:

Public Member Functions

def __init__
 
def run
 

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.

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

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, DBlmapWriter::_LMapRowHBEF.depth, MyHcalDetId.depth, RecoObj.depth, CaloPoint.depth, HcalChannelId.depth, HcalNumberingFromDDD::HcalID.depth, HcalFlexiHardcodeGeometryLoader::HBHOCellParameters.depth, PFClusterTimeSelector::CutInfo.depth, HFShower::Hit.depth, LutXml::_Config.depth, reco::CastorJetID.depth, ZdcShowerLibrary::Hit.depth, HFGflash::Hit.depth, HFShowerParam::Hit.depth, LMapRow.depth, LMapLoader::_LMapRowHBEF.depth, HFShowerLibrary::Hit.depth, HcalFlexiHardcodeGeometryLoader::HECellParameters.depth, FastHFShowerLibrary::Hit.depth, XMLHTRZeroSuppressionLoader::_datasetDBConfig.depth, HcalFlexiHardcodeGeometryLoader::HFCellParameters.depth, cms::MinBias.depth, LMapDetId.depth, XMLProcessor::_LMapRowHBEF.depth, Raddam_ch.depth, cms::Analyzer_minbias.depth, EtaPhiHists.depth, dqm_interfaces.DirID.depth, dqm_interfaces.DirWalkerDB.depth, HcalObjRepresent::ADataRepr.depth, TiXmlPrinter.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.

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