CMS 3D CMS Logo

Functions | Variables
configTemplates Namespace Reference

Functions

def alternateTemplate (templateName, alternateTemplateName)
 

Variables

string Bookkeeping
 
string cfgTemplate
 
string CommonTrackSelectionRefitting
 
string compareAlignmentsExecution
 
string conditionsTemplate
 
string crabCfgTemplate
 
string createResultsDirectoryTemplate
 
string DefinePath_CommonSelectionRefitting
 
string FileOutputTemplate
 
string LoadBasicModules
 
string loadGlobalTagTemplate
 
string mergeParallelOfflineTemplate
 
string mergeParallelResults
 
string mergeTemplate
 
string scriptTemplate
 batch job execution More...
 
string SingleTrackRefitter
 

Function Documentation

◆ alternateTemplate()

def configTemplates.alternateTemplate (   templateName,
  alternateTemplateName 
)
                                                            ###
                  Alternate Templates                       ###
                                                            ###

Definition at line 392 of file configTemplates.py.

392 def alternateTemplate( templateName, alternateTemplateName ):
393 
394  if not templateName in globals().keys():
395  msg = "unknown template to replace %s"%templateName
396  raise AllInOneError(msg)
397  if not alternateTemplateName in globals().keys():
398  msg = "unknown template to replace %s"%alternateTemplateName
399  raise AllInOneError(msg)
400  globals()[ templateName ] = globals()[ alternateTemplateName ]
401  # = eval("configTemplates.%s"%"alternateTemplate")

References relativeConstraints.keys.

Referenced by validateAlignments.loadTemplates().

Variable Documentation

◆ Bookkeeping

string configTemplates.Bookkeeping
Initial value:
1 = """
2 process.options = cms.untracked.PSet(
3  wantSummary = cms.untracked.bool(False),
4  Rethrow = cms.untracked.vstring("ProductNotFound"), # make this exception fatal
5  fileMode = cms.untracked.string('NOMERGE') # no ordering needed, but calls endRun/beginRun etc. at file boundaries
6 )
7 
8 process.load("FWCore.MessageLogger.MessageLogger_cfi")
9 process.MessageLogger.destinations = ['cout', 'cerr']
10 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
11 process.MessageLogger.statistics.append('cout')
12 """

Definition at line 152 of file configTemplates.py.

◆ cfgTemplate

string configTemplates.cfgTemplate
Initial value:
1 = """
2 import FWCore.ParameterSet.Config as cms
3 
4 process = cms.Process(".oO[ProcessName]Oo.")
5 
6 .oO[datasetDefinition]Oo.
7 .oO[Bookkeeping]Oo.
8 .oO[LoadBasicModules]Oo.
9 .oO[TrackSelectionRefitting]Oo.
10 .oO[LoadGlobalTagTemplate]Oo.
11 .oO[condLoad]Oo.
12 .oO[ValidationConfig]Oo.
13 .oO[FileOutputTemplate]Oo.
14 
15 .oO[DefinePath]Oo.
16 
17 print("Done")
18 """

Definition at line 130 of file configTemplates.py.

◆ CommonTrackSelectionRefitting

string configTemplates.CommonTrackSelectionRefitting
Initial value:
1 = """
2 import Alignment.CommonAlignment.tools.trackselectionRefitting as trackselRefit
3 process.seqTrackselRefit = trackselRefit.getSequence(process, '.oO[trackcollection]Oo.',
4  isPVValidation=.oO[ispvvalidation]Oo.,
5  TTRHBuilder='.oO[ttrhbuilder]Oo.',
6  usePixelQualityFlag=.oO[usepixelqualityflag]Oo.,
7  openMassWindow=.oO[openmasswindow]Oo.,
8  cosmicsDecoMode=.oO[cosmicsdecomode]Oo.,
9  cosmicsZeroTesla=.oO[cosmics0T]Oo.,
10  momentumConstraint=.oO[momentumconstraint]Oo.,
11  cosmicTrackSplitting=.oO[istracksplitting]Oo.,
12  use_d0cut=.oO[use_d0cut]Oo.,
13  )
14 
15 .oO[trackhitfiltercommands]Oo.
16 """

