CMS 3D CMS Logo

Functions | Variables
createTree Namespace Reference

Functions

def parseDir (dir, label, it1="", itN="")
 

Variables

 args
 
string comdir = "common/"
 
string common_basedir = comdir
 
string csc_basedir = iteration_directory+'/'
 
string dd = dt_basedir + wheel[0]
 
 default
 
 dest
 
string dt_basedir = iteration_directory+'/MB/'
 
 ff = open("tree_items.js",mode="w")
 
 file
 
 help
 
string iteration1 = "iter1"
 main script More...
 
string iteration_directory = iterationN
 open root and py result files More...
 
string iterationN = "iterN"
 
list mytree = []
 
dictionary NAME_TO_TITLE
 
 options
 
 parser = optparse.OptionParser(usage)
 
 pp = pprint.PrettyPrinter(indent=2)
 
string schamber = "%02d" % chamber
 
string ssector = "%02d" % sector
 
list tree_level1 = ['test','']
 
def tree_level2 = parseDir(dt_basedir,"MB",iteration1,iterationN)
 
def tree_level3 = parseDir(dd,wheel[0],iteration1,iterationN)
 
def tree_level4 = parseDir(dd,station[0],iteration1,iterationN)
 
def tree_level5 = parseDir(dd,"%s/%d" % (station[0],sector),iteration1,iterationN)
 
 type
 
string usage = '%prog [options]\n'+\
 functions definitions More...
 

Function Documentation

◆ parseDir()

def createTree.parseDir (   dir,
  label,
  it1 = "",
  itN = "" 
)
it1 and itN   are the first and the last iterations' directory names
   dir           is some directory with the results from for the LAST 
                 iteration, so it must contain a itN substring 
   label         is a label for tree's folder for this directory

Definition at line 119 of file createTree.py.

References print().

119 def parseDir(dir,label,it1="",itN=""):
120  """it1 and itN are the first and the last iterations' directory names
121  dir is some directory with the results from for the LAST
122  iteration, so it must contain a itN substring
123  label is a label for tree's folder for this directory"""
124  if len(itN)>0 and dir.find(itN)==-1:
125  print("directory ", dir, "has no ", itN, " in it!!")
126  return ["problem!!!",""]
127  res = [label,dir]
128  files = sorted(os.listdir(dir))
129  for f in files:
130  if re.match(".+\.png", f):
131  if len(it1)>0 and len(itN)>0:
132  lnN = [itN,dir+'/'+f]
133  dir1 = dir.replace(itN,it1)
134  if not os.access(dir1+'/'+f,os.F_OK):
135  print("WARNING: no ",dir1+'/'+f," file found!!!")
136  ln1 = [it1,dir1+'/'+f]
137  ln = [NAME_TO_TITLE[f],dir+'/'+f,ln1,lnN]
138  res.append(ln)
139  else:
140  ln = [NAME_TO_TITLE[f],dir+'/'+f]
141  #print ln
142  res.append(ln)
143  #pp.pprint(res)
144  return res
145 
146 
def parseDir(dir, label, it1="", itN="")
Definition: createTree.py:119
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Variable Documentation

◆ args

createTree.args

Definition at line 83 of file createTree.py.

◆ comdir

string createTree.comdir = "common/"

Definition at line 111 of file createTree.py.

◆ common_basedir

string createTree.common_basedir = comdir

Definition at line 203 of file createTree.py.

◆ csc_basedir

string createTree.csc_basedir = iteration_directory+'/'

Definition at line 176 of file createTree.py.

◆ dd

string createTree.dd = dt_basedir + wheel[0]

◆ default

createTree.default

Definition at line 74 of file createTree.py.

◆ dest

createTree.dest

Definition at line 75 of file createTree.py.

◆ dt_basedir

string createTree.dt_basedir = iteration_directory+'/MB/'

Definition at line 151 of file createTree.py.

◆ ff

createTree.ff = open("tree_items.js",mode="w")

Definition at line 213 of file createTree.py.

◆ file

createTree.file

Definition at line 214 of file createTree.py.

◆ help

createTree.help

Definition at line 72 of file createTree.py.

◆ iteration1

string createTree.iteration1 = "iter1"

main script

Definition at line 109 of file createTree.py.

◆ iteration_directory

string createTree.iteration_directory = iterationN

open root and py result files

Definition at line 116 of file createTree.py.

◆ iterationN

string createTree.iterationN = "iterN"

Definition at line 110 of file createTree.py.

◆ mytree

list createTree.mytree = []

Definition at line 147 of file createTree.py.

◆ NAME_TO_TITLE

dictionary createTree.NAME_TO_TITLE

Definition at line 20 of file createTree.py.

