CMS 3D CMS Logo

Functions | Variables
validateAlignments Namespace Reference

Functions

def check_proxy ()
 
def forward_proxy (rundir)
 
def main ()
 
def parser ()
 
def updateConfigurationFile (configurationFile, updateInstructions)
 

Variables

 action
 
def args = parser()
 Before doing anything, check that grip proxy exists. More...
 
 categories = instruction.split(".")
 
 category = categories[1]
 
 choices
 
 cmsConfig = job["cms-config"].split("/")[-1]
 
string cmsconfigDir = "{}/cmsConfigs".format(validationDir)
 
dictionary condorSubmitCustomization = {"overwrite": [], "addBefore": []}
 Customize the condor submit file for this specific job. More...
 
string condorSubmitFile = "{}/condor.sub".format(job["dir"])
 
 condorTemplateFile = fnc.digest_path("$CMSSW_BASE/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/templates/condorTemplate.submit")
 
 config = yaml.load(exampleFile, Loader=yaml.Loader)
 Print example config which is in Aligment/OfflineValidation/bin if wished. More...
 
string crabConfigurationFile = "{}/crabConfiguration.py".format(job["dir"])
 Check in config for all validation and create jobs. More...
 
 crabTemplateFile = fnc.digest_path("$CMSSW_BASE/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/templates/crabTemplate.py")
 Copy AllInOne config in working directory in json/yaml format. More...
 
 decodeInstruction = instruction.split("|")
 
 default
 
 dump
 
dictionary executableCustomization = {"overwrite": [], "addBefore": []}
 Customize the executable template file for this specific job. More...
 
string executableFile = "{}/run.sh".format(job["dir"])
 
 executableTempleteFile = fnc.digest_path("$CMSSW_BASE/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/templates/executableTemplate.sh")
 
string exeDir = "{}/executables".format(validationDir)
 
 fileContent = inputFile.readlines()
 
 help
 
 indent
 
list jobs = []
 List with all jobs. More...
 
 jsonFile
 Write local config file. More...
 
 lineBefore = instruction.split("|")[0]
 
bool lineFound = False
 
bool lineOverwritten = False
 
 lineToReplace = decodeInstruction[0]
 
 localProxy = subprocess.check_output(["voms-proxy-info", "--path"]).strip()
 
 metavar
 
def myProxy = forward_proxy(job["dir"])
 Forward the proxy to the job directory. More...
 
 newCategories = fileContent[iLine].split(".")
 
 newInstruction = instruction[instruction.index("|")+1:]
 
 parser = argparse.ArgumentParser(description = "AllInOneTool for validation of the tracker alignment", formatter_class=argparse.RawTextHelpFormatter)
 
string previousCategory = ""
 
string proxyName = "{}/.user_proxy".format(rundir)
 Move the proxy to the run directory. More...
 
 shell
 Create symlink for executable/python cms config if needed. More...
 
 stderr
 
 stdout
 
 str
 
 type
 
 validationDir = os.path.abspath(config["name"])
 Check for all paths in configuration and attempt to "digest" them As a bonus, all ROOT colors are turned to the integer value. More...
 
 width
 

Function Documentation

◆ check_proxy()

def validateAlignments.check_proxy ( )

Definition at line 39 of file validateAlignments.py.

Referenced by forward_proxy(), and main().

◆ forward_proxy()

def validateAlignments.forward_proxy (   rundir)

Definition at line 52 of file validateAlignments.py.

References check_proxy(), and print().

52 def forward_proxy(rundir):

◆ main()

def validateAlignments.main ( )

Definition at line 184 of file validateAlignments.py.

References check_proxy(), parser, and print().

184 def main():

◆ parser()

def validateAlignments.parser ( )

Definition at line 24 of file validateAlignments.py.

References parser.

24 def parser():

◆ updateConfigurationFile()

def validateAlignments.updateConfigurationFile (   configurationFile,
  updateInstructions 
)