Definition at line 168 of file configTemplates.py.

◆ compareAlignmentsExecution

string configTemplates.compareAlignmentsExecution
Initial value:
1 = """
2 #merge for .oO[validationId]Oo. if it does not exist or is not up-to-date
3 echo -e "\n\nComparing validations"
4 mkdir -p /eos/cms/store/group/alca_trackeralign/AlignmentValidation/.oO[eosdir]Oo./
5 cp .oO[Alignment/OfflineValidation]Oo./scripts/compareFileAges.C .
6 root -x -q -b -l "compareFileAges.C(\\\"root://eoscms.cern.ch//eos/cms/store/group/alca_trackeralign/AlignmentValidation/.oO[eosdir]Oo./.oO[validationId]Oo._result.root\\\", \\\".oO[compareStringsPlain]Oo.\\\")"
7 comparisonNeeded=${?}
8 
9 if [[ ${comparisonNeeded} -eq 1 ]]
10 then
11  cp .oO[compareAlignmentsPath]Oo. .
12  root -x -q -b -l '.oO[compareAlignmentsName]Oo.++(\".oO[compareStrings]Oo.\", ".oO[legendheader]Oo.", ".oO[customtitle]Oo.", ".oO[customrighttitle]Oo.", .oO[bigtext]Oo.)'
13  mv result.root .oO[validationId]Oo._result.root
14  xrdcp -f .oO[validationId]Oo._result.root root://eoscms//eos/cms/store/group/alca_trackeralign/AlignmentValidation/.oO[eosdir]Oo.
15 else
16  echo ".oO[validationId]Oo._result.root is up-to-date, no need to compare again."
17  xrdcp -f root://eoscms//eos/cms/store/group/alca_trackeralign/AlignmentValidation/.oO[eosdir]Oo./.oO[validationId]Oo._result.root .
18 fi
19 """

Definition at line 329 of file configTemplates.py.

◆ conditionsTemplate

string configTemplates.conditionsTemplate
Initial value:
1 = """
2 process.conditionsIn.oO[rcdName]Oo. = CalibTracker.Configuration.Common.PoolDBESSource_cfi.poolDBESSource.clone(
3  connect = cms.string('.oO[connectString]Oo.'),
4  toGet = cms.VPSet(cms.PSet(record = cms.string('.oO[rcdName]Oo.'),
5  tag = cms.string('.oO[tagName]Oo.')
6  )
7  )
8  )
9 process.prefer_conditionsIn.oO[rcdName]Oo. = cms.ESPrefer("PoolDBESSource", "conditionsIn.oO[rcdName]Oo.")
10 """

Definition at line 33 of file configTemplates.py.

◆ crabCfgTemplate

string configTemplates.crabCfgTemplate
Initial value:
1 = """
2 [CRAB]
3 jobtype = cmssw
4 scheduler = caf
5 use_server = 0
6 
7 [CMSSW]
8 datasetpath = .oO[dataset]Oo.
9 pset = .oO[cfgFile]Oo.
10 total_number_of_.oO[McOrData]Oo.
11 number_of_jobs = .oO[numberOfJobs]Oo.
12 output_file = .oO[outputFile]Oo.
13 runselection = .oO[runRange]Oo.
14 lumi_mask = .oO[JSON]Oo.
15 
16 [USER]
17 return_data = 0
18 copy_data = 1
19 storage_element = T2_CH_CERN
20 user_remote_dir = .oO[eosdir]Oo.
21 ui_working_dir = .oO[crabWorkingDir]Oo.
22 # script_exe = .oO[script]Oo.
23 # .oO[email]Oo.
24 
25 [CAF]
26 queue = .oO[queue]Oo.
27 """

Definition at line 352 of file configTemplates.py.

◆ createResultsDirectoryTemplate

string configTemplates.createResultsDirectoryTemplate
Initial value:
1 = """
2 #create results-directory and copy used configuration there
3 mkdir -p .oO[datadir]Oo.
4 cp .oO[logdir]Oo./usedConfiguration.ini .oO[datadir]Oo.
5 """

Definition at line 305 of file configTemplates.py.

◆ DefinePath_CommonSelectionRefitting

string configTemplates.DefinePath_CommonSelectionRefitting
Initial value:
1 = """
2 process.p = cms.Path(
3 process.seqTrackselRefit*.oO[ValidationSequence]Oo.)
4 """

Definition at line 217 of file configTemplates.py.

◆ FileOutputTemplate

string configTemplates.FileOutputTemplate
Initial value:
1 = """
2 process.TFileService = cms.Service("TFileService",
3  fileName = cms.string('.oO[outputFile]Oo.')
4 )
5 """

Definition at line 208 of file configTemplates.py.

◆ LoadBasicModules

string configTemplates.LoadBasicModules
Initial value:
1 = """
2 process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff")
3 process.load("Configuration.Geometry.GeometryDB_cff")
4 process.load('Configuration.StandardSequences.Services_cff')
5 process.load("Configuration.StandardSequences..oO[magneticField]Oo._cff")
6 """

Definition at line 198 of file configTemplates.py.

◆ loadGlobalTagTemplate

string configTemplates.loadGlobalTagTemplate
Initial value:
1 = """
2 #Global tag
3 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
4 from Configuration.AlCa.GlobalTag import GlobalTag
5 process.GlobalTag = GlobalTag(process.GlobalTag,".oO[GlobalTag]Oo.")
6 """
                                                            ###
                   General Templates                        ###
                                                            ###

Definition at line 23 of file configTemplates.py.

◆ mergeParallelOfflineTemplate

string configTemplates.mergeParallelOfflineTemplate
Initial value:
1 = """#!/bin/bash
2 CWD=`pwd -P`
3 cd .oO[CMSSW_BASE]Oo./src
4 export SCRAM_ARCH=.oO[SCRAM_ARCH]Oo.
5 eval `scramv1 ru -sh`
6 
7 if [[ $HOSTNAME = lxplus[0-9]*[.a-z0-9]* ]] # check for interactive mode
8 then
9  mkdir -p .oO[workdir]Oo.
10  cd .oO[workdir]Oo.
11 else
12  cd $CWD
13 fi
14 echo "Working directory: $(pwd -P)"
15 
16 ###############################################################################
17 # download root files from eos
18 root_files=$(ls /eos/cms/store/group/alca_trackeralign/AlignmentValidation/.oO[eosdir]Oo. \
19  | grep ".root$" | grep -v "result.root$")
20 #for file in ${root_files}
21 #do
22 # xrdcp -f root://eoscms//eos/cms/store/group/alca_trackeralign/AlignmentValidation/.oO[eosdir]Oo./${file} .
23 # echo ${file}
24 #done
25 
26 
27 #run
28 .oO[DownloadData]Oo.
29 """

Definition at line 273 of file configTemplates.py.

◆ mergeParallelResults

string configTemplates.mergeParallelResults
Initial value:
1 = """
2 
3 .oO[beforeMerge]Oo.
4 .oO[doMerge]Oo.
5 
6 # create log file
7 ls -al .oO[mergeParallelFilePrefixes]Oo. > .oO[datadir]Oo./log_rootfilelist.txt
8 
9 # Remove parallel job files
10 .oO[rmUnmerged]Oo.
11 """

Definition at line 314 of file configTemplates.py.

◆ mergeTemplate

string configTemplates.mergeTemplate

Definition at line 224 of file configTemplates.py.

◆ scriptTemplate

string configTemplates.scriptTemplate

batch job execution

Definition at line 48 of file configTemplates.py.

◆ SingleTrackRefitter

string configTemplates.SingleTrackRefitter
Initial value:
1 = """
2 process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
3 process.TrackRefitter.src = ".oO[TrackCollection]Oo."
4 process.TrackRefitter.TTRHBuilder = ".oO[ttrhbuilder]Oo."
5 process.TrackRefitter.NavigationSchool = ""
6 """

Definition at line 188 of file configTemplates.py.

relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
configTemplates.alternateTemplate
def alternateTemplate(templateName, alternateTemplateName)
Definition: configTemplates.py:392