CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
createTree Namespace Reference

Functions

def parseDir
 

Variables

string comdir = "common/"
 
 common_basedir = comdir
 
string csc_basedir = iteration_directory+'/'
 
list dd = dt_basedir+wheel[0]
 
string default = ''
 
string dest = "inputDir"
 
string dt_basedir = iteration_directory+'/MB/'
 
tuple ff = open("tree_items.js",mode="w")
 
string help = "[REQUIRED] input directory: should contain 'iter1', 'iterN' and 'common' directories filled with alignment_validation_plots.py. The resulting tree_items.js is also dumped into this directory"
 
string iteration1 = "iter1"
 main script More...
 
 iteration_directory = iterationN
 open root and py result files More...
 
string iterationN = "iterN"
 
list mytree = []
 
dictionary NAME_TO_TITLE
 
tuple parser = optparse.OptionParser(usage)
 
tuple pp = pprint.PrettyPrinter(indent=2)
 
string schamber = "%02d"
 
string ssector = "%02d"
 
list tree_level1 = ['test','']
 
tuple tree_level2 = parseDir(dt_basedir,"MB",iteration1,iterationN)
 
tuple tree_level3 = parseDir(dd,wheel[0],iteration1,iterationN)
 
tuple tree_level4 = parseDir(dd,station[0],iteration1,iterationN)
 
tuple tree_level5 = parseDir(dd,"%s/%d" % (station[0],sector),iteration1,iterationN)
 
string type = "string"
 
string usage = '%prog [options]\n'
 functions definitions More...
 

Function Documentation

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().

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

Variable Documentation

string createTree.comdir = "common/"

Definition at line 111 of file createTree.py.

createTree.common_basedir = comdir

Definition at line 203 of file createTree.py.

string createTree.csc_basedir = iteration_directory+'/'

Definition at line 176 of file createTree.py.

list createTree.dd = dt_basedir+wheel[0]

Definition at line 154 of file createTree.py.

Referenced by SiStripGainRandomCalculator.algoAnalyze(), SiStripDetInfoFileWriter.beginRun(), SiStripPsuDetIdMap.checkMapInputValues(), BackToBackKinematicConstraint.deviations(), Pixel3DDigitizerAlgorithm.diffusion(), PixelCPEBase.driftDirection(), DTConfigTraco.DTConfigTraco(), CaloTowerTopology.east(), NtupleManager.FillMeasurements(), DataReducer< T >.getReducedDataList(), TrackAssociatorByPositionImpl.getState(), edm::service::MessageLoggerDefaults.limit(), CaloTowerTopology.north(), TwoTrackMinimumDistanceHelixLine.oneIteration(), FWFileEntry.openFile(), Generator.particleAssignDaughters(), HcalCableMapper.process(), TkTransientTrackingRecHitBuilderESProducer.produce(), edm::service::MessageLoggerDefaults.reportEvery(), edm::service::MessageLoggerDefaults.sev_limit(), edm::service::MessageLoggerDefaults.sev_reportEvery(), edm::service::MessageLoggerDefaults.sev_timespan(), hitfit::Top_Decaykin.solve_nu_tmass(), CaloTowerTopology.south(), edm::service::MessageLoggerDefaults.threshold(), edm::service::MessageLoggerDefaults.timespan(), TwoTrackMinimumDistanceHelixLine.updateCoeffs(), and CaloTowerTopology.west().

int createTree.default = ''

Definition at line 74 of file createTree.py.

string createTree.dest = "inputDir"

Definition at line 75 of file createTree.py.

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

Definition at line 151 of file createTree.py.

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

Definition at line 213 of file createTree.py.

string createTree.help = "[REQUIRED] input directory: should contain 'iter1', 'iterN' and 'common' directories filled with alignment_validation_plots.py. The resulting tree_items.js is also dumped into this directory"

Definition at line 72 of file createTree.py.

string createTree.iteration1 = "iter1"

main script

Definition at line 109 of file createTree.py.

createTree.iteration_directory = iterationN

open root and py result files

Definition at line 116 of file createTree.py.

string createTree.iterationN = "iterN"

Definition at line 110 of file createTree.py.

list createTree.mytree = []

Definition at line 147 of file createTree.py.

dictionary createTree.NAME_TO_TITLE