◆ options

createTree.options

Definition at line 83 of file createTree.py.

◆ parser

createTree.parser = optparse.OptionParser(usage)

Definition at line 69 of file createTree.py.

◆ pp

createTree.pp = pprint.PrettyPrinter(indent=2)

Definition at line 17 of file createTree.py.

Referenced by FWGUIManager.addTo(), ElasticPlotDQMSource.analyze(), CTPPSProtonReconstructionEfficiencyEstimatorMC.analyze(), TotemRPDQMSource.analyze(), TestTrackHits.analyze(), StudyCaloGen.analyze(), IsolatedGenParticles.analyze(), BremsstrahlungSimulator.brem(), MuonBremsstrahlungSimulator.brem(), CommissioningHistosUsingDb.buildDetInfo(), G4muDarkBremsstrahlungModel.chi(), AnalyticalCurvilinearJacobian.computeFullJacobian(), CMSEmStandardPhysicsLPM.ConstructProcess(), G4muDarkBremsstrahlungModel.DsigmaDx(), DTTrigGeom.dumpGeom(), DTTrigGeom.dumpLUT(), FileInStream_Read(), FileInStream_Seek(), FileOutStream_Write(), FileSeqInStream_Read(), NtupleManager.FillOptObjects(), RunDCSHVDat.fillTheMapByTime(), PythiaFilterEMJetHeep.filter(), EMEnrichingFilterAlgo.filterIsoGenPar(), fnc_dscb(), getDaughters(), PrimaryTransformer.GetDefinition(), BPHTrackReference.getFromPC(), DTTrigGeom.getGeom(), FWGUIManager.getSwapCandidate(), L2TauNNProducer.impactParameter(), HiGammaJetSignalDef.IsIsolated(), HiGammaJetSignalDef.IsIsolatedJP(), HiGammaJetSignalDef.IsIsolatedPP(), LookToRead_Look_Exact(), LookToRead_Look_Lookahead(), LookToRead_Read(), LookToRead_Seek(), LookToRead_Skip(), SteppingHelixPropagator.makeAtomStep(), ConvBremSeedProducer.makeTrajectoryState(), TrajectoryManager.makeTrajectoryState(), TtDilepLRSignalSelObservables.operator()(), L1GTDigiToRaw.packGMT(), JetCoreClusterSplitter.produce(), TkTransientTrackingRecHitBuilderESProducer.produce(), PixelTrackProducerFromSoAT< TrackerTraits >.produce(), FastPrimaryVertexWithWeightsProducer.produce(), FastPrimaryVertexProducer.produce(), JetCoreMCtruthSeedGenerator.produce(), FastTimerService::ThreadGuard.register_thread(), KFBasedPixelFitter.run(), SecToLook_Read(), SecToRead_Read(), FSimTrack.setEcal(), FSimTrack.setHcal(), FSimTrack.setHcalExit(), FSimTrack.setHO(), FSimTrack.setLayer1(), FSimTrack.setLayer2(), FSimTrack.setVFcal(), CMSSimEventManager.StackTracks(), EventShape.thrust(), TreatSecondary.tracks(), MonPNMGPADat.writeArrayDB(), MonPNIRedDat.writeArrayDB(), MonPNLed2Dat.writeArrayDB(), MonPNGreenDat.writeArrayDB(), MonPNLed1Dat.writeArrayDB(), MonPNBlueDat.writeArrayDB(), MonPNRedDat.writeArrayDB(), and DCULVRVoltagesDat.writeArrayDB().

◆ schamber

string createTree.schamber = "%02d" % chamber

Definition at line 190 of file createTree.py.

◆ ssector

string createTree.ssector = "%02d" % sector

Definition at line 162 of file createTree.py.

◆ tree_level1

list createTree.tree_level1 = ['test','']

Definition at line 148 of file createTree.py.

◆ tree_level2

def createTree.tree_level2 = parseDir(dt_basedir,"MB",iteration1,iterationN)

Definition at line 152 of file createTree.py.

◆ tree_level3

def createTree.tree_level3 = parseDir(dd,wheel[0],iteration1,iterationN)

Definition at line 156 of file createTree.py.

◆ tree_level4

def createTree.tree_level4 = parseDir(dd,station[0],iteration1,iterationN)

Definition at line 160 of file createTree.py.

◆ tree_level5

def createTree.tree_level5 = parseDir(dd,"%s/%d" % (station[0],sector),iteration1,iterationN)

Definition at line 165 of file createTree.py.

◆ type

createTree.type

Definition at line 73 of file createTree.py.

◆ usage

string createTree.usage = '%prog [options]\n'+\

functions definitions

To parse commandline args

Definition at line 65 of file createTree.py.