Definition at line 75 of file validateAlignments.py.

75 def updateConfigurationFile(configurationFile, updateInstructions):
def updateConfigurationFile(configurationFile, updateInstructions)

Variable Documentation

◆ action

validateAlignments.action

Definition at line 29 of file validateAlignments.py.

◆ args

def validateAlignments.args = parser()

Before doing anything, check that grip proxy exists.

Read parser arguments

Definition at line 194 of file validateAlignments.py.

◆ categories

validateAlignments.categories = instruction.split(".")

Definition at line 126 of file validateAlignments.py.

◆ category

string validateAlignments.category = categories[1]

Definition at line 128 of file validateAlignments.py.

Referenced by OOTPileupCorrectionColl.add(), StorableDoubleMap< AbsOOTPileupCorrection >.add(), edm::ExceptionToActionTable.add(), HLTLogMonitorFilter.addCategory(), reco::GraphMap.addNode(), EnergyScaleCorrection.addScale(), EnergyScaleCorrection.addSmearing(), ALIBestUnit.ALIBestUnit(), ALIUnitDefinition.ALIUnitDefinition(), edmtest::TestGetByLabelAnalyzerT< T >.analyze(), GBRForestWriter.analyze(), DQMMessageLogger.analyze(), TotemRPDQMSource.analyze(), LogMessageMonitor.analyze(), PrintLoadingPlugins.askedToLoad(), QGLikelihoodSystematicsDBWriter.beginJob(), QGLikelihoodDBWriter.beginJob(), DTLocalTriggerBaseTest.beginRun(), DTTriggerEfficiencyTest.bookChambHistos(), DTLocalTriggerBaseTest.bookCmsHistos(), DTTriggerLutTest.bookCmsHistos1d(), DTLocalTriggerBaseTest.bookSectorHistos(), DTTriggerEfficiencyTest.bookWheelHistos(), DTLocalTriggerBaseTest.bookWheelHistos(), reco::HitPattern.call(), CosmicMuonSeedGenerator.checkQuality(), CocoaBestUnit.CocoaBestUnit(), CocoaUnitDefinition.CocoaUnitDefinition(), edm::service::ThreadSafeLogMessageLoggerScribe.configure_dest(), GlobalMuonTrackMatcher.convertToTSOSMuHit(), GlobalMuonTrackMatcher.convertToTSOSTk(), GlobalMuonTrackMatcher.convertToTSOSTkHit(), EnergyScaleCorrection::CorrectionCategory.CorrectionCategory(), correctionCategory_class.correctionCategory_class(), L1GtVhdlWriterCore.countCondsAndAdd2NumberVec(), reco::HitPattern.countHits(), reco::HitPattern.countTypedHits(), CosmicMuonSeedGenerator.createSeed(), CosmicMuonSeedGenerator.createSeeds(), dd_to_html(), TauDiscriminationAgainstElectronMVA6< TauType, TauDiscriminator, ElectronType >.discriminate(), DTLocalTriggerBaseTest.dqmEndJob(), DTLocalTriggerBaseTest.endRun(), OOTPileupCorrectionColl.exists(), StorableDoubleMap< AbsOOTPileupCorrection >.exists(), reco::PatternSet< N >.fill(), DTLocalTriggerTest.fillGlobalSummary(), tadqm::TrackAnalyzer.fillHistosForEfficiencyFromHitPatter(), HLTLogMonitorFilter.filter(), edm::ExceptionToActionTable.find(), FWDetailViewManager.findViewersFor(), FWEveViewManager.FWEveViewManager(), OOTPileupCorrectionColl.get(), StorableDoubleMap< AbsOOTPileupCorrection >.get(), HLTLogMonitorFilter.getCategory(), L1GtVhdlWriterCore.getCategoryFromObject(), reco::HitPattern.getCategoryIndexRange(), L1GtVhdlWriterCore.getDefValsFromTriggerMenu(), reco::HitPattern.getHitPattern(), EnergyScaleCorrection.getScaleCorr(), EnergyScaleCorrection_class.getScaleCorrection(), EnergyScaleCorrection_class.getScaleOffset(), EnergyScaleCorrection.getSmearCorr(), EnergyScaleCorrection_class.getSmearingRho(), EnergyScaleCorrection_class.getSmearingSigma(), L1GtVhdlWriterCore.getSubstParamCommonFromTriggerMenu(), reco::HitPattern.getTrackerLayerCase(), reco::HitPattern.getTrackerMonoStereo(), edm.GroupLogStatistics(), edm::MessageLoggerQ.ignore(), insertLUTItem(), VertexCategories.is(), TrackCategories.is(), GBRForestWriter::jobEntryType.jobEntryType(), CosmicMuonSeedGenerator.makeSegPairs(), GlobalMuonTrajectoryBuilder.makeTkCandCollection(), L3MuonTrajectoryBuilder.makeTkCandCollection(), GlobalMuonTrackMatcher.match(), GlobalMuonTrackMatcher.match_Chi2(), GlobalMuonTrackMatcher.match_dist(), reco::HitPattern.numberOfAllHits(), reco::HitPattern.numberOfAllTrackerHits(), reco::HitPattern.numberOfLostHits(), reco::HitPattern.numberOfLostPixelBarrelHits(), reco::HitPattern.numberOfLostPixelEndcapHits(), reco::HitPattern.numberOfLostPixelHits(), reco::HitPattern.numberOfLostStripHits(), reco::HitPattern.numberOfLostStripTECHits(), reco::HitPattern.numberOfLostStripTIBHits(), reco::HitPattern.numberOfLostStripTIDHits(), reco::HitPattern.numberOfLostStripTOBHits(), reco::HitPattern.numberOfLostTrackerHits(), reco::HitPattern.numberOfValidStripLayersWithMonoAndStereo(), TrackClassFilter.operator()(), FixedAreaIsolationCone.operator()(), reco::PatternSet< N >.PatternSet(), reco::HitPattern.pixelBarrelLayersTotallyOffOrBad(), reco::HitPattern.pixelBarrelLayersWithoutMeasurement(), reco::HitPattern.pixelEndcapLayersTotallyOffOrBad(), reco::HitPattern.pixelEndcapLayersWithoutMeasurement(), reco::HitPattern.pixelLayersTotallyOffOrBad(), reco::HitPattern.pixelLayersWithMeasurement(), reco::HitPattern.pixelLayersWithoutMeasurement(), edm::service::SimpleMemoryCheck.postEndJob(), CheckHitPattern.print(), PFCheckHitPattern.print(), FilterSelection.print(), reco::HitPattern.print(), reco::HitPattern.printHitPattern(), CosmicMuonSeedGenerator.produce(), pat::PATTriggerProducer.produce(), EnergyScaleCorrection_class.ReadFromFile(), EnergyScaleCorrection.readScalesFromFile(), EnergyScaleCorrection_class.ReadSmearingFromFile(), EnergyScaleCorrection.readSmearingsFromFile(), L1GtVhdlWriterCore.returnConditionsOfOneClass(), DTLocalTriggerLutTest.runClientDiagnostic(), CosmicMuonSeedGenerator.selectSegments(), sim.sensitiveDetectorMakers(), DTLocalTriggerBaseTest.setConfig(), GlobalMuonTrajectoryBuilder.setEvent(), L3MuonTrajectoryBuilder.setEvent(), edm::MessageLoggerQ.squelch(), edm.squelchStandAloneMessageCategory(), reco::HitPattern.stripLayersTotallyOffOrBad(), reco::HitPattern.stripLayersWithoutMeasurement(), reco::HitPattern.stripTECLayersTotallyOffOrBad(), reco::HitPattern.stripTECLayersWithoutMeasurement(), reco::HitPattern.stripTIBLayersTotallyOffOrBad(), reco::HitPattern.stripTIBLayersWithoutMeasurement(), reco::HitPattern.stripTIDLayersTotallyOffOrBad(), reco::HitPattern.stripTIDLayersWithoutMeasurement(), reco::HitPattern.stripTOBLayersTotallyOffOrBad(), reco::HitPattern.stripTOBLayersWithoutMeasurement(), TaggingVariablePlotter.TaggingVariablePlotter(), TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >.TauDiscriminantCutMultiplexerT(), throwStorageError(), reco::HitPattern.trackerLayersTotallyOffOrBad(), reco::HitPattern.trackerLayersWithMeasurement(), reco::HitPattern.trackerLayersWithoutMeasurement(), reco::HitPattern.trackerLayersWithoutMeasurementOld(), GlobalMuonTrajectoryBuilder.trajectories(), L3MuonTrajectoryBuilder.trajectories(), edm::TypeWithDict.typeInfo(), UnitConverter.UnitConverter(), TaggingVariablePlotter::VariableConfig.VariableConfig(), and DTLocalTriggerBaseTest.~DTLocalTriggerBaseTest().

