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 DefinePath_CommonSelectionRefitting
 
string FileOutputTemplate
 
string LoadBasicModules
 
string loadGlobalTagTemplate
 

General Templates ###

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

Function Documentation

def configTemplates.alternateTemplate (   templateName,
  alternateTemplateName 
)

Alternate Templates ###

Definition at line 346 of file configTemplates.py.

References relativeConstraints.keys.

Referenced by validateAlignments.loadTemplates().

346 def alternateTemplate( templateName, alternateTemplateName ):
347 
348  if not templateName in globals().keys():
349  msg = "unknown template to replace %s"%templateName
350  raise AllInOneError(msg)
351  if not alternateTemplateName in globals().keys():
352  msg = "unknown template to replace %s"%alternateTemplateName
353  raise AllInOneError(msg)
354  globals()[ templateName ] = globals()[ alternateTemplateName ]
355  # = eval("configTemplates.%s"%"alternateTemplate")
356 
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 148 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 128 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 """

Definition at line 164 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 $eos mkdir -p /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 283 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 306 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 210 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 201 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 191 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.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 268 of file configTemplates.py.

string configTemplates.mergeTemplate

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