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

References relativeConstraints.keys.

Referenced by validateAlignments.loadTemplates().

391 def alternateTemplate( templateName, alternateTemplateName ):
392 
393  if not templateName in globals().keys():
394  msg = "unknown template to replace %s"%templateName
395  raise AllInOneError(msg)
396  if not alternateTemplateName in globals().keys():
397  msg = "unknown template to replace %s"%alternateTemplateName
398  raise AllInOneError(msg)
399  globals()[ templateName ] = globals()[ alternateTemplateName ]
400  # = eval("configTemplates.%s"%"alternateTemplate")
401 
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 151 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 
17 print("Done")
18 """

Definition at line 129 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  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 167 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/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 328 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 32 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 351 of file configTemplates.py.

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 304 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 216 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 207 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 197 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 22 of file configTemplates.py.

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

string configTemplates.mergeTemplate

Definition at line 223 of file configTemplates.py.

string configTemplates.scriptTemplate

batch job execution

Definition at line 47 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 187 of file configTemplates.py.