◆ choices

validateAlignments.choices

Definition at line 34 of file validateAlignments.py.

◆ cmsConfig

validateAlignments.cmsConfig = job["cms-config"].split("/")[-1]

Definition at line 301 of file validateAlignments.py.

◆ cmsconfigDir

string validateAlignments.cmsconfigDir = "{}/cmsConfigs".format(validationDir)

Definition at line 229 of file validateAlignments.py.

◆ condorSubmitCustomization

dictionary validateAlignments.condorSubmitCustomization = {"overwrite": [], "addBefore": []}

Customize the condor submit file for this specific job.

Definition at line 336 of file validateAlignments.py.

◆ condorSubmitFile

string validateAlignments.condorSubmitFile = "{}/condor.sub".format(job["dir"])

Definition at line 287 of file validateAlignments.py.

◆ condorTemplateFile

validateAlignments.condorTemplateFile = fnc.digest_path("$CMSSW_BASE/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/templates/condorTemplate.submit")

Definition at line 240 of file validateAlignments.py.

◆ config

validateAlignments.config = yaml.load(exampleFile, Loader=yaml.Loader)

Print example config which is in Aligment/OfflineValidation/bin if wished.

Read in AllInOne config dependent on what format you choose.

Definition at line 199 of file validateAlignments.py.