Definition at line 20 of file createTree.py.

tuple createTree.parser = optparse.OptionParser(usage)

Definition at line 69 of file createTree.py.

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

Definition at line 17 of file createTree.py.

Referenced by FullModelReactionDynamics.AddBlackTrackParticles(), FWGUIManager.addTo(), ElasticPlotDQMSource.analyze(), CTPPSProtonReconstructionEfficiencyEstimatorMC.analyze(), TotemRPDQMSource.analyze(), TestTrackHits.analyze(), StudyCaloGen.analyze(), IsolatedGenParticles.analyze(), PixelTrackBuilder.build(), BPHX3872ToJPsiPiPiBuilder.build(), CommissioningHistosUsingDb.buildDetInfo(), AnalyticalCurvilinearJacobian.computeFullJacobian(), CMSEmStandardPhysicsLPM.ConstructProcess(), VVIObjDetails.cosint(), sistripvvi::VVIObjDetails.cosint(), DTTrigGeom.dumpGeom(), DTTrigGeom.dumpLUT(), NtupleManager.FillOptObjects(), RunDCSHVDat.fillTheMapByTime(), PythiaFilterEMJetHeep.filter(), EMEnrichingFilterAlgo.filterIsoGenPar(), funct::GaussLegendreIntegrator.GaussLegendreIntegrator(), gen::Pythia6JetGun.generateEvent(), gen::Py8PtAndDxyGun.generatePartonsAndHadronize(), gen::Py8PtGun.generatePartonsAndHadronize(), gen::Py8PtotGun.generatePartonsAndHadronize(), gen::Py8EGun.generatePartonsAndHadronize(), gen::Py8JetGun.generatePartonsAndHadronize(), gen::Py8MassGun.generatePartonsAndHadronize(), FullModelReactionDynamics.GenerateXandPt(), getDaughters(), BPHTrackReference.getFromPC(), DTTrigGeom.getGeom(), FWGUIManager.getSwapCandidate(), L2TauNNProducer.impactParameter(), SteppingHelixPropagator.makeAtomStep(), FullModelReactionDynamics.NuclearReaction(), TtDilepLRSignalSelObservables.operator()(), EcalBasicClusterLocalContCorrection.operator()(), L1GTDigiToRaw.packGMT(), JetCoreClusterSplitter.produce(), TkTransientTrackingRecHitBuilderESProducer.produce(), PixelTrackProducerFromSoA.produce(), FastPrimaryVertexWithWeightsProducer.produce(), FastPrimaryVertexProducer.produce(), JetCoreMCtruthSeedGenerator.produce(), FastTimerService::ThreadGuard.register_thread(), FullModelReactionDynamics.Rotate(), KFBasedPixelFitter.run(), FSimTrack.setEcal(), FSimTrack.setHcal(), FSimTrack.setHcalExit(), FSimTrack.setHO(), FSimTrack.setLayer1(), FSimTrack.setLayer2(), FSimTrack.setVFcal(), VVIObjDetails.sincosint(), sistripvvi::VVIObjDetails.sincosint(), VVIObjDetails.sinint(), sistripvvi::VVIObjDetails.sinint(), EventShape.thrust(), TreatSecondary.tracks(), FullModelReactionDynamics.TwoBody(), FullModelReactionDynamics.TwoCluster(), edm::Provenance.write(), MonPNLed2Dat.writeArrayDB(), MonPNBlueDat.writeArrayDB(), MonPNMGPADat.writeArrayDB(), MonPNRedDat.writeArrayDB(), MonPNLed1Dat.writeArrayDB(), MonPNGreenDat.writeArrayDB(), MonPNIRedDat.writeArrayDB(), and DCULVRVoltagesDat.writeArrayDB().

string createTree.schamber = "%02d"

Definition at line 190 of file createTree.py.

string createTree.ssector = "%02d"

Definition at line 162 of file createTree.py.

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

Definition at line 148 of file createTree.py.

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

Definition at line 152 of file createTree.py.

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

Definition at line 156 of file createTree.py.

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

Definition at line 160 of file createTree.py.

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

Definition at line 165 of file createTree.py.

string createTree.type = "string"

Definition at line 73 of file createTree.py.

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

functions definitions

To parse commandline args

Definition at line 65 of file createTree.py.