CMS 3D CMS Logo

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

Classes

class  generateBrowser
 
class  visitor
 

Functions

def do
 
def doModules
 
def format
 
def getParamSeqDict
 

Variables

 cfgGet = True
 
tuple f = open(cfg)
 
list flags = ['-c', '-o']
 
string help = "The configuration file."
 
 htmlGet = True
 
list modsNames = []
 
int more = 0
 
tuple parser = OptionParser(usage="%prog <cfg-file> <html-file>")
 

Function Documentation

def cfg-viewer.do (   params,
  o 
)

Definition at line 869 of file cfg-viewer.py.

References reco.if(), and join().

Referenced by doModules(), and cfg-viewer.generateBrowser.doPsets().

870 def do(params, o):
871  for item in params:
872  thing = params[item]
873  if(hasattr(thing, "parameters_")):
874  theList =[]
875  theList.append("%s(%s)"%(item,thing.configTypeName()))
876  # do will now return the list that the thing takes
877  theList.append(do(getattr(thing,"parameters_")(),[]))
878  o.append(theList)
879  elif(thing.configTypeName()== "VPSet"):
880  theList =[]
881  theList.append("%s(%s)"%(item,thing.configTypeName()))
882  newInS = "%s-%d"
883  li2 =[]
884  for popped in thing:
885  if(hasattr(popped, "parameters_")):
886  innerList =[]
887  innerList.append("(%s)"%(popped.configTypeName()))
888  innerList.append(do(getattr(popped,"parameters_")(),[]))
889  li2.append(innerList)
890  theList.append(li2)
891  o.append(theList)
892  else:
893  # easy version. Just save what we have -
894  # all going to have the same module..
895  # have parent as an input, so we can send it.
896  theList =[]
897  theList.append(item)
898  theType = thing.configTypeName()
899  if(hasattr(thing, "pop") and len(thing)>0):
900  value = "%s"% (",".join(str(li) for li in thing))
901  else:
902  value = thing.configValue()
903  theList.append(value)
904 
905  if(theType =="double" or theType =="int"):
906  theList.append(theType)
907  else:
908  if(thing.isTracked()):
909  theList.append(theType)
910  theList.append("tracked")
911  o.append(theList)
912  return o
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
if(dp >Float(M_PI)) dp-
def cfg-viewer.doModules (   modObj,
  dataFile,
  seq,
  seqs,
  currentName,
  innerSeq 
)

Definition at line 795 of file cfg-viewer.py.

References python.multivaluedict.append(), do(), getParamSeqDict(), reco.if(), and split.

Referenced by cfg-viewer.visitor.enter().

796 def doModules(modObj, dataFile, seq, seqs, currentName, innerSeq):
797  name = modObj.label_()
798  typ = re.sub("<|>|'", "", str(type(modObj))).split(".")[-1]
799  if(seq==0):allMods.append(name)
800  elif(not innerSeq and currentName not in allMods):
801  allMods.append(currentName)
802  if(name not in modsNames):
803  theList = do(modObj.parameters_(), [])
804  modsNames.append(name)
805  newModsNames.append(name)
806  filename = modObj._filename.split("/")[-1]
807  theS =""
808  if(len(modsNames) > 1): theS=","
809  theS+="%s:%s"
810  d = getParamSeqDict(theList, typ, filename)
811  dataFile.write(theS%(name, d))
812  if(seq >0):
813  seqs[currentName].append(name)
814 
815  else:
816  oldMods.append(name)
def getParamSeqDict
Definition: cfg-viewer.py:859
def doModules
Definition: cfg-viewer.py:795
if(dp >Float(M_PI)) dp-
double split
Definition: MVATrainer.cc:139
def cfg-viewer.format (   s,
  kwds 
)

Definition at line 817 of file cfg-viewer.py.

Referenced by argparse.HelpFormatter._metavar_formatter(), python.rootplot.argparse.HelpFormatter._metavar_formatter(), sistrip::MeasureLA.calibration_key(), ComphepSingletopFilter.endJob(), SummaryPlotFactory< CommissioningAnalysis * >.fill(), fill_dups(), EmDQMReco::FourVectorMonitorElements.FourVectorMonitorElements(), MatacqProducer.getMatacqFile(), edm::service::IgProfService.makeDump(), IgProfModule.makeDump(), FastTimerService.preBeginRun(), MatacqProducer.runSubDir(), FWTriggerTableView.saveImageTo(), FWTableView.saveImageTo(), TrackingMaterialAnalyser.saveParameters(), FastTimerService.setNumberOfProcesses(), edm::root.stdNamespaceAdder(), sistrip::EnsembleCalibrationLA.write_ensembles_text(), edm::writeParameterValue.writeValue(), edm::writeParameterValue.writeValueInVector(), edm::writeParameterValue.writeValueInVectorWithSpace(), and edm::writeParameterValue.writeVector().

818 def format(s, **kwds):
819  return s % kwds
def cfg-viewer.getParamSeqDict (   params,
  typ,
  fil 
)

Definition at line 859 of file cfg-viewer.py.

Referenced by doModules(), and cfg-viewer.visitor.leave().

860 def getParamSeqDict(params, typ, fil):
861  d={}
862  d["parameters"] = params
863  d["type"] = typ
864  d["file"] =fil
865  return d
866 
867 """
868  Prints out inner details of parameters.
"""
def getParamSeqDict
Definition: cfg-viewer.py:859

Variable Documentation

cfg-viewer.cfgGet = True

Definition at line 925 of file cfg-viewer.py.

tuple cfg-viewer.f = open(cfg)

Definition at line 936 of file cfg-viewer.py.

list cfg-viewer.flags = ['-c', '-o']

Definition at line 915 of file cfg-viewer.py.

string cfg-viewer.help = "The configuration file."

Definition at line 917 of file cfg-viewer.py.

cfg-viewer.htmlGet = True

Definition at line 928 of file cfg-viewer.py.

list cfg-viewer.modsNames = []

Definition at line 11 of file cfg-viewer.py.

int cfg-viewer.more = 0

Definition at line 922 of file cfg-viewer.py.

Referenced by edm::EventProcessor.runToCompletion(), and ora::MappingRules.shortNameByUpperCase().

tuple cfg-viewer.parser = OptionParser(usage="%prog <cfg-file> <html-file>")

Definition at line 914 of file cfg-viewer.py.