◆ crabConfigurationFile

string validateAlignments.crabConfigurationFile = "{}/crabConfiguration.py".format(job["dir"])

Check in config for all validation and create jobs.

Create dir for DAG file and loop over all jobs Create job dir, output dir Copy the template files to the job directory

Definition at line 285 of file validateAlignments.py.

◆ crabTemplateFile

validateAlignments.crabTemplateFile = fnc.digest_path("$CMSSW_BASE/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/templates/crabTemplate.py")

Copy AllInOne config in working directory in json/yaml format.

Define the template files

Definition at line 239 of file validateAlignments.py.

◆ decodeInstruction

validateAlignments.decodeInstruction = instruction.split("|")

Definition at line 92 of file validateAlignments.py.

◆ default

validateAlignments.default

Definition at line 34 of file validateAlignments.py.

◆ dump

validateAlignments.dump

Definition at line 46 of file validateAlignments.py.

◆ executableCustomization

dictionary validateAlignments.executableCustomization = {"overwrite": [], "addBefore": []}

Customize the executable template file for this specific job.

Definition at line 314 of file validateAlignments.py.

◆ executableFile

string validateAlignments.executableFile = "{}/run.sh".format(job["dir"])

Definition at line 289 of file validateAlignments.py.

◆ executableTempleteFile

validateAlignments.executableTempleteFile = fnc.digest_path("$CMSSW_BASE/src/Alignment/OfflineValidation/python/TkAlAllInOneTool/templates/executableTemplate.sh")

Definition at line 241 of file validateAlignments.py.

◆ exeDir

string validateAlignments.exeDir = "{}/executables".format(validationDir)

Definition at line 228 of file validateAlignments.py.

◆ fileContent

validateAlignments.fileContent = inputFile.readlines()
Update a template configuration file with custom configuration
Arguments:
- configurationFile: File name for the configuration file that will be updated
- updateInstructions: A dictionary defining the updated configuration with keys "overwrite", "remove", "add" and "addBefore" each containing a list with the instructions on what should be replaced, removed or added.

Definition at line 85 of file validateAlignments.py.

◆ help

validateAlignments.help

Definition at line 29 of file validateAlignments.py.

◆ indent

validateAlignments.indent

◆ jobs

list validateAlignments.jobs = []

List with all jobs.

Definition at line 245 of file validateAlignments.py.

◆ jsonFile

validateAlignments.jsonFile

Write local config file.

Definition at line 311 of file validateAlignments.py.

◆ lineBefore

validateAlignments.lineBefore = instruction.split("|")[0]

Definition at line 160 of file validateAlignments.py.

◆ lineFound

bool validateAlignments.lineFound = False

Definition at line 132 of file validateAlignments.py.

◆ lineOverwritten

bool validateAlignments.lineOverwritten = False

Definition at line 100 of file validateAlignments.py.

◆ lineToReplace

validateAlignments.lineToReplace = decodeInstruction[0]

Definition at line 94 of file validateAlignments.py.

◆ localProxy

validateAlignments.localProxy = subprocess.check_output(["voms-proxy-info", "--path"]).strip()

Definition at line 67 of file validateAlignments.py.

◆ metavar

validateAlignments.metavar

Definition at line 29 of file validateAlignments.py.

◆ myProxy

def validateAlignments.myProxy = forward_proxy(job["dir"])

Forward the proxy to the job directory.

Definition at line 295 of file validateAlignments.py.

◆ newCategories

validateAlignments.newCategories = fileContent[iLine].split(".")

Definition at line 145 of file validateAlignments.py.

◆ newInstruction

validateAlignments.newInstruction = instruction[instruction.index("|")+1:]

Definition at line 95 of file validateAlignments.py.

◆ parser

validateAlignments.parser = argparse.ArgumentParser(description = "AllInOneTool for validation of the tracker alignment", formatter_class=argparse.RawTextHelpFormatter)
Parse user input 

Definition at line 28 of file validateAlignments.py.

Referenced by main(), and parser().

◆ previousCategory

string validateAlignments.previousCategory = ""

Definition at line 131 of file validateAlignments.py.

◆ proxyName

string validateAlignments.proxyName = "{}/.user_proxy".format(rundir)

Move the proxy to the run directory.

Forward proxy to location visible from the batch system.
Arguments:
- `rundir`: directory for storing the forwarded proxy
Return:
- Full path to the forwarded proxy

Definition at line 66 of file validateAlignments.py.

◆ shell

validateAlignments.shell

Create symlink for executable/python cms config if needed.

Definition at line 298 of file validateAlignments.py.

Referenced by SiPixelHitEfficiencySource.analyze().

◆ stderr

validateAlignments.stderr

Definition at line 46 of file validateAlignments.py.

◆ stdout

validateAlignments.stdout
Check if GRID proxy has been initialized.

Definition at line 46 of file validateAlignments.py.

◆ str

validateAlignments.str

Definition at line 29 of file validateAlignments.py.

◆ type

validateAlignments.type

Definition at line 29 of file validateAlignments.py.

◆ validationDir

validateAlignments.validationDir = os.path.abspath(config["name"])

Check for all paths in configuration and attempt to "digest" them As a bonus, all ROOT colors are turned to the integer value.

Create working directory

Definition at line 227 of file validateAlignments.py.

◆ width

validateAlignments.width

Definition at line 200 of file validateAlignments.py.