CMS 3D CMS Logo

Functions | Variables
configTemplates Namespace Reference

Functions

def alternateTemplate (templateName, alternateTemplateName)
 

Alternate Templates ###

More...
 

Variables

string Bookkeeping
 
string cfgTemplate
 
string CommonTrackSelectionRefitting
 
string compareAlignmentsExecution
 
string conditionsTemplate
 
string crabCfgTemplate
 
string createResultsDirectoryTemplate
 
string DefinePath_CommonSelectionRefitting
 
string FileOutputTemplate
 
string LoadBasicModules
 
string loadGlobalTagTemplate
 

General Templates ###

More...
 
string mergeParallelOfflineTemplate
 
string mergeParallelResults
 
string mergeTemplate
 
string scriptTemplate
 batch job execution More...
 
string SingleTrackRefitter
 

Function Documentation

def configTemplates.alternateTemplate (   templateName,
  alternateTemplateName 
)

Alternate Templates ###

Definition at line 388 of file configTemplates.py.

References relativeConstraints.keys.

Referenced by validateAlignments.loadTemplates().

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

Variable Documentation

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 147 of file configTemplates.py.

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 """

Definition at line 127 of file configTemplates.py.

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

Definition at line 163 of file configTemplates.py.

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/caf/user/$USER/.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/caf/user/$USER/.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/caf/user/$USER/.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/caf/user/$USER/.oO[eosdir]Oo./.oO[validationId]Oo._result.root .
18 fi
19 """

Definition at line 325 of file configTemplates.py.

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 30 of file configTemplates.py.

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 348 of file configTemplates.py.

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

Definition at line 301 of file configTemplates.py.

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

Definition at line 211 of file configTemplates.py.

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

Definition at line 202 of file configTemplates.py.

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 192 of file configTemplates.py.

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 20 of file configTemplates.py.

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

Definition at line 268 of file configTemplates.py.

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 310 of file configTemplates.py.

string configTemplates.mergeTemplate

Definition at line 218 of file configTemplates.py.

string configTemplates.scriptTemplate

batch job execution

Definition at line 45 of file configTemplates.py.

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 182 of file configTemplates